aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2024-06-09 18:05:51 -0500
committerFelix Held <felix-coreboot@felixheld.de>2024-06-13 11:46:53 +0000
commit5d904b909a2343b96cfe865f17219ff121d0f7f5 (patch)
treea853e9731e8af3b0a0df1abf1415b90fe528b90e /src
parent04202d1a7e4e3d4216fee7d597be78ebf47de970 (diff)
drivers/gfx/generic: Don't set DOD constraints when generating device address
When dynamically generating the DOD (Display Output Device) device address (_ADR), don't set the DOD constraint flags; only set them when using the address value to generate the DOD package. This fixes ACPI brightness control functionality under Windows 11. Before: Name (_ADR, 0x80010400) After: Name (_ADR, 0x00000400) TEST=build/boot Win11 on google brya (banshee), ensure display brightness controls present and functional. Ref: ACPI Spec 6.5 Appendix B.6.1 - _ADR Change-Id: I1d710c6e55e6cb1d20d580bd784221ee1482b871 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83025 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/gfx/generic/generic.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c
index f07a4710ff..f3c12d14a2 100644
--- a/src/drivers/gfx/generic/generic.c
+++ b/src/drivers/gfx/generic/generic.c
@@ -119,10 +119,8 @@ static void gfx_fill_ssdt_generator(const struct device *dev)
if (!config->device[i].addr && config->device[i].type)
/* Though not strictly necessary, set the display index and
port attachment to the device index, to ensure uniqueness */
- config->device[i].addr = DOD_DID_STD | DOD_FW_DETECT |
- (config->device[i].type << 8) |
- (i << 4) | (i);
- acpigen_write_dword(config->device[i].addr);
+ config->device[i].addr = (config->device[i].type << 8) | (i << 4) | (i);
+ acpigen_write_dword(DOD_DID_STD | DOD_FW_DETECT | config->device[i].addr);
}
acpigen_pop_len(); /* End Package. */
acpigen_pop_len(); /* End Method. */