Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: [HACK] Implement more WAs ......................................................................
[HACK] Implement more WAs
Change-Id: I4cd64cf4c1e702dc05709adc345a976a4e3c1ded Signed-off-by: Angel Pons th3fanbus@gmail.com --- M common/skylake/hw-gfx-gma-power_and_clocks.adb 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/35/46635/1
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks.adb b/common/skylake/hw-gfx-gma-power_and_clocks.adb index c860e1b..1501ea7 100644 --- a/common/skylake/hw-gfx-gma-power_and_clocks.adb +++ b/common/skylake/hw-gfx-gma-power_and_clocks.adb @@ -82,6 +82,9 @@
CNP_PWM_CGE_GATING_DISABLE : constant := 1 * 2 ** 13;
+ DISP_FBC_MEMORY_WAKE : constant := 1 * 2 ** 31; + DISP_FBC_WM_DIS : constant := 1 * 2 ** 15; + ----------------------------------------------------------------------------
CDCLK_CTL_CD_FREQ_SELECT_MASK : constant := 3 * 2 ** 26; @@ -340,6 +343,13 @@ (Register => Registers.PCH_DSPCLK_GATE_D, Mask => CNP_PWM_CGE_GATING_DISABLE);
+ -- Display WA #0562 WaFbcTurnOffFbcWatermark:cfl + -- Display WA #0859 WaFbcWakeMemOn:skl,bxt,kbl,glk,cfl + Registers.Set_Mask + (Register => Registers.ARB_CTL, + Mask => DISP_FBC_WM_DIS or + DISP_FBC_MEMORY_WAKE); + Get_Cur_CDClk (Config.CDClk); Get_Max_CDClk (Config.Max_CDClk); Set_CDClk (Config.Default_CDClk_Freq);
Angel Pons has uploaded a new patch set (#2). ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: [HACK] Implement more WAs ......................................................................
[HACK] Implement more WAs
Change-Id: I4cd64cf4c1e702dc05709adc345a976a4e3c1ded Signed-off-by: Angel Pons th3fanbus@gmail.com --- M common/hw-gfx-gma-registers.ads M common/skylake/hw-gfx-gma-power_and_clocks.adb 2 files changed, 40 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/35/46635/2
Angel Pons has uploaded a new patch set (#4). ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: Implement more WAs ......................................................................
Implement more WAs
NOTE: One workaround is specific to Coffee Lake, but the current config options do not distinguish between Sky/Kaby Lake and Coffee Lake et al.
Change-Id: I4cd64cf4c1e702dc05709adc345a976a4e3c1ded Signed-off-by: Angel Pons th3fanbus@gmail.com --- M common/hw-gfx-gma-registers.ads M common/skylake/hw-gfx-gma-power_and_clocks.adb 2 files changed, 40 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/35/46635/4
Angel Pons has uploaded a new patch set (#5). ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: gfx gma: Implement more Coffee Lake and Cannon Point WAs ......................................................................
gfx gma: Implement more Coffee Lake and Cannon Point WAs
NOTE: One workaround is specific to Coffee Lake, but the current config options do not distinguish between Sky/Kaby Lake and Coffee Lake et al.
Change-Id: I4cd64cf4c1e702dc05709adc345a976a4e3c1ded Signed-off-by: Angel Pons th3fanbus@gmail.com --- M common/hw-gfx-gma-registers.ads M common/skylake/hw-gfx-gma-power_and_clocks.adb 2 files changed, 40 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/35/46635/5
Angel Pons has uploaded a new patch set (#7). ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
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.
Change-Id: I4cd64cf4c1e702dc05709adc345a976a4e3c1ded Signed-off-by: Angel Pons th3fanbus@gmail.com --- M common/hw-gfx-gma-registers.ads M common/skylake/hw-gfx-gma-power_and_clocks.adb 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/35/46635/7
Attention is currently required from: Matt DeVillier, Angel Pons, Michael Niewöhner. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
Patch Set 7: Code-Review+2
(3 comments)
Commit Message:
https://review.coreboot.org/c/libgfxinit/+/46635/comment/d43e9231_ad5969f8 PS7, Line 11: workarounds, the system no longer locks up after running gfx_test. Please describe the full sequence that leads to a hang. Was i915 involved in any way? Also, did you test if low-power states work when booting with coreboot+libgfxinit w/o these WAs but i915 disabled?
Patchset:
PS7: Thanks for boiling it down to 2 WAs.
File common/skylake/hw-gfx-gma-power_and_clocks.adb:
https://review.coreboot.org/c/libgfxinit/+/46635/comment/bff2d262_e08d0069 PS7, Line 359: 1 * 2 ** 13 i915 calls it MASK_WAKEMEM
Attention is currently required from: Nico Huber, Matt DeVillier, Michael Niewöhner. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
Patch Set 7:
(1 comment)
Commit Message:
https://review.coreboot.org/c/libgfxinit/+/46635/comment/b90adf7d_b1c6e97c PS7, Line 11: workarounds, the system no longer locks up after running gfx_test.
Please describe the full sequence that leads to a hang. Was i915 […]
- 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.
Attention is currently required from: Nico Huber, Matt DeVillier, Michael Niewöhner. Hello Nico Huber, Matt DeVillier, Michael Niewöhner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/libgfxinit/+/46635
to look at the new patch set (#8).
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
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 --- M common/hw-gfx-gma-registers.ads M common/skylake/hw-gfx-gma-power_and_clocks.adb 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/35/46635/8
Attention is currently required from: Nico Huber, Matt DeVillier, Michael Niewöhner. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
Patch Set 8:
(1 comment)
Commit Message:
https://review.coreboot.org/c/libgfxinit/+/46635/comment/b368d090_d5505e1b PS7, Line 11: workarounds, the system no longer locks up after running gfx_test.
- Boot Linux without loading i915. […]
Done
Attention is currently required from: Nico Huber, Matt DeVillier, Michael Niewöhner. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
Patch Set 8: Verified+1
(1 comment)
Patchset:
PS8: Proven with spark-discovery-gpl-2017
Attention is currently required from: Nico Huber, Matt DeVillier, Michael Niewöhner. Hello Nico Huber, Matt DeVillier, Michael Niewöhner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/libgfxinit/+/46635
to look at the new patch set (#9).
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
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 --- M common/hw-gfx-gma-registers.ads M common/skylake/hw-gfx-gma-power_and_clocks.adb 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/35/46635/9
Nico Huber has submitted this change. ( https://review.coreboot.org/c/libgfxinit/+/46635 )
Change subject: gfx gma skylake: Implement some workarounds ......................................................................
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 --- M common/hw-gfx-gma-registers.ads M common/skylake/hw-gfx-gma-power_and_clocks.adb 2 files changed, 14 insertions(+), 0 deletions(-)
Approvals: Angel Pons: Verified Nico Huber: Looks good to me, approved
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, diff --git a/common/skylake/hw-gfx-gma-power_and_clocks.adb b/common/skylake/hw-gfx-gma-power_and_clocks.adb index edbaf00..ec71359 100644 --- a/common/skylake/hw-gfx-gma-power_and_clocks.adb +++ b/common/skylake/hw-gfx-gma-power_and_clocks.adb @@ -82,6 +82,8 @@ LCPLL1_CTL_PLL_ENABLE : constant := 1 * 2 ** 31; LCPLL1_CTL_PLL_LOCK : constant := 1 * 2 ** 30;
+ DISP_FBC_MEMORY_WAKE : constant := 1 * 2 ** 31; + ----------------------------------------------------------------------------
CDCLK_CTL_CD_FREQ_SELECT_MASK : constant := 3 * 2 ** 26; @@ -351,6 +353,16 @@ (Register => Registers.LCPLL1_CTL, Mask => LCPLL1_CTL_PLL_LOCK);
+ -- WaEnableChickenDCPR:skl,bxt,kbl,glk,cfl + Registers.Set_Mask + (Register => Registers.GEN8_CHICKEN_DCPR_1, + Mask => 1 * 2 ** 13); + + -- Display WA #0859 WaFbcWakeMemOn:skl,bxt,kbl,glk,cfl + Registers.Set_Mask + (Register => Registers.ARB_CTL, + Mask => DISP_FBC_MEMORY_WAKE); + Get_Cur_CDClk (Config.CDClk); Get_Max_CDClk (Config.Max_CDClk); Set_CDClk (Config.Default_CDClk_Freq);