Felix Held submitted this change.
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
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>
---
M src/drivers/gfx/generic/generic.c
1 file changed, 36 insertions(+), 0 deletions(-)
diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c
index cd32314..0714565 100644
--- a/src/drivers/gfx/generic/generic.c
+++ b/src/drivers/gfx/generic/generic.c
@@ -140,6 +140,42 @@
if (config->device[i].use_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(); /* Scope */
To view, visit change 80061. To unsubscribe, or for help writing mail filters, visit settings.