[coreboot-gerrit] Change in coreboot[master]: soc/intel/cannonlake: Make use of Intel common Graphics block

Subrata Banik (Code Review) gerrit at coreboot.org
Tue Nov 28 14:10:37 CET 2017


Subrata Banik has uploaded this change for review. ( https://review.coreboot.org/22617


Change subject: soc/intel/cannonlake: Make use of Intel common Graphics block
......................................................................

soc/intel/cannonlake: Make use of Intel common Graphics block

TEST=Build and boot cannonlake rvp.

Change-Id: Iaa1314ae3fcb4a8a3b55a314e79511f5dcba163d
Signed-off-by: Subrata Banik <subrata.banik at intel.com>
---
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/cannonlake/graphics.c
2 files changed, 5 insertions(+), 39 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/22617/1

diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index f4d524a..b95c843 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -51,6 +51,7 @@
 	select SOC_INTEL_COMMON_BLOCK_EBDA
 	select SOC_INTEL_COMMON_BLOCK_FAST_SPI
 	select SOC_INTEL_COMMON_BLOCK_GPIO
+	select SOC_INTEL_COMMON_BLOCK_GRAPHICS
 	select SOC_INTEL_COMMON_BLOCK_GSPI
 	select SOC_INTEL_COMMON_BLOCK_ITSS
 	select SOC_INTEL_COMMON_BLOCK_I2C
diff --git a/src/soc/intel/cannonlake/graphics.c b/src/soc/intel/cannonlake/graphics.c
index a177127..cd3df19 100644
--- a/src/soc/intel/cannonlake/graphics.c
+++ b/src/soc/intel/cannonlake/graphics.c
@@ -14,29 +14,21 @@
  * GNU General Public License for more details.
  */
 
-#include <arch/acpi.h>
 #include <arch/acpigen.h>
 #include <console/console.h>
 #include <fsp/util.h>
 #include <device/device.h>
 #include <device/pci.h>
-#include <device/pci_ids.h>
-#include <soc/pci_devs.h>
 #include <drivers/intel/gma/opregion.h>
+#include <intelblocks/graphics.h>
 
 uintptr_t fsp_soc_get_igd_bar(void)
 {
-	device_t dev = SA_DEV_IGD;
-
-	/* Check if IGD PCI device is disabled */
-	if (!dev->enabled)
-		return 0;
-
-	return find_resource(dev, PCI_BASE_ADDRESS_2)->base;
+	return graphics_get_memory_base();
 }
 
-static unsigned long igd_write_opregion(device_t dev, unsigned long current,
-				struct acpi_rsdp *rsdp)
+uintptr_t graphics_soc_write_acpi_opregion(device_t device,
+		uintptr_t current, struct acpi_rsdp *rsdp)
 {
 	igd_opregion_t *opregion;
 
@@ -50,30 +42,3 @@
 
 	return acpi_align_current(current);
 }
-
-static const struct device_operations igd_ops = {
-	.read_resources   = pci_dev_read_resources,
-	.set_resources    = pci_dev_set_resources,
-	.enable_resources = pci_dev_enable_resources,
-	.init             = pci_dev_init,
-	.write_acpi_tables = igd_write_opregion,
-	.enable           = DEVICE_NOOP
-};
-
-static const unsigned short pci_device_ids[] = {
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULX_1,
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULX_2,
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULX_3,
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULX_4,
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULT_1,
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULT_2,
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULT_3,
-	PCI_DEVICE_ID_INTEL_CNL_GT2_ULT_4,
-	0,
-};
-
-static const struct pci_driver integrated_graphics_driver __pci_driver = {
-	.ops		= &igd_ops,
-	.vendor		= PCI_VENDOR_ID_INTEL,
-	.devices	= pci_device_ids,
-};

-- 
To view, visit https://review.coreboot.org/22617
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa1314ae3fcb4a8a3b55a314e79511f5dcba163d
Gerrit-Change-Number: 22617
Gerrit-PatchSet: 1
Gerrit-Owner: Subrata Banik <subrata.banik at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171128/695d7850/attachment.html>


More information about the coreboot-gerrit mailing list