Won Chung has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/74365 )
Change subject: drivers/gfx/generic: Add _PLD support to GFX device ......................................................................
drivers/gfx/generic: Add _PLD support to GFX device
Add _PLD support to GFX device so that each display outputs can store its physical location of connection point. This is to be used primarily for describing DP on USB-C ports in the future patches.
BUG=b:277629750 TEST=emerge-${BOARD} coreboot
Change-Id: I393207746a9e82c1fd7622ab3661d7b1232cb62f --- M src/drivers/gfx/generic/chip.h M src/drivers/gfx/generic/generic.c 2 files changed, 26 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/74365/1
diff --git a/src/drivers/gfx/generic/chip.h b/src/drivers/gfx/generic/chip.h index d600823..dad60602 100644 --- a/src/drivers/gfx/generic/chip.h +++ b/src/drivers/gfx/generic/chip.h @@ -4,6 +4,7 @@ #define __DRIVERS_GFX_GENERIC_CHIP_H__
#include <acpi/acpi_device.h> +#include <acpi/acpi_pld.h>
/* Config for electronic privacy screen */ struct drivers_gfx_generic_privacy_screen_config { @@ -35,6 +36,9 @@ unsigned int addr; /* Electronic privacy screen specific config */ struct drivers_gfx_generic_privacy_screen_config privacy; + /* Physical location of connection point */ + bool use_custom_pld; + struct acpi_pld pld; };
/* Config for an ACPI video device defined in Appendix A of the ACPI spec */ @@ -47,7 +51,8 @@ /* The number of output devices defined */ int device_count; /* Config for output devices */ - struct drivers_gfx_generic_device_config device[5]; + /* 1 DDIA + 1 DDIB + 4 TCP */ + struct drivers_gfx_generic_device_config device[6]; };
#endif /* __DRIVERS_GFX_GENERIC_CHIP_H__ */ diff --git a/src/drivers/gfx/generic/generic.c b/src/drivers/gfx/generic/generic.c index 7c6076c..9dac203 100644 --- a/src/drivers/gfx/generic/generic.c +++ b/src/drivers/gfx/generic/generic.c @@ -128,6 +128,10 @@
acpigen_write_name_integer("_STA", 0xF); gfx_fill_privacy_screen_dsm(&config->device[i].privacy); + + if (config->device[i].use_custom_pld) + acpigen_write_pld(&config->device[i].pld); + acpigen_pop_len(); /* Device */ } acpigen_pop_len(); /* Scope */