Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
soc/amd/common: Add a common graphics block device driver for AMD SoCs
This change adds a common graphics block device driver for AMD SoCs. In follow-up CLs, this driver will be utilized for Picasso.
BUG=b:153858769
Change-Id: I45e2b98fede41e49158d9ff9f93785a34c392c22 Signed-off-by: Furquan Shaikh furquan@google.com --- A src/soc/amd/common/block/graphics/Kconfig A src/soc/amd/common/block/graphics/Makefile.inc A src/soc/amd/common/block/graphics/graphics.c 3 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/40675/1
diff --git a/src/soc/amd/common/block/graphics/Kconfig b/src/soc/amd/common/block/graphics/Kconfig new file mode 100644 index 0000000..8aa2a20 --- /dev/null +++ b/src/soc/amd/common/block/graphics/Kconfig @@ -0,0 +1,5 @@ +config SOC_AMD_COMMON_BLOCK_GRAPHICS + bool + default n + help + Select this option to use AMD common graphics driver support. diff --git a/src/soc/amd/common/block/graphics/Makefile.inc b/src/soc/amd/common/block/graphics/Makefile.inc new file mode 100644 index 0000000..3f21aaf --- /dev/null +++ b/src/soc/amd/common/block/graphics/Makefile.inc @@ -0,0 +1 @@ +ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_GRAPHICS) += graphics.c diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c new file mode 100644 index 0000000..b21cf2c --- /dev/null +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* This file is part of the coreboot project. */ + +#include <console/console.h> +#include <device/pci.h> +#include <device/pci_ids.h> + +static const struct device_operations graphics_ops = { + .read_resources = pci_dev_read_resources, + .set_resources = pci_dev_set_resources, + .enable_resources = pci_dev_enable_resources, + .init = pci_dev_init, + .ops_pci = &pci_dev_ops_pci, + .write_acpi_tables = pci_rom_write_acpi_tables, + .acpi_fill_ssdt_generator = pci_rom_ssdt, +}; + +static const unsigned short pci_device_ids[] = { + 0, +}; + +static const struct pci_driver graphics_driver __pci_driver = { + .ops = &graphics_ops, + .vendor = PCI_VENDOR_ID_ATI, + .devices = pci_device_ids, +};
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40675/1/src/soc/amd/common/block/gr... File src/soc/amd/common/block/graphics/graphics.c:
https://review.coreboot.org/c/coreboot/+/40675/1/src/soc/amd/common/block/gr... PS1, Line 15: acpi_fill_ssdt_generator This needs to be updated. It has changed to acpi_fill_ssdt.
Hello build bot (Jenkins), Raul Rangel, Patrick Georgi, Martin Roth, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40675
to look at the new patch set (#2).
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
soc/amd/common: Add a common graphics block device driver for AMD SoCs
This change adds a common graphics block device driver for AMD SoCs. In follow-up CLs, this driver will be utilized for Picasso.
BUG=b:153858769
Change-Id: I45e2b98fede41e49158d9ff9f93785a34c392c22 Signed-off-by: Furquan Shaikh furquan@google.com --- A src/soc/amd/common/block/graphics/Kconfig A src/soc/amd/common/block/graphics/Makefile.inc A src/soc/amd/common/block/graphics/graphics.c 3 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/40675/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40675/1/src/soc/amd/common/block/gr... File src/soc/amd/common/block/graphics/graphics.c:
https://review.coreboot.org/c/coreboot/+/40675/1/src/soc/amd/common/block/gr... PS1, Line 15: acpi_fill_ssdt_generator
This needs to be updated. It has changed to acpi_fill_ssdt.
Done
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 2: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 2: Code-Review+2
It's a lil' stub right now, but it'll grow someday
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/40675/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40675/2//COMMIT_MSG@11 PS2, Line 11: Could you please add, why a dedicated driver is needed?
Hello build bot (Jenkins), Raul Rangel, Patrick Georgi, Martin Roth, Paul Menzel, Angel Pons, Aaron Durbin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40675
to look at the new patch set (#3).
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
soc/amd/common: Add a common graphics block device driver for AMD SoCs
This change adds a common graphics block device driver for AMD SoCs. In follow-up CLs, this driver will be utilized for Picasso.
This driver is added to enable ACPI name and SSDT generation for graphics controller.
BUG=b:153858769
Change-Id: I45e2b98fede41e49158d9ff9f93785a34c392c22 Signed-off-by: Furquan Shaikh furquan@google.com --- A src/soc/amd/common/block/graphics/Kconfig A src/soc/amd/common/block/graphics/Makefile.inc A src/soc/amd/common/block/graphics/graphics.c 3 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/40675/3
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40675/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/40675/2//COMMIT_MSG@11 PS2, Line 11:
Could you please add, why a dedicated driver is needed?
Done
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 3: Code-Review+2
Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
soc/amd/common: Add a common graphics block device driver for AMD SoCs
This change adds a common graphics block device driver for AMD SoCs. In follow-up CLs, this driver will be utilized for Picasso.
This driver is added to enable ACPI name and SSDT generation for graphics controller.
BUG=b:153858769
Change-Id: I45e2b98fede41e49158d9ff9f93785a34c392c22 Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/40675 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Raul Rangel rrangel@chromium.org --- A src/soc/amd/common/block/graphics/Kconfig A src/soc/amd/common/block/graphics/Makefile.inc A src/soc/amd/common/block/graphics/graphics.c 3 files changed, 37 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Raul Rangel: Looks good to me, approved
diff --git a/src/soc/amd/common/block/graphics/Kconfig b/src/soc/amd/common/block/graphics/Kconfig new file mode 100644 index 0000000..8aa2a20 --- /dev/null +++ b/src/soc/amd/common/block/graphics/Kconfig @@ -0,0 +1,5 @@ +config SOC_AMD_COMMON_BLOCK_GRAPHICS + bool + default n + help + Select this option to use AMD common graphics driver support. diff --git a/src/soc/amd/common/block/graphics/Makefile.inc b/src/soc/amd/common/block/graphics/Makefile.inc new file mode 100644 index 0000000..3f21aaf --- /dev/null +++ b/src/soc/amd/common/block/graphics/Makefile.inc @@ -0,0 +1 @@ +ramstage-$(CONFIG_SOC_AMD_COMMON_BLOCK_GRAPHICS) += graphics.c diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c new file mode 100644 index 0000000..6d40f7c --- /dev/null +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* This file is part of the coreboot project. */ + +#include <device/pci.h> +#include <device/pci_ids.h> + +static const char *graphics_acpi_name(const struct device *dev) +{ + return "IGFX"; +} + +static const struct device_operations graphics_ops = { + .read_resources = pci_dev_read_resources, + .set_resources = pci_dev_set_resources, + .enable_resources = pci_dev_enable_resources, + .init = pci_dev_init, + .ops_pci = &pci_dev_ops_pci, + .write_acpi_tables = pci_rom_write_acpi_tables, + .acpi_fill_ssdt = pci_rom_ssdt, + .acpi_name = graphics_acpi_name, +}; + +static const unsigned short pci_device_ids[] = { + 0, +}; + +static const struct pci_driver graphics_driver __pci_driver = { + .ops = &graphics_ops, + .vendor = PCI_VENDOR_ID_ATI, + .devices = pci_device_ids, +};
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40675 )
Change subject: soc/amd/common: Add a common graphics block device driver for AMD SoCs ......................................................................
Patch Set 7:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2804 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2803 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2802 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/2801
Please note: This test is under development and might not be accurate at all!