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/graphics.c | |
parent | 05a50d7e133c46bdad68ed5aba9991f965feb498 (diff) | |
download | coreboot-970a62fcf96593613d8396b49301927efe847cce.tar.gz coreboot-970a62fcf96593613d8396b49301927efe847cce.tar.bz2 coreboot-970a62fcf96593613d8396b49301927efe847cce.zip |
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/graphics.c')
-rw-r--r-- | src/soc/amd/common/block/graphics/graphics.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index 9dff18dd73bd..ea7308a85084 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) |