diff options
author | Won Chung <wonchung@google.com> | 2023-04-10 20:35:58 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-05-08 13:12:18 +0000 |
commit | 467c88b3a971a364d2013b9e397d9cd6f5bcfdda (patch) | |
tree | 83dc24a7cdfe94ae9e5d71f33f67870e4759dd5b /src/drivers/gfx | |
parent | e59f18bf29a8db4447100c57d3400ec432a94961 (diff) | |
download | coreboot-467c88b3a971a364d2013b9e397d9cd6f5bcfdda.tar.gz coreboot-467c88b3a971a364d2013b9e397d9cd6f5bcfdda.tar.bz2 coreboot-467c88b3a971a364d2013b9e397d9cd6f5bcfdda.zip |
drivers/gfx/generic: Add _PLD support to GFX device
Add _PLD support to GFX device so that each display output 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.
The upstream Linux kernel now has a feature to compare _PLD of Type C
connectors and DP connectors to link them together.
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=c5c51b2420625faa1f0e363f21dba1de53806ff7
This feature allows us to tell which display output is used by which
USB-C port.
So, for the future boards, we want to add _PLD for each DP connector
matching with the corresponding USB-C port.
BUG=b:277629750
TEST=emerge-${BOARD} coreboot
Signed-off-by: Won Chung <wonchung@google.com>
Change-Id: I393207746a9e82c1fd7622ab3661d7b1232cb62f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74365
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Diffstat (limited to 'src/drivers/gfx')
-rw-r--r-- | src/drivers/gfx/generic/chip.h | 7 | ||||
-rw-r--r-- | src/drivers/gfx/generic/generic.c | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/drivers/gfx/generic/chip.h b/src/drivers/gfx/generic/chip.h index d60082372b38..1a666a27eb27 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 @@ struct drivers_gfx_generic_device_config { unsigned int addr; /* Electronic privacy screen specific config */ struct drivers_gfx_generic_privacy_screen_config privacy; + /* Physical location of connection point */ + bool use_pld; + struct acpi_pld pld; }; /* Config for an ACPI video device defined in Appendix A of the ACPI spec */ @@ -47,7 +51,8 @@ struct drivers_gfx_generic_config { /* 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 + max 4 TCP = up to 6 GFX devices */ + 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 7c6076c9f4ce..0ab16767ebef 100644 --- a/src/drivers/gfx/generic/generic.c +++ b/src/drivers/gfx/generic/generic.c @@ -128,6 +128,10 @@ static void gfx_fill_ssdt_generator(const struct device *dev) acpigen_write_name_integer("_STA", 0xF); gfx_fill_privacy_screen_dsm(&config->device[i].privacy); + + if (config->device[i].use_pld) + acpigen_write_pld(&config->device[i].pld); + acpigen_pop_len(); /* Device */ } acpigen_pop_len(); /* Scope */ |