[coreboot-gerrit] Patch set updated for coreboot: 28fa57d intel/i945/gma.c: Revert to evaluating NVRAM option `tft_brightness`

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Fri Mar 20 07:41:54 CET 2015


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8779

-gerrit

commit 28fa57d2a27914581f7d14c8e9dc87668ed36723
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Fri Mar 20 06:58:57 2015 +0100

    intel/i945/gma.c: Revert to evaluating NVRAM option `tft_brightness`
    
    Partially revert commit 71512b2c (northbridge/i945/gma: fix build
    error with native graphics init), which removes the if statement
    to permanently set the value to 0xff.
    
    As neither that change of behavior nor the reason for it is mentioned in
    the commit message and the change is unrelated to the stated goal of the
    commit anyway, revert that hunk.
    
    Change-Id: I6744ebabcb264c67301efa82a1dab7e4a320d24d
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/northbridge/intel/i945/gma.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/northbridge/intel/i945/gma.c b/src/northbridge/intel/i945/gma.c
index cee0640..d556a06 100644
--- a/src/northbridge/intel/i945/gma.c
+++ b/src/northbridge/intel/i945/gma.c
@@ -472,14 +472,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)



More information about the coreboot-gerrit mailing list