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>
This commit is contained in:
parent
22419e0456
commit
c7f2ab742b
@ -131,17 +131,13 @@ static void gma_pm_init_pre_vbios(struct device *dev)
|
|||||||
gtt_write(0x0a094, 0x00040000);
|
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;
|
struct northbridge_intel_haswell_config *conf = dev->chip_info;
|
||||||
u32 reg32;
|
u32 reg32;
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "GT Power Management Init (post VBIOS)\n");
|
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 */
|
/* Setup Digital Port Hotplug */
|
||||||
reg32 = gtt_read(0xc4030);
|
reg32 = gtt_read(0xc4030);
|
||||||
if (!reg32) {
|
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)
|
static void gma_func0_init(struct device *dev)
|
||||||
{
|
{
|
||||||
int lightup_ok = 0;
|
int lightup_ok = 0;
|
||||||
@ -203,9 +215,13 @@ static void gma_func0_init(struct device *dev)
|
|||||||
* So it's almost like having two hardcodes.
|
* So it's almost like having two hardcodes.
|
||||||
*/
|
*/
|
||||||
graphics_base = dev->resource_list[1].base;
|
graphics_base = dev->resource_list[1].base;
|
||||||
|
|
||||||
/* Init graphics power management */
|
/* Init graphics power management */
|
||||||
gma_pm_init_pre_vbios(dev);
|
gma_pm_init_pre_vbios(dev);
|
||||||
|
|
||||||
|
/* Post VBIOS init */
|
||||||
|
gma_setup_panel(dev);
|
||||||
|
|
||||||
#if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT
|
#if CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT
|
||||||
printk(BIOS_SPEW, "NATIVE graphics, run native enable\n");
|
printk(BIOS_SPEW, "NATIVE graphics, run native enable\n");
|
||||||
u32 iobase, mmiobase, physbase;
|
u32 iobase, mmiobase, physbase;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user