drivers/intel/gma: Guard legacy brightness fallback
When BOX3.XBCM fails we currently fall back to LEGA.XBCM, which writes directly to the IGD PWM registers. During S3 resume those registers are still reset by the graphics driver, so AML stores a zero duty cycle and the panel stays dark. This leads to having some other event needed to wake the panel (i.e. key press). Only invoke the legacy path after BCLM is initialized, matching when the driver has reprogrammed the PWM registers and preventing firmware from touching them while the driver is still restoring them. Test=Enter and exit S3 on starbook_mtl, verify that the display turns on and stays on, instead of on -> off -> on. Change-Id: I664d296372feef9de5c4f57428422328c4e33110 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/89985 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
908c2b54c6
commit
109672a9a9
1 changed files with 8 additions and 1 deletions
|
|
@ -149,7 +149,14 @@
|
|||
{
|
||||
If (^BOX3.XBCM (Arg0) == Ones)
|
||||
{
|
||||
^LEGA.XBCM (Arg0)
|
||||
/*
|
||||
* Only touch the legacy PWM registers after the graphics driver
|
||||
* reprograms them during boot/resume (BCLM stays zero until then).
|
||||
*/
|
||||
If (BCLM != 0)
|
||||
{
|
||||
^LEGA.XBCM (Arg0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue