summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/gfx/generic/generic.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c
index cd323142da..0714565b2d 100644
--- a/src/drivers/gfx/generic/generic.c
+++ b/src/drivers/gfx/generic/generic.c
@@ -140,6 +140,42 @@ static void gfx_fill_ssdt_generator(const struct device *dev)
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 */