diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2016-03-09 10:42:58 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-03-11 00:48:54 +0100 |
commit | c7a1a3e994135bb405662e2f52d0b22efa899c3d (patch) | |
tree | 0fe9f962d8c0e1d6a9cafe96d1919e4e6cecb0a7 /src/northbridge/intel | |
parent | a2176d8ef68ab129068d730138b1ca37c2063017 (diff) |
northbridge/i945/gma: Re-enable NVRAM tft_brightness
Commit 71512b2c (northbridge/i945/gma: fix build error with native graphics init)
unintentionally changed the code to ignore the NVRAM setting
`tft_brightness`. Revert that hunk to restore the original behavior.
Change-Id: Iffdfc5272732bad3476f35ddac1f5a7564270531
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/14002
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r-- | src/northbridge/intel/i945/gma.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c index bd0a178939..df13ef4950 100644 --- a/src/northbridge/intel/i945/gma.c +++ b/src/northbridge/intel/i945/gma.c @@ -465,14 +465,17 @@ static void gma_func0_disable(struct device *dev) static void gma_func1_init(struct device *dev) { u32 reg32; + u8 val; /* IGD needs to be Bus Master, also enable IO accesss */ reg32 = pci_read_config32(dev, PCI_COMMAND); pci_write_config32(dev, PCI_COMMAND, reg32 | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO); - /* Permanently set tft_brightness to 0xff. Ignore nvramtool configuration */ - pci_write_config8(dev, 0xf4, 0xff); + if (get_option(&val, "tft_brightness") == CB_SUCCESS) + pci_write_config8(dev, 0xf4, val); + else + pci_write_config8(dev, 0xf4, 0xff); } static void gma_set_subsystem(device_t dev, unsigned vendor, unsigned device) |