From cb61ea7a13dd7adea1f2fa3e06ec702ec86b4a88 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 15 Aug 2013 15:23:58 -0700 Subject: Falco/Slippy: Patch to remove redundant graphics initializations gma_fui_init repeats the initializations already performed in gma_setup_panel. These redundant initializations reset any gtt settings done before this call. Hence, they had to be done again after call to gma_fui_init. However, the call gma_fui_init is not required at all. Does not affect the behavior of suspend/resume. Old-Change-Id: Idfb9f9930624694b878ddc0fe8648b3c8dd80e55 Signed-off-by: Furquan Shaikh Reviewed-on: https://gerrit.chromium.org/gerrit/65997 Reviewed-by: Ronald G. Minnich Reviewed-by: Stefan Reinauer Commit-Queue: Furquan Shaikh Tested-by: Furquan Shaikh (cherry picked from commit c376aea1b89c9a829874d5c657693993a3bb1f13) Falco/Slippy: Patch to fix garbage on screen during graphics initialization in normal mode Depending on the init_fb parameter: 1) For normal mode, first page is filled with zeroes and setgtt is used make all GTT entries point to this same page 2) For developer/recovery mode, we init the gtt to consecutive pages Old-Change-Id: I281b0b7efe01f7892e98b19ff9a63c04b087bd2c Signed-off-by: Furquan Shaikh Reviewed-on: https://gerrit.chromium.org/gerrit/65633 Reviewed-by: Aaron Durbin Commit-Queue: Furquan Shaikh Tested-by: Furquan Shaikh (cherry picked from commit 97c99dfe52ef3a87d387fdbf27ad3a28ad81c722) Squashed two graphics related commits for Falco/Slippy. Change-Id: I7ddb92672c026fe66f9fb0caba9d8fdc3f8a9d0a Signed-off-by: Isaac Christensen Reviewed-on: http://review.coreboot.org/6536 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/northbridge/intel/haswell/gma.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/northbridge/intel/haswell/gma.c') diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c index 95c7b2241d..ee447bfc95 100644 --- a/src/northbridge/intel/haswell/gma.c +++ b/src/northbridge/intel/haswell/gma.c @@ -30,6 +30,10 @@ #include "chip.h" #include "haswell.h" +#if CONFIG_CHROMEOS +#include +#endif + struct gt_reg { u32 reg; u32 andmask; @@ -403,12 +407,18 @@ static void gma_func0_init(struct device *dev) #if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT printk(BIOS_SPEW, "NATIVE graphics, run native enable\n"); u32 iobase, mmiobase, physbase; + /* Default set to 1 since it might be required for + stuff like seabios */ + unsigned int init_fb = 1; iobase = dev->resource_list[2].base; mmiobase = dev->resource_list[0].base; physbase = pci_read_config32(dev, 0x5c) & ~0xf; - - int i915lightup(u32 physbase, u32 iobase, u32 mmiobase, u32 gfx); - lightup_ok = i915lightup(physbase, iobase, mmiobase, graphics_base); +#ifdef CONFIG_CHROMEOS + init_fb = developer_mode_enabled() || recovery_mode_enabled(); +#endif + int i915lightup(unsigned int physbase, unsigned int iobase, unsigned int mmio, + unsigned int gfx, unsigned int init_fb); + lightup_ok = i915lightup(physbase, iobase, mmiobase, graphics_base, init_fb); if (lightup_ok) gfx_set_init_done(1); #endif -- cgit v1.2.3