Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80061?usp=email )
Change subject: drivers/generic/gfx: Generate ACPI backlight controls for LCD device ......................................................................
drivers/generic/gfx: Generate ACPI backlight controls for LCD device
Normally this would be done by the 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 GMA.
Change-Id: Ic8fbaf7550405f8c6f36012c8efadb8c36b968c2 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/drivers/gfx/generic/generic.c 1 file changed, 36 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/80061/1
diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c index 0ab1676..2af7f89 100644 --- a/src/drivers/gfx/generic/generic.c +++ b/src/drivers/gfx/generic/generic.c @@ -132,6 +132,42 @@ if (config->device[i].use_pld) acpigen_write_pld(&config->device[i].pld);
+ /* ACPI brightness controls for LCD. */ + if (strcmp(config->device[i].name, "LCD") == 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 */