summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-05-28 07:49:09 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-11-25 23:47:54 +0100
commitc7f2ab742b2589281efa852309e29c8da5270fbe (patch)
tree534c3a92b64ea0b0a90b03c4e873af950718d26f /src/northbridge
parent22419e045616c344c7a2a308c5ef086a221ad006 (diff)
haswell: Add magic to turn on grahpics in normal mode
The haswell i915 kernel driver apparently expects the VBIOS to set a few specific registers. This sequence is enough to make the driver happy without executing the VBIOS. This also makes graphics work after suspend/resume. Change-Id: I34937d55ffff8a9445442e6e6ca1bfc49869da63 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/56806 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/4195 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/haswell/gma.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index f3ddbd3acd..467ed93a87 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -131,17 +131,13 @@ static void gma_pm_init_pre_vbios(struct device *dev)
gtt_write(0x0a094, 0x00040000);
}
-static void gma_pm_init_post_vbios(struct device *dev)
+static void gma_setup_panel(struct device *dev)
{
struct northbridge_intel_haswell_config *conf = dev->chip_info;
u32 reg32;
printk(BIOS_DEBUG, "GT Power Management Init (post VBIOS)\n");
- /* Disable Force Wake */
- gtt_write(0x0a188, 0x00010000);
- gtt_poll(0x130044, 1 << 0, 0 << 0);
-
/* Setup Digital Port Hotplug */
reg32 = gtt_read(0xc4030);
if (!reg32) {
@@ -187,6 +183,22 @@ static void gma_pm_init_post_vbios(struct device *dev)
}
}
+static void gma_pm_init_post_vbios(struct device *dev)
+{
+ extern int oprom_is_loaded;
+
+ if (!oprom_is_loaded) {
+ /* Magic to force graphics into happy state for kernel */
+ gtt_write(0xc7204, 0xabcd000f); /* panel power up */
+ gtt_write(0x45400, 0x80000000); /* power well enable */
+ gtt_write(0x64000, 0x00000091); /* DDI-A enable */
+ }
+
+ /* Disable Force Wake */
+ gtt_write(0x0a188, 0x00010000);
+ gtt_poll(0x130044, 1 << 0, 0 << 0);
+}
+
static void gma_func0_init(struct device *dev)
{
int lightup_ok = 0;
@@ -203,9 +215,13 @@ static void gma_func0_init(struct device *dev)
* So it's almost like having two hardcodes.
*/
graphics_base = dev->resource_list[1].base;
+
/* Init graphics power management */
gma_pm_init_pre_vbios(dev);
+ /* Post VBIOS init */
+ gma_setup_panel(dev);
+
#if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT
printk(BIOS_SPEW, "NATIVE graphics, run native enable\n");
u32 iobase, mmiobase, physbase;