gfx gma skylake: Implement some workarounds
Without these workarounds, gfx_test will leave a WHL-U Librem Mini v1 in
a state where entering low-power states results in a hang. With these
workarounds, the system no longer locks up after running gfx_test. Looks
like the hang does not happen when coreboot runs libgfxinit.
Steps to reproduce the hang:
- Boot Linux without loading i915.
- Run gfx_test without the workarounds.
- After gfx_test exits and the machine enters a low-power state,
it will lock up.
If something keeps the CPU from getting into low-power states (e.g.
`cat /dev/zero > /dev/null`), the machine will not lock up. However,
stopping the load task after gfx_test has run will result in a lock-up.
Change-Id: I4cd64cf4c1e702dc05709adc345a976a4e3c1ded
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/46635
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/hw-gfx-gma-registers.ads b/common/hw-gfx-gma-registers.ads
index 68e5664..3318ab1 100644
--- a/common/hw-gfx-gma-registers.ads
+++ b/common/hw-gfx-gma-registers.ads
@@ -144,6 +144,7 @@
TRANSC_CLK_SEL,
CDCLK_FREQ,
NDE_RSTWRN_OPT,
+ GEN8_CHICKEN_DCPR_1,
BLC_PWM_CPU_CTL2,
BLC_PWM_CPU_CTL,
DFSM,
@@ -1489,6 +1490,7 @@
ARB_CTL => 16#04_5000# / Register_Width,
DBUF_CTL => 16#04_5008# / Register_Width,
NDE_RSTWRN_OPT => 16#04_6408# / Register_Width,
+ GEN8_CHICKEN_DCPR_1 => 16#04_6430# / Register_Width,
PCH_DREF_CONTROL => 16#0c_6200# / Register_Width,
PCH_DPLL_SEL => 16#0c_7000# / Register_Width,
GT_MAILBOX => 16#13_8124# / Register_Width,