[coreboot-gerrit] Change in coreboot[master]: [WIP] libgfxinit: Enable G45 support (for GM45/X4X)

Nico Huber (Code Review) gerrit at coreboot.org
Sun Oct 29 15:45:15 CET 2017


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/22222


Change subject: [WIP] libgfxinit: Enable G45 support (for GM45/X4X)
......................................................................

[WIP] libgfxinit: Enable G45 support (for GM45/X4X)

Change-Id: Ia637d32ffaa5d280320955d34141eddc8b7df981
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M 3rdparty/libgfxinit
M src/drivers/intel/gma/Kconfig
M src/northbridge/intel/gm45/gma.c
M src/northbridge/intel/x4x/gma.c
4 files changed, 17 insertions(+), 5 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/22222/1

diff --git a/3rdparty/libgfxinit b/3rdparty/libgfxinit
index 3a0e2a0..472bb18 160000
--- a/3rdparty/libgfxinit
+++ b/3rdparty/libgfxinit
@@ -1 +1 @@
-Subproject commit 3a0e2a08f5489f3bb5c6e9f97b903e6e10c31a6c
+Subproject commit 472bb181e7476ff76419e9a196bed09fe0521b61
diff --git a/src/drivers/intel/gma/Kconfig b/src/drivers/intel/gma/Kconfig
index a4b8a4a..7741e3f 100644
--- a/src/drivers/intel/gma/Kconfig
+++ b/src/drivers/intel/gma/Kconfig
@@ -58,9 +58,10 @@
 
 config GFX_GMA
 	def_bool y
-	depends on NORTHBRIDGE_INTEL_NEHALEM || NORTHBRIDGE_INTEL_SANDYBRIDGE \
-		   || NORTHBRIDGE_INTEL_IVYBRIDGE || NORTHBRIDGE_INTEL_HASWELL \
-		   || SOC_INTEL_BROADWELL || SOC_INTEL_SKYLAKE
+	depends on NORTHBRIDGE_INTEL_GM45 || NORTHBRIDGE_INTEL_X4X \
+		|| NORTHBRIDGE_INTEL_NEHALEM || NORTHBRIDGE_INTEL_SANDYBRIDGE \
+		|| NORTHBRIDGE_INTEL_IVYBRIDGE || NORTHBRIDGE_INTEL_HASWELL \
+		|| SOC_INTEL_BROADWELL || SOC_INTEL_SKYLAKE
 	depends on MAINBOARD_HAS_LIBGFXINIT
 
 if GFX_GMA
@@ -73,6 +74,7 @@
 	default "Ivybridge" if NORTHBRIDGE_INTEL_IVYBRIDGE
 	default "Sandybridge" if NORTHBRIDGE_INTEL_SANDYBRIDGE
 	default "Ironlake" if NORTHBRIDGE_INTEL_NEHALEM
+	default "G45" if NORTHBRIDGE_INTEL_GM45 || NORTHBRIDGE_INTEL_X4X
 
 config GFX_GMA_CPU_VARIANT
 	string
@@ -86,6 +88,7 @@
 
 config GFX_GMA_INTERNAL_IS_LVDS
 	bool
+	default y if NORTHBRIDGE_INTEL_GM45
 	default n
 
 config GFX_GMA_INTERNAL_PORT
diff --git a/src/northbridge/intel/gm45/gma.c b/src/northbridge/intel/gm45/gma.c
index bdad49b..384f3c3 100644
--- a/src/northbridge/intel/gm45/gma.c
+++ b/src/northbridge/intel/gm45/gma.c
@@ -37,6 +37,7 @@
 #include <drivers/intel/gma/opregion.h>
 #include <pc80/vga.h>
 #include <pc80/vga_io.h>
+#include <drivers/intel/gma/libgfxinit.h>
 
 #define BASE_FREQUENCY 96000
 
@@ -772,8 +773,12 @@
 	/* Post VBIOS init */
 	gma_pm_init_post_vbios(dev, edid_lvds.ascii_string);
 
-	if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT))
+	if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) {
 		gma_ngi(dev, &edid_lvds);
+	} else if (IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT)) {
+		int lightup_ok;
+		gma_gfxinit(&lightup_ok);
+	}
 
 	intel_gma_restore_opregion();
 }
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index cf3804d..70352a9 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -35,6 +35,7 @@
 #include <drivers/intel/gma/edid.h>
 #include <drivers/intel/gma/i915.h>
 #include <drivers/intel/gma/opregion.h>
+#include <drivers/intel/gma/libgfxinit.h>
 #include <pc80/vga.h>
 #include <pc80/vga_io.h>
 
@@ -413,6 +414,9 @@
 			return;
 		}
 		native_init(dev);
+	} else if (IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT)) {
+		int lightup_ok;
+		gma_gfxinit(&lightup_ok);
 	} else {
 		pci_dev_init(dev);
 	}

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia637d32ffaa5d280320955d34141eddc8b7df981
Gerrit-Change-Number: 22222
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171029/5628ee41/attachment.html>


More information about the coreboot-gerrit mailing list