diff options
author | CoolStar <coolstarorganization@gmail.com> | 2023-10-17 10:53:20 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-10-25 16:50:19 +0000 |
commit | 970a62fcf96593613d8396b49301927efe847cce (patch) | |
tree | d52c6ba1c851b5de268c3b7eafbe8fabdc1df649 /src/soc/amd/common/block/graphics | |
parent | 05a50d7e133c46bdad68ed5aba9991f965feb498 (diff) |
soc/amd/common: Add ACP device to common block graphics driver
Supports a brand new ACP driver for STONEY / Grunt chromebooks.
AMD's Audio CoProcessor handles i2s/tdm audio, and is located on the
GPU.
On Windows the PCIe device for the GPU is owned by the AMD proprietary
driver, hence a separate device has to be added for the ACP driver.
Fortunately since IOMMU is disabled on STONEY, the driver itself can
pull BAR5 from the GPU and use that to initialize, so no special
configuration is required in ACPI other than the ID.
Change-Id: I0e31c3b31fa9fb99578c04b79fce2d8c1d695561
Signed-off-by: CoolStar <coolstarorganization@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78430
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/soc/amd/common/block/graphics')
-rw-r--r-- | src/soc/amd/common/block/graphics/Kconfig | 7 | ||||
-rw-r--r-- | src/soc/amd/common/block/graphics/graphics.c | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/graphics/Kconfig b/src/soc/amd/common/block/graphics/Kconfig index 75b4013138..ce00f1821d 100644 --- a/src/soc/amd/common/block/graphics/Kconfig +++ b/src/soc/amd/common/block/graphics/Kconfig @@ -26,3 +26,10 @@ config USE_SELECTIVE_GOP_INIT Select this option to only run the FSP GOP driver when needed for pre-OS display init (eg, Recovery and Developer Modes). Otherwise, use cached VBIOS/ATOMBIOS tables. Selecting this option will save approx. 130ms boot time on the normal boot path. + +config SOC_AMD_COMMON_BLOCK_GRAPHICS_ACP + bool + depends on SOC_AMD_COMMON_BLOCK_GRAPHICS + help + Select this option to provide Audio CoProcessor ACPI device for pre-Ryzen APUs for + use by custom Windows drivers. diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index 9dff18dd73..ea7308a850 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -114,6 +114,18 @@ static void generate_atif(const struct device *dev) acpigen_pop_len(); /* Scope */ } +static void generate_acp(const struct device *dev) +{ + /* Scope (\_SB.PCI0.IGFX) */ + acpigen_write_scope(acpi_device_path(dev)); + acpigen_write_device("ACP"); + + acpigen_write_name_string("_HID", "BOOT0003"); + + acpigen_pop_len(); /* Device */ + acpigen_pop_len(); /* Scope */ +} + static void graphics_fill_ssdt(const struct device *dev) { acpi_device_write_pci_dev(dev); @@ -124,6 +136,9 @@ static void graphics_fill_ssdt(const struct device *dev) if (CONFIG(SOC_AMD_COMMON_BLOCK_GRAPHICS_ATIF)) generate_atif(dev); + + if (CONFIG(SOC_AMD_COMMON_BLOCK_GRAPHICS_ACP)) + generate_acp(dev); } static const char *graphics_acpi_name(const struct device *dev) |