Patrick Georgi merged this change.

View Change

Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
drivers/intel/gma: Make libgfxinit available w/o gfxinit

We might want to make use of libgfxinit functions without using it for
actual graphics init.

Change-Id: I29c3b19989acb678d0d447e83d38bad9d584caa9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31455
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/device/Kconfig
M src/drivers/intel/gma/Kconfig
M src/drivers/intel/gma/Makefile.inc
3 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/src/device/Kconfig b/src/device/Kconfig
index 8001b43..0539062 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -76,7 +76,6 @@
depends on MAINBOARD_HAS_LIBGFXINIT
select HAVE_VGA_TEXT_FRAMEBUFFER
select HAVE_LINEAR_FRAMEBUFFER
- select RAMSTAGE_LIBHWBASE
select VGA if VGA_TEXT_FRAMEBUFFER
help
Use the SPARK library `libgfxinit` for the native graphics
diff --git a/src/drivers/intel/gma/Kconfig b/src/drivers/intel/gma/Kconfig
index a5c8495..4f897fa 100644
--- a/src/drivers/intel/gma/Kconfig
+++ b/src/drivers/intel/gma/Kconfig
@@ -69,7 +69,20 @@
|| NORTHBRIDGE_INTEL_NEHALEM || NORTHBRIDGE_INTEL_SANDYBRIDGE \
|| NORTHBRIDGE_INTEL_IVYBRIDGE || NORTHBRIDGE_INTEL_HASWELL \
|| SOC_INTEL_BROADWELL || SOC_INTEL_SKYLAKE || SOC_INTEL_APOLLOLAKE
- depends on MAINBOARD_HAS_LIBGFXINIT
+ depends on MAINBOARD_USE_LIBGFXINIT
+ select RAMSTAGE_LIBHWBASE
+
+config GFX_GMA_INTERNAL_IS_EDP
+ bool
+ depends on GFX_GMA || MAINBOARD_HAS_LIBGFXINIT
+ default n if GFX_GMA_INTERNAL_IS_LVDS
+ default y
+
+config GFX_GMA_INTERNAL_IS_LVDS
+ bool
+ depends on GFX_GMA || MAINBOARD_HAS_LIBGFXINIT
+ default y if NORTHBRIDGE_INTEL_GM45 || NORTHBRIDGE_INTEL_NEHALEM
+ default n

if GFX_GMA

@@ -89,16 +102,6 @@
default "ULT" if (SOC_INTEL_SKYLAKE && !SKYLAKE_SOC_PCH_H) || SOC_INTEL_BROADWELL || NORTHBRIDGE_INTEL_HASWELL
default "Normal"

-config GFX_GMA_INTERNAL_IS_EDP
- bool
- default n if GFX_GMA_INTERNAL_IS_LVDS
- default y
-
-config GFX_GMA_INTERNAL_IS_LVDS
- bool
- default y if NORTHBRIDGE_INTEL_GM45 || NORTHBRIDGE_INTEL_NEHALEM
- default n
-
config GFX_GMA_INTERNAL_PORT
string
default "DP" if GFX_GMA_INTERNAL_IS_EDP
diff --git a/src/drivers/intel/gma/Makefile.inc b/src/drivers/intel/gma/Makefile.inc
index 274955a..ebc688f 100644
--- a/src/drivers/intel/gma/Makefile.inc
+++ b/src/drivers/intel/gma/Makefile.inc
@@ -33,7 +33,7 @@
$(call add_vbt_to_cbfs, vbt.bin, $(call strip_quotes,$(CONFIG_INTEL_GMA_VBT_FILE)))
endif

-ifeq ($(CONFIG_MAINBOARD_USE_LIBGFXINIT),y)
+ifeq ($(CONFIG_GFX_GMA),y)

$(call add-special-class,gfxinit)
gfxinit-handler = $(eval ramstage-srcs += $(1)$(2))
@@ -50,11 +50,11 @@

subdirs-y += ../../../../3rdparty/libgfxinit

-ramstage-y += gma.ads
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma.ads
ifeq ($(CONFIG_LINEAR_FRAMEBUFFER),y)
-ramstage-y += hires_fb/gma.adb
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += hires_fb/gma.adb
else
-ramstage-y += text_fb/gma.adb
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += text_fb/gma.adb
endif

-endif # CONFIG_MAINBOARD_USE_LIBGFXINIT
+endif # CONFIG_GFX_GMA

To view, visit change 31455. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I29c3b19989acb678d0d447e83d38bad9d584caa9
Gerrit-Change-Number: 31455
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged