summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-10-29 15:42:44 +0100
committerMartin Roth <martinroth@google.com>2018-06-08 03:27:37 +0000
commitf2dd0499b65149c90c1d3ddaa034b9aaa9850e33 (patch)
tree1bafd590236dcb6fe96b910864bdcedd1eafd371 /src
parentb00bac707f308a2c9293c24ad735d1c4e1e9ab42 (diff)
libgfxinit: Enable G45 support (for GM45/X4X)
Change-Id: Ia637d32ffaa5d280320955d34141eddc8b7df981 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22222 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/intel/gma/Kconfig9
-rw-r--r--src/northbridge/intel/gm45/gma.c7
-rw-r--r--src/northbridge/intel/x4x/gma.c4
3 files changed, 16 insertions, 4 deletions
diff --git a/src/drivers/intel/gma/Kconfig b/src/drivers/intel/gma/Kconfig
index 9e2872bb6c..1b9c2a647f 100644
--- a/src/drivers/intel/gma/Kconfig
+++ b/src/drivers/intel/gma/Kconfig
@@ -65,9 +65,10 @@ config GFX_GMA_ANALOG_I2C_HDMI_D
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
@@ -80,6 +81,7 @@ config GFX_GMA_CPU
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
@@ -93,6 +95,7 @@ config GFX_GMA_INTERNAL_IS_EDP
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 f0171e6133..606170ce73 100644
--- a/src/northbridge/intel/gm45/gma.c
+++ b/src/northbridge/intel/gm45/gma.c
@@ -35,6 +35,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
@@ -770,8 +771,12 @@ static void gma_func0_init(struct device *dev)
/* 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 6c6f3a2318..f38d64d517 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -33,6 +33,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>
@@ -411,6 +412,9 @@ static void gma_func0_init(struct device *dev)
return;
}
native_init(dev);
+ } else if (IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT)) {
+ int lightup_ok;
+ gma_gfxinit(&lightup_ok);
} else {
pci_dev_init(dev);
}