CoolStar has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78428?usp=email )
Change subject: soc/amd/stoneyridge: Use common block graphicd driver ......................................................................
soc/amd/stoneyridge: Use common block graphicd driver
Select the common block graphics driver for Stoney.
Decouple the common driver from FSP for Stoney, and don't write the ACPI device for the GPU as stoney already defines it statically.
Change-Id: I260b964be59c1a208ff907c474243a9ace03f206 Signed-off-by: CoolStar coolstarorganization@gmail.com --- M src/soc/amd/common/block/graphics/graphics.c M src/soc/amd/stoneyridge/Kconfig M src/soc/amd/stoneyridge/chipset_cz.cb M src/soc/amd/stoneyridge/chipset_st.cb 4 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/28/78428/1
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index 4d33cad..b8b0e5c 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -9,7 +9,9 @@ #include <console/console.h> #include <device/pci.h> #include <fmap.h> +#if CONFIG(RUN_FSP_GOP) #include <fsp/graphics.h> +#endif #include <security/vboot/vbios_cache_hash_tpm.h> #include <soc/intel/common/vbt.h> #include <timestamp.h> @@ -115,7 +117,8 @@
static void graphics_fill_ssdt(const struct device *dev) { - acpi_device_write_pci_dev(dev); + if (!CONFIG(SOC_AMD_STONEYRIDGE)) + acpi_device_write_pci_dev(dev);
/* Use the VFCT copy when using GOP */ if (!CONFIG(RUN_FSP_GOP)) @@ -177,7 +180,7 @@
static void graphics_dev_init(struct device *const dev) { - if (CONFIG(RUN_FSP_GOP)) { + #if CONFIG(RUN_FSP_GOP) struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0);
if (res && res->base) @@ -185,7 +188,7 @@ else printk(BIOS_ERR, "%s: Unable to find resource for %s\n", __func__, dev_path(dev)); - } + #endif
/* Initialize PCI device, load/execute BIOS Option ROM */ pci_dev_init(dev); diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig index 6ff135e..b692e48 100644 --- a/src/soc/amd/stoneyridge/Kconfig +++ b/src/soc/amd/stoneyridge/Kconfig @@ -25,6 +25,7 @@ select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS select SOC_AMD_COMMON_BLOCK_CAR select SOC_AMD_COMMON_BLOCK_CPUFREQ_FAM15H_16H + select SOC_AMD_COMMON_BLOCK_GRAPHICS select SOC_AMD_COMMON_BLOCK_HDA select SOC_AMD_COMMON_BLOCK_I2C select SOC_AMD_COMMON_BLOCK_IOMMU diff --git a/src/soc/amd/stoneyridge/chipset_cz.cb b/src/soc/amd/stoneyridge/chipset_cz.cb index 004ff91..1122ae8 100644 --- a/src/soc/amd/stoneyridge/chipset_cz.cb +++ b/src/soc/amd/stoneyridge/chipset_cz.cb @@ -8,7 +8,7 @@ ops stoneyridge_pci_domain_ops device pci 00.0 alias gnb on ops stoneyridge_northbridge_operations end device pci 00.2 alias iommu off ops amd_iommu_ops end - device pci 01.0 alias gfx off end # internal GPU + device pci 01.0 alias gfx off ops amd_graphics_ops end # internal GPU device pci 01.1 alias gfx_hda off end # display HD Audio controller device pci 02.0 on end # Dummy Host Bridge, do not disable device pci 02.1 alias gpp_bridge_0 off end diff --git a/src/soc/amd/stoneyridge/chipset_st.cb b/src/soc/amd/stoneyridge/chipset_st.cb index 34a0384..fd148a8 100644 --- a/src/soc/amd/stoneyridge/chipset_st.cb +++ b/src/soc/amd/stoneyridge/chipset_st.cb @@ -8,7 +8,7 @@ ops stoneyridge_pci_domain_ops device pci 00.0 alias gnb on ops stoneyridge_northbridge_operations end device pci 00.2 alias iommu off ops amd_iommu_ops end - device pci 01.0 alias gfx off end # internal GPU + device pci 01.0 alias gfx off ops amd_graphics_ops end # internal GPU device pci 01.1 alias gfx_hda off end # display HD Audio controller device pci 02.0 on end # Dummy Host Bridge, do not disable device pci 02.1 alias gpp_bridge_0 off end