drv/gfx/generic: Add Intel ACPI Backlight funcs for LCD devices
Normally this would be done by the Intel GMA driver, but we can't have two copies of the _DOD method, so generate the LCD backlight controls here to allow use of this driver instead of the default GMA panel definition. TEST=build/boot Win11 on google/byra (redrix), ensure ACPI brightness controls functional. Change-Id: Ic8fbaf7550405f8c6f36012c8efadb8c36b968c2 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80061 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
8f47aa8c93
commit
2981e7999e
@ -140,6 +140,42 @@ static void gfx_fill_ssdt_generator(const struct device *dev)
|
|||||||
if (config->device[i].use_pld)
|
if (config->device[i].use_pld)
|
||||||
acpigen_write_pld(&config->device[i].pld);
|
acpigen_write_pld(&config->device[i].pld);
|
||||||
|
|
||||||
|
/* Generate ACPI brightness controls for LCD on Intel iGPU */
|
||||||
|
if (CONFIG(INTEL_GMA_ACPI) && strcmp(config->device[i].name, "LCD0") == 0) {
|
||||||
|
/*
|
||||||
|
Method (_BCL, 0, NotSerialized)
|
||||||
|
{
|
||||||
|
Return (^^XBCL())
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
acpigen_write_method("_BCL", 0);
|
||||||
|
acpigen_emit_byte(RETURN_OP);
|
||||||
|
acpigen_emit_namestring("^^XBCL");
|
||||||
|
acpigen_pop_len();
|
||||||
|
|
||||||
|
/*
|
||||||
|
Method (_BCM, 1, NotSerialized)
|
||||||
|
{
|
||||||
|
^^XBCM(Arg0)
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
acpigen_write_method("_BCM", 1);
|
||||||
|
acpigen_emit_namestring("^^XBCM");
|
||||||
|
acpigen_emit_byte(ARG0_OP);
|
||||||
|
acpigen_pop_len();
|
||||||
|
|
||||||
|
/*
|
||||||
|
Method (_BQC, 0, NotSerialized)
|
||||||
|
{
|
||||||
|
Return (^^XBQC())
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
acpigen_write_method("_BQC", 0);
|
||||||
|
acpigen_emit_byte(RETURN_OP);
|
||||||
|
acpigen_emit_namestring("^^XBQC");
|
||||||
|
acpigen_pop_len();
|
||||||
|
}
|
||||||
|
|
||||||
acpigen_pop_len(); /* Device */
|
acpigen_pop_len(); /* Device */
|
||||||
}
|
}
|
||||||
acpigen_pop_len(); /* Scope */
|
acpigen_pop_len(); /* Scope */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user