Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59730 )
Change subject: drivers/gfx/generic: Add optional _HID for gfx devices ......................................................................
drivers/gfx/generic: Add optional _HID for gfx devices
Some boards may want to use a _HID instead of an _ADR to locate a graphics device. This patch provides that option in the devicetree.
BUG=b:206850071 TEST=Add `hid` entry in devicetree, dump SSDT and see _HID instead of _ADR
Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org Change-Id: I32be4abf5c60be1f94aabaa2e9c734215c4e291e --- M src/drivers/gfx/generic/chip.h M src/drivers/gfx/generic/generic.c 2 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/59730/1
diff --git a/src/drivers/gfx/generic/chip.h b/src/drivers/gfx/generic/chip.h index becc2ed..d600823 100644 --- a/src/drivers/gfx/generic/chip.h +++ b/src/drivers/gfx/generic/chip.h @@ -29,6 +29,8 @@ struct drivers_gfx_generic_device_config { /* ACPI device name of the output device */ const char *name; + /* Value to use for _HID Name, will take precedence over _ADR */ + const char *hid; /* The address of the output device. See section A.3.2 */ unsigned int addr; /* Electronic privacy screen specific config */ diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c index 98bde79..b7c030f 100644 --- a/src/drivers/gfx/generic/generic.c +++ b/src/drivers/gfx/generic/generic.c @@ -121,8 +121,11 @@
for (i = 0; i < config->device_count; i++) { acpigen_write_device(config->device[i].name); - acpigen_write_name_integer("_ADR", config->device[i].addr); - acpigen_write_name_integer("_STA", 0xF); + if (config->device[i].hid) + acpigen_write_name_string("_HID", config->device[i].hid); + else + acpigen_write_name_integer("_ADR", config->device[i].addr); + gfx_fill_privacy_screen_dsm(&config->device[i].privacy); acpigen_pop_len(); /* Device */ }