Nico Huber has submitted this change. ( https://review.coreboot.org/c/libgfxinit/+/35711 )
Change subject: gma: Give GM45 its own designation (separate from G45) ......................................................................
gma: Give GM45 its own designation (separate from G45)
While G45 and GM45 have mostly the same display engine (seem to only differ in the available outputs), they are driven by very different clock sources. To derive the corret CDClk in a later commit, we'll have to distinguish between the two.
Change-Id: I99bbd0582a03a9e2806ef2ebf63e466ec40133b3 Signed-off-by: Nico Huber nico.h@gmx.de Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/35711 Reviewed-by: Patrick Georgi pgeorgi@google.com Reviewed-by: Arthur Heymans arthur@aheymans.xyz Reviewed-by: Angel Pons th3fanbus@gmail.com --- M common/Makefile.inc M common/hw-gfx-gma-config.ads.template M common/hw-gfx-gma.ads M configs/g45 4 files changed, 11 insertions(+), 11 deletions(-)
Approvals: Nico Huber: Verified Patrick Georgi: Looks good to me, approved Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/common/Makefile.inc b/common/Makefile.inc index 67b6c17..4cbdaaa 100644 --- a/common/Makefile.inc +++ b/common/Makefile.inc @@ -54,9 +54,10 @@ CONFIG_GFX_GMA_ANALOG_I2C_PORT := $(call strip_quotes,$(CONFIG_GFX_GMA_ANALOG_I2C_PORT))
_GEN_NONCONST := $(strip \ + $(if $(filter G45,$(CONFIG_GFX_GMA_GENERATION)),g45, \ $(if $(filter Ironlake,$(CONFIG_GFX_GMA_GENERATION)),ilk, \ $(if $(filter Haswell,$(CONFIG_GFX_GMA_GENERATION)),hsw, \ - $(if $(filter Skylake,$(CONFIG_GFX_GMA_GENERATION)),skl)))) + $(if $(filter Skylake,$(CONFIG_GFX_GMA_GENERATION)),skl))))) # GNATprove (GPL 2017) doesn't realize when a boolean expression # that depends both on static values and variables can be evalu- # ated at compile time (e.g. `False and then Variable` is always @@ -76,9 +77,9 @@ -e's/<<DEFAULT_MMIO_BASE>>/$(CONFIG_GFX_GMA_DEFAULT_MMIO)/' \ -e'/constant Gen_CPU(_Var)?/d' \ -e's/<genbool>/constant Boolean/' \ - -e's/<((ilk|hsw|skl)(...)?)bool>/<\1var> Boolean/' \ + -e's/<((g45|ilk|hsw|skl)(...)?)bool>/<\1var> Boolean/' \ $(if $(_GEN_NONCONST),-e's/<(...)?$(_GEN_NONCONST)(...)?var>/<cpufunc>/') \ - -e's/<(ilk|hsw|skl)(...)?var>/$(_GEN_CONST_TARGET)/' \ + -e's/<(g45|ilk|hsw|skl)(...)?var>/$(_GEN_CONST_TARGET)/' \ -e's/(.*: *<cpufunc>.*:=) *(.*);/\1\n (\2);/' \ -e's/([^ ]+) *: *<cpufunc> +([^ ]*) *:=/function \1 return \2 is/' \ -e's/<cpunull>//' \ @@ -94,8 +95,8 @@ -e's/<<DEFAULT_MMIO_BASE>>/$(CONFIG_GFX_GMA_DEFAULT_MMIO)/' \ -e":s$$(printf '\n ')/,$$/{N;s/,\n.*Dyn_CPU(_Var)?[^,)]*//;ts$$(printf '\n ')P;D;}" \ -e'/Dyn_CPU(_Var)?/d' \ - -e's/<(gen|(ilk|hsw|skl)(...)?)bool>/constant Boolean/' \ - -e's/<((ilk|hsw|skl)(...)?)var>/constant/' \ + -e's/<(gen|(g45|ilk|hsw|skl)(...)?)bool>/constant Boolean/' \ + -e's/<((g45|ilk|hsw|skl)(...)?)var>/constant/' \ -e's/<cpunull>/ is null/' \ $< >$@ endif diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template index 8711e54..1f6fea6 100644 --- a/common/hw-gfx-gma-config.ads.template +++ b/common/hw-gfx-gma-config.ads.template @@ -27,7 +27,7 @@ when Skylake => Skylake); CPU_Last : constant CPU_Type := (case Gen is - when G45 => G45, + when G45 => GM45, when Ironlake => Ivybridge, when Haswell => Broadwell, when Broxton => Broxton, @@ -407,8 +407,8 @@ function Is_GPU (Device_Id : Word16; CPU : CPU_Type; CPU_Var : CPU_Variant) return Boolean is (case CPU is - when G45 => (Device_Id and 16#ff02#) = 16#2e02# or - (Device_Id and 16#fffe#) = 16#2a42#, + when G45 => (Device_Id and 16#ff02#) = 16#2e02#, + when GM45 => (Device_Id and 16#fffe#) = 16#2a42#, when Ironlake => (Device_Id and 16#fff3#) = 16#0042#, when Sandybridge => (Device_Id and 16#ffc2#) = 16#0102#, when Ivybridge => (Device_Id and 16#ffc3#) = 16#0142#, diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads index f9444e8..353ec4b 100644 --- a/common/hw-gfx-gma.ads +++ b/common/hw-gfx-gma.ads @@ -37,6 +37,7 @@
type CPU_Type is (G45, + GM45, Ironlake, Sandybridge, Ivybridge, diff --git a/configs/g45 b/configs/g45 index 9d2da64..44404b9 100644 --- a/configs/g45 +++ b/configs/g45 @@ -1,7 +1,5 @@ -CONFIG_GFX_GMA_DYN_CPU = +CONFIG_GFX_GMA_DYN_CPU = y CONFIG_GFX_GMA_GENERATION = G45 -CONFIG_GFX_GMA_CPU = G45 -CONFIG_GFX_GMA_CPU_VARIANT = Normal # N/A CONFIG_GFX_GMA_INTERNAL_PORT = LVDS CONFIG_GFX_GMA_ANALOG_I2C_PORT = PCH_DAC CONFIG_GFX_GMA_DEFAULT_MMIO = 16#e000_0000#