Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
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 --- M common/Makefile.inc M common/hw-gfx-gma-config.ads.template M common/hw-gfx-gma.ads M configs/haswell M configs/ironlake M configs/ironlake_edp M configs/skylake 7 files changed, 24 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/62/48762/1
diff --git a/common/Makefile.inc b/common/Makefile.inc index f2a2fbb..b1ed074 100644 --- a/common/Makefile.inc +++ b/common/Makefile.inc @@ -47,11 +47,13 @@ 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 @@
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)/' \ diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template index 241fe8e..8a20ee2 100644 --- a/common/hw-gfx-gma-config.ads.template +++ b/common/hw-gfx-gma-config.ads.template @@ -43,6 +43,8 @@
CPU_Var : constant Gen_CPU_Variant := <<CPU_VARIANT>>;
+ PCH : constant PCH_Type := <<PCH>>; + Panel_Ports : constant array (Valid_Panels) of Port_Type := (Panel_1 => <<PANEL_1_PORT>>, Panel_2 => <<PANEL_2_PORT>>); @@ -145,6 +147,11 @@ 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 +195,7 @@ 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 +208,9 @@ 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; diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads index 1215fc5..b6c491f 100644 --- a/common/hw-gfx-gma.ads +++ b/common/hw-gfx-gma.ads @@ -49,6 +49,13 @@
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, diff --git a/configs/haswell b/configs/haswell index 3924572..3e8af4f 100644 --- a/configs/haswell +++ b/configs/haswell @@ -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# diff --git a/configs/ironlake b/configs/ironlake index 494b505..10e9c7b 100644 --- a/configs/ironlake +++ b/configs/ironlake @@ -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# diff --git a/configs/ironlake_edp b/configs/ironlake_edp index 90804c2..5db3aaf 100644 --- a/configs/ironlake_edp +++ b/configs/ironlake_edp @@ -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# diff --git a/configs/skylake b/configs/skylake index 773e7cf..73ecddb 100644 --- a/configs/skylake +++ b/configs/skylake @@ -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#
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
Patch Set 1: Code-Review+2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/libgfxinit/+/48762/1/common/hw-gfx-gma-config.... File common/hw-gfx-gma-config.ads.template:
https://review.coreboot.org/c/libgfxinit/+/48762/1/common/hw-gfx-gma-config.... PS1, Line 21: CPU_First : constant CPU_Type := : (case Gen is : when G45 => G45, : when Ironlake => Ironlake, : when Haswell => Haswell, : when Broxton => Broxton, : when Skylake => Skylake); : CPU_Last : constant CPU_Type := : (case Gen is : when G45 => GM45, : when Ironlake => Ivybridge, : when Haswell => Broadwell, : when Broxton => Broxton, : when Skylake => Kabylake); : CPU_Var_Last : constant CPU_Variant := : (case Gen is : when Haswell | Skylake => ULX, : when others => Normal); : subtype Gen_CPU_Type is CPU_Type range CPU_First .. CPU_Last; : subtype Gen_CPU_Variant is CPU_Variant range Normal .. CPU_Var_Last; We can set something like this up for the PCH, too, to prevent misconfiguration.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/libgfxinit/+/48762/1/common/hw-gfx-gma-config.... File common/hw-gfx-gma-config.ads.template:
https://review.coreboot.org/c/libgfxinit/+/48762/1/common/hw-gfx-gma-config.... PS1, Line 21: CPU_First : constant CPU_Type := : (case Gen is : when G45 => G45, : when Ironlake => Ironlake, : when Haswell => Haswell, : when Broxton => Broxton, : when Skylake => Skylake); : CPU_Last : constant CPU_Type := : (case Gen is : when G45 => GM45, : when Ironlake => Ivybridge, : when Haswell => Broadwell, : when Broxton => Broxton, : when Skylake => Kabylake); : CPU_Var_Last : constant CPU_Variant := : (case Gen is : when Haswell | Skylake => ULX, : when others => Normal); : subtype Gen_CPU_Type is CPU_Type range CPU_First .. CPU_Last; : subtype Gen_CPU_Variant is CPU_Variant range Normal .. CPU_Var_Last;
We can set something like this up for the PCH, too, to prevent misconfiguration.
Sounds good.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
Patch Set 1: Code-Review+1
Hello Patrick Georgi, Martin Roth, Angel Pons, Michael Niewöhner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/libgfxinit/+/48762
to look at the new patch set (#2).
Change subject: gma: Introduce `PCH_Type` ......................................................................
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 --- M common/Makefile.inc M common/hw-gfx-gma-config.ads.template M common/hw-gfx-gma.ads M configs/haswell M configs/ironlake M configs/ironlake_edp M configs/skylake 7 files changed, 40 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/62/48762/2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
Patch Set 2: Verified+1
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
Patch Set 2: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/libgfxinit/+/48762/1/common/hw-gfx-gma-config.... File common/hw-gfx-gma-config.ads.template:
https://review.coreboot.org/c/libgfxinit/+/48762/1/common/hw-gfx-gma-config.... PS1, Line 21: CPU_First : constant CPU_Type := : (case Gen is : when G45 => G45, : when Ironlake => Ironlake, : when Haswell => Haswell, : when Broxton => Broxton, : when Skylake => Skylake); : CPU_Last : constant CPU_Type := : (case Gen is : when G45 => GM45, : when Ironlake => Ivybridge, : when Haswell => Broadwell, : when Broxton => Broxton, : when Skylake => Kabylake); : CPU_Var_Last : constant CPU_Variant := : (case Gen is : when Haswell | Skylake => ULX, : when others => Normal); : subtype Gen_CPU_Type is CPU_Type range CPU_First .. CPU_Last; : subtype Gen_CPU_Variant is CPU_Variant range Normal .. CPU_Var_Last;
Sounds good.
Done
Nico Huber has submitted this change. ( https://review.coreboot.org/c/libgfxinit/+/48762 )
Change subject: gma: Introduce `PCH_Type` ......................................................................
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 --- M common/Makefile.inc M common/hw-gfx-gma-config.ads.template M common/hw-gfx-gma.ads M configs/haswell M configs/ironlake M configs/ironlake_edp M configs/skylake 7 files changed, 40 insertions(+), 3 deletions(-)
Approvals: Nico Huber: Verified Angel Pons: Looks good to me, approved Michael Niewöhner: Looks good to me, approved
diff --git a/common/Makefile.inc b/common/Makefile.inc index f2a2fbb..b1ed074 100644 --- a/common/Makefile.inc +++ b/common/Makefile.inc @@ -47,11 +47,13 @@ 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 @@
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)/' \ diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template index 241fe8e..820bf0e 100644 --- a/common/hw-gfx-gma-config.ads.template +++ b/common/hw-gfx-gma-config.ads.template @@ -43,6 +43,24 @@
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 @@ 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 @@ 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 @@ 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; diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads index 1215fc5..b6c491f 100644 --- a/common/hw-gfx-gma.ads +++ b/common/hw-gfx-gma.ads @@ -49,6 +49,13 @@
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, diff --git a/configs/haswell b/configs/haswell index 3924572..3e8af4f 100644 --- a/configs/haswell +++ b/configs/haswell @@ -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# diff --git a/configs/ironlake b/configs/ironlake index 494b505..10e9c7b 100644 --- a/configs/ironlake +++ b/configs/ironlake @@ -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# diff --git a/configs/ironlake_edp b/configs/ironlake_edp index 90804c2..5db3aaf 100644 --- a/configs/ironlake_edp +++ b/configs/ironlake_edp @@ -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# diff --git a/configs/skylake b/configs/skylake index 773e7cf..73ecddb 100644 --- a/configs/skylake +++ b/configs/skylake @@ -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#