drivers/intel/gma: Fix OpRegion Mailbox3 backlight change
We should always update BCLP, no matter if the driver is ready yet to process the request. This way it will hold the current value when the driver initializes. Change-Id: I4b091d744f95da39abe542966f0a8589a187573b Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/28300 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
661907cdb4
commit
58344fc2e7
|
@ -2,6 +2,7 @@
|
|||
* This file is part of the coreboot project.
|
||||
*
|
||||
* Copyright (C) 2015 Nico Huber <nico.huber@secunet.com>
|
||||
* Copyright (C) 2018 Nico Huber <nico.h@gmx.de>
|
||||
* Copyright (C) 2018 Patrick Rudolph
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -64,19 +65,21 @@
|
|||
{
|
||||
Return (Ones)
|
||||
}
|
||||
If (LEqual(ARDY, Zero))
|
||||
{
|
||||
Return (Ones)
|
||||
}
|
||||
|
||||
/* BCLP requires brightness unsigned 8bit. 255 = 100 % */
|
||||
/* Always keep BCLP up to date, even if driver is not ready.
|
||||
It requires a full 8-bit brightness value. 255 = 100% */
|
||||
Store (Divide (Multiply (Arg0, 255), 100), Local1)
|
||||
If (LGreater(Local1, 255)) {
|
||||
Store (255, Local1)
|
||||
}
|
||||
/* set valid bit */
|
||||
/* also set valid bit */
|
||||
Store (Or (Local1, 0x80000000), BCLP)
|
||||
|
||||
If (LEqual(ARDY, Zero))
|
||||
{
|
||||
Return (Ones)
|
||||
}
|
||||
|
||||
/* Request back-light change */
|
||||
Store (0x2, ASLC)
|
||||
/* Trigger IRQ */
|
||||
|
|
Loading…
Reference in New Issue