gma: Introduce `PCH_Type`
We got this far without it but now there is a PCH (Cannon Point) that is not fully compatible to its predecessors but works with the same CPUs. First, introduce the type and make use of it in a few cases. In a follow-up, we'll add the new PCH. Change-Id: I9d4965f110da3613749023143cf75123e63ae76e Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/48762 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
c9ad9de6ce
commit
e79babd08d
|
@ -47,11 +47,13 @@ gfxinit-y += hw-gfx.ads
|
|||
gfxinit-y += hw-gfx-framebuffer_filler.adb
|
||||
gfxinit-y += hw-gfx-framebuffer_filler.ads
|
||||
|
||||
CONFIG_GFX_GMA_PCH ?= No_PCH
|
||||
CONFIG_GFX_GMA_PANEL_2_PORT ?= Disabled
|
||||
|
||||
CONFIG_GFX_GMA_GENERATION := $(call strip_quotes,$(CONFIG_GFX_GMA_GENERATION))
|
||||
CONFIG_GFX_GMA_CPU := $(call strip_quotes,$(CONFIG_GFX_GMA_CPU))
|
||||
CONFIG_GFX_GMA_CPU_VARIANT := $(call strip_quotes,$(CONFIG_GFX_GMA_CPU_VARIANT))
|
||||
CONFIG_GFX_GMA_PCH := $(call strip_quotes,$(CONFIG_GFX_GMA_PCH))
|
||||
CONFIG_GFX_GMA_PANEL_1_PORT := $(call strip_quotes,$(CONFIG_GFX_GMA_PANEL_1_PORT))
|
||||
CONFIG_GFX_GMA_PANEL_2_PORT := $(call strip_quotes,$(CONFIG_GFX_GMA_PANEL_2_PORT))
|
||||
CONFIG_GFX_GMA_ANALOG_I2C_PORT := $(call strip_quotes,$(CONFIG_GFX_GMA_ANALOG_I2C_PORT))
|
||||
|
@ -76,6 +78,7 @@ hw-gfx-gma-config-ads := $(subst //,/,$(call src-to-obj,,$(dir)/hw-gfx-gma-confi
|
|||
|
||||
GFX_GMA_COMMON_SUBSTITUTIONS := \
|
||||
-e's/<<GEN>>/$(CONFIG_GFX_GMA_GENERATION)/' \
|
||||
-e's/<<PCH>>/$(CONFIG_GFX_GMA_PCH)/' \
|
||||
-e's/<<PANEL_1_PORT>>/$(CONFIG_GFX_GMA_PANEL_1_PORT)/' \
|
||||
-e's/<<PANEL_2_PORT>>/$(CONFIG_GFX_GMA_PANEL_2_PORT)/' \
|
||||
-e's/<<ANALOG_I2C_PORT>>/$(CONFIG_GFX_GMA_ANALOG_I2C_PORT)/' \
|
||||
|
|
|
@ -43,6 +43,24 @@ private package HW.GFX.GMA.Config is
|
|||
|
||||
CPU_Var : constant Gen_CPU_Variant := <<CPU_VARIANT>>;
|
||||
|
||||
PCH_First : constant PCH_Type :=
|
||||
(case Gen is
|
||||
when G45 => No_PCH,
|
||||
when Ironlake => Ibex_Peak,
|
||||
when Haswell => Lynx_Point,
|
||||
when Broxton => No_PCH,
|
||||
when Skylake => Sunrise_Point);
|
||||
PCH_Last : constant PCH_Type :=
|
||||
(case Gen is
|
||||
when G45 => No_PCH,
|
||||
when Ironlake => Cougar_Point,
|
||||
when Haswell => Lynx_Point,
|
||||
when Broxton => No_PCH,
|
||||
when Skylake => Sunrise_Point);
|
||||
subtype Gen_PCH_Type is PCH_Type range PCH_First .. PCH_Last;
|
||||
|
||||
PCH : constant Gen_PCH_Type := <<PCH>>;
|
||||
|
||||
Panel_Ports : constant array (Valid_Panels) of Port_Type :=
|
||||
(Panel_1 => <<PANEL_1_PORT>>,
|
||||
Panel_2 => <<PANEL_2_PORT>>);
|
||||
|
@ -145,6 +163,11 @@ private package HW.GFX.GMA.Config is
|
|||
Broadwell_On : <hswbool> :=
|
||||
((Gen_Haswell and then CPU >= Broadwell) or Broxton_On);
|
||||
|
||||
PCH_Cougar_Point : <genbool> := Gen_Ironlake and then PCH = Cougar_Point;
|
||||
|
||||
Cougar_Point_On : <genbool> :=
|
||||
((Gen_Ironlake and then PCH >= Cougar_Point) or Haswell_On);
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Have_HDMI_Buf_Override : constant Boolean := DDI_HDMI_Buffer_Translation >= 0;
|
||||
|
@ -188,7 +211,7 @@ private package HW.GFX.GMA.Config is
|
|||
Has_New_Backlight_Control : <genbool> := Gen_Broxton;
|
||||
|
||||
----------- PCH/FDI: ---------
|
||||
Has_PCH : <genbool> := not Gen_Broxton and not Gen_G45;
|
||||
Has_PCH : <genbool> := PCH /= No_PCH;
|
||||
Has_PCH_DAC : <hswbool> :=
|
||||
(Gen_Ironlake or (Gen_Haswell and then not Is_LP));
|
||||
|
||||
|
@ -201,9 +224,9 @@ private package HW.GFX.GMA.Config is
|
|||
Has_DPLL_SEL : <genbool> := Gen_Ironlake;
|
||||
Has_FDI_BPC : <genbool> := Gen_Ironlake;
|
||||
Has_FDI_Composite_Sel : <ilkbool> := CPU_Ivybridge;
|
||||
Has_New_FDI_Sink : <ilkbool> := Sandybridge_On;
|
||||
Has_New_FDI_Sink : <genbool> := Cougar_Point_On;
|
||||
Has_New_FDI_Source : <ilkbool> := Ivybridge_On;
|
||||
Has_Trans_DP_Ctl : <ilkbool> := CPU_Sandybridge or CPU_Ivybridge;
|
||||
Has_Trans_DP_Ctl : <genbool> := PCH_Cougar_Point;
|
||||
Has_FDI_C : <ilkbool> := CPU_Ivybridge;
|
||||
|
||||
Has_FDI_RX_Power_Down : <genbool> := Gen_Haswell;
|
||||
|
|
|
@ -49,6 +49,13 @@ is
|
|||
|
||||
type CPU_Variant is (Normal, ULT, ULX);
|
||||
|
||||
type PCH_Type is
|
||||
(No_PCH,
|
||||
Ibex_Peak,
|
||||
Cougar_Point, -- Panther Point compatible
|
||||
Lynx_Point, -- Wildcat Point compatible
|
||||
Sunrise_Point); -- Union Point compatible
|
||||
|
||||
type Port_Type is
|
||||
(Disabled,
|
||||
LVDS,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_GFX_GMA_DYN_CPU = y
|
||||
CONFIG_GFX_GMA_GENERATION = Haswell
|
||||
CONFIG_GFX_GMA_PCH = Lynx_Point
|
||||
CONFIG_GFX_GMA_PANEL_1_PORT = eDP
|
||||
CONFIG_GFX_GMA_ANALOG_I2C_PORT = PCH_DAC
|
||||
CONFIG_GFX_GMA_DEFAULT_MMIO = 16\#e000_0000\#
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_GFX_GMA_DYN_CPU = y
|
||||
CONFIG_GFX_GMA_GENERATION = Ironlake
|
||||
CONFIG_GFX_GMA_PCH = Ibex_Peak
|
||||
CONFIG_GFX_GMA_PANEL_1_PORT = LVDS
|
||||
CONFIG_GFX_GMA_ANALOG_I2C_PORT = PCH_DAC
|
||||
CONFIG_GFX_GMA_DEFAULT_MMIO = 16\#e000_0000\#
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_GFX_GMA_DYN_CPU = y
|
||||
CONFIG_GFX_GMA_GENERATION = Ironlake
|
||||
CONFIG_GFX_GMA_PCH = Cougar_Point
|
||||
CONFIG_GFX_GMA_PANEL_1_PORT = eDP
|
||||
CONFIG_GFX_GMA_ANALOG_I2C_PORT = PCH_DAC
|
||||
CONFIG_GFX_GMA_DEFAULT_MMIO = 16\#e000_0000\#
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_GFX_GMA_DYN_CPU = y
|
||||
CONFIG_GFX_GMA_GENERATION = Skylake
|
||||
CONFIG_GFX_GMA_PCH = Sunrise_Point
|
||||
CONFIG_GFX_GMA_PANEL_1_PORT = eDP
|
||||
CONFIG_GFX_GMA_ANALOG_I2C_PORT = PCH_DAC
|
||||
CONFIG_GFX_GMA_DEFAULT_MMIO = 16\#e000_0000\#
|
||||
|
|
Loading…
Reference in New Issue