drivers/intel/gma: Reapply cached brightness once BCLM is valid
The OS replays _BCM requests while the graphics driver is still reinitializing, so hardware brightness can diverge from what we cached in BRLV. Reapply the cached level once the OpRegion is ready to keep firmware and OS state aligned. Change-Id: I2e6ed0936b2e74f55a2c760e7f4fcf56a2e02c53 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90029 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
2ad08f9d72
commit
2d78478345
1 changed files with 17 additions and 0 deletions
|
|
@ -175,6 +175,23 @@
|
|||
}
|
||||
|
||||
Local0 = ^LEGA.XBQC ()
|
||||
If (Local0 != BRLV)
|
||||
{
|
||||
/*
|
||||
* The OS replays _BCM requests while the graphics driver is
|
||||
* still reinitializing, so hardware brightness can diverge
|
||||
* from what we cached in BRLV. Reapply the cached level once
|
||||
* the OpRegion is ready to keep firmware and OS state aligned.
|
||||
* Use BRCT flag to prevent recursion.
|
||||
*/
|
||||
If (BRCT == 0)
|
||||
{
|
||||
BRCT = 1
|
||||
XBCM (BRLV)
|
||||
Local0 = ^LEGA.XBQC ()
|
||||
BRCT = 0
|
||||
}
|
||||
}
|
||||
BRLV = Local0
|
||||
Return (Local0)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue