Remaining RKL patches
Subsystems (3)
v6 cover Remaining RKL patches
Pretty much the same as v5 (and v4). The only changes are:
* Extend Wa_1604555607 to RKL in patch #4.
* Add display Wa_14011224835 as a new patch #5.
Matt Roper (5):
drm/i915/rkl: Handle new DPCLKA_CFGCR0 layout drm/i915/rkl: Add DPLL4 support
drm/i915/rkl: Handle HTI
drm/i915/rkl: Add initial workarounds drm/i915/rkl: Add Wa_14011224835 for PHY B initialization
.../gpu/drm/i915/display/intel_combo_phy.c | 26 ++++++ drivers/gpu/drm/i915/display/intel_ddi.c | 18 +++- drivers/gpu/drm/i915/display/intel_display.c | 45 ++++++++-- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 50 ++++++++++- drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 1 + drivers/gpu/drm/i915/display/intel_sprite.c | 5 +- drivers/gpu/drm/i915/gt/intel_workarounds.c | 88 ++++++++++++------- drivers/gpu/drm/i915/i915_drv.h | 3 + drivers/gpu/drm/i915/i915_reg.h | 25 +++++- 9 files changed, 213 insertions(+), 48 deletions(-)
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 1/5 drm/i915/rkl: Handle new DPCLKA_CFGCR0 layout
RKL uses a slightly different bit layout for the DPCLKA_CFGCR0 register.
v2:
- Fix inverted mask application when updating ICL_DPCLKA_CFGCR0
- Checkpatch style fixes
Bspec: 50287
--- drivers/gpu/drm/i915/display/intel_ddi.c | 18 +++++++++++++++--- drivers/gpu/drm/i915/display/intel_display.c | 15 ++++++++++++--- drivers/gpu/drm/i915/i915_reg.h | 6 ++++++ 3 files changed, 33 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/display/intel_ddi.c +15 -3
@@ -2770,7 +2770,9 @@ hsw_set_signal_levels(struct intel_dp *intel_dp)static u32 icl_dpclka_cfgcr0_clk_off (struct drm_i915_private *dev_priv,enum phy phy) { -if (intel_phy_is_combo (dev_priv, phy)) { +if (IS_ROCKETLAKE (dev_priv)) { +return RKL_DPCLKA_CFGCR0_DDI_CLK_OFF (phy); + }else if (intel_phy_is_combo (dev_priv, phy)) {return ICL_DPCLKA_CFGCR0_DDI_CLK_OFF (phy); }else if (intel_phy_is_tc (dev_priv, phy)) { enum tc_port tc_port = intel_port_to_tc(dev_priv,
@@ -2797,6 +2799,16 @@ static void icl_map_plls_to_ports(struct intel_encoder *encoder, (val & icl_dpclka_cfgcr0_clk_off(dev_priv, phy)) == 0);if (intel_phy_is_combo (dev_priv, phy)) { +u32 mask, sel; + +if (IS_ROCKETLAKE (dev_priv)) { + mask =RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy); + sel =RKL_DPCLKA_CFGCR0_DDI_CLK_SEL (pll->info->id, phy); + }else { + mask =ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy); + sel =ICL_DPCLKA_CFGCR0_DDI_CLK_SEL (pll->info->id, phy); + } +/* * Even though this register references DDIs, note that we * want to pass the PHY rather than the port (DDI). For
@@ -2807,8 +2819,8 @@ static void icl_map_plls_to_ports(struct intel_encoder *encoder,* Clock Select chooses the PLL for both DDIA and DDID and * drives port A in all cases." */ - val &= ~ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy); - val |=ICL_DPCLKA_CFGCR0_DDI_CLK_SEL (pll->info->id, phy); + val &= ~mask; + val |= sel;intel_de_write (dev_priv,ICL_DPCLKA_CFGCR0 , val);intel_de_posting_read (dev_priv,ICL_DPCLKA_CFGCR0 ); }
drivers/gpu/drm/i915/display/intel_display.c +12 -3
@@ -10785,9 +10785,18 @@ static void icl_get_ddi_pll(struct drm_i915_private *dev_priv, enum port port,u32 temp;if (intel_phy_is_combo (dev_priv, phy)) { - temp =intel_de_read (dev_priv,ICL_DPCLKA_CFGCR0 ) & -ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy); - id = temp >>ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT (phy); +u32 mask, shift; + +if (IS_ROCKETLAKE (dev_priv)) { + mask =RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy); + shift =RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT (phy); + }else { + mask =ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy); + shift =ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT (phy); + } + + temp =intel_de_read (dev_priv,ICL_DPCLKA_CFGCR0 ) & mask; + id = temp >> shift; port_dpll_id =ICL_PORT_DPLL_DEFAULT ; }else if (intel_phy_is_tc (dev_priv, phy)) {u32 clk_sel =intel_de_read (dev_priv,DDI_CLK_SEL (port)) &DDI_CLK_SEL_MASK ;
drivers/gpu/drm/i915/i915_reg.h +6 -0
@@ -10195,12 +10195,18 @@ enum skl_power_gate {#define ICL_DPCLKA_CFGCR0 _MMIO(0x164280)#define ICL_DPCLKA_CFGCR0_DDI_CLK_OFF (phy) (1 << _PICK(phy, 10, 11, 24)) +#define RKL_DPCLKA_CFGCR0_DDI_CLK_OFF (phy) REG_BIT((phy) + 10)#define ICL_DPCLKA_CFGCR0_TC_CLK_OFF (tc_port) (1 << ((tc_port) < PORT_TC4 ? \ (tc_port) + 12 : \ (tc_port) - PORT_TC4 + 21))#define ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT (phy) ((phy) * 2)#define ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy) (3 << ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))#define ICL_DPCLKA_CFGCR0_DDI_CLK_SEL (pll, phy) ((pll) << ICL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy)) +#define RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT (phy) _PICK(phy, 0, 2, 4, 27) +#define RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK (phy) \ + (3 << RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy)) +#define RKL_DPCLKA_CFGCR0_DDI_CLK_SEL (pll, phy) \ + ((pll) << RKL_DPCLKA_CFGCR0_DDI_CLK_SEL_SHIFT(phy))/* CNL PLL */ #define DPLL0_ENABLE 0x46010
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 2/5 drm/i915/rkl: Add DPLL4 support
In reply to Matt RoperRocket Lake has a third DPLL (called 'DPLL4') that must be used to enable a third display. Unlike EHL's variant of DPLL4, the RKL variant behaves the same as DPLL0/1. And despite its name, the DPLL4 registers are offset as if it were DPLL2, so no extra offset handling is needed either.
v2:
- Add new .update_ref_clks() hook.
Bspec: 49202
Bspec: 49443
Bspec: 50288
Bspec: 50289
--- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +26 -3
@@ -3506,13 +3506,19 @@ static bool icl_get_combo_phy_dpll(struct intel_atomic_state *state,return false; } -if (IS_ELKHARTLAKE (dev_priv) && port !=PORT_A ) +if (IS_ROCKETLAKE (dev_priv)) { dpll_mask =BIT (DPLL_ID_EHL_DPLL4 ) |BIT (DPLL_ID_ICL_DPLL1 ) |BIT (DPLL_ID_ICL_DPLL0 ); -else + }else if (IS_ELKHARTLAKE (dev_priv) && port !=PORT_A ) { + dpll_mask = +BIT (DPLL_ID_EHL_DPLL4 ) | +BIT (DPLL_ID_ICL_DPLL1 ) | +BIT (DPLL_ID_ICL_DPLL0 ); + }else { dpll_mask =BIT (DPLL_ID_ICL_DPLL1 ) |BIT (DPLL_ID_ICL_DPLL0 ); + } port_dpll->pll = intel_find_shared_dpll(state, crtc, &port_dpll->hw_state,
@@ -4275,6 +4281,21 @@ static const struct intel_dpll_mgr tgl_pll_mgr = { .dump_hw_state = icl_dump_hw_state, }; +static const struct dpll_info rkl_plls[] = { + {"DPLL 0" , &combo_pll_funcs,DPLL_ID_ICL_DPLL0 ,0 }, + {"DPLL 1" , &combo_pll_funcs,DPLL_ID_ICL_DPLL1 ,0 }, + {"DPLL 4" , &combo_pll_funcs,DPLL_ID_EHL_DPLL4 ,0 }, + { }, +}; + +static const struct intel_dpll_mgr rkl_pll_mgr = { + .dpll_info = rkl_plls, + .get_dplls = icl_get_dplls, + .put_dplls = icl_put_dplls, + .update_ref_clks = icl_update_dpll_ref_clks, + .dump_hw_state = icl_dump_hw_state, +}; +/** * intel_shared_dpll_init - Initialize shared DPLLs * @dev: drm device
@@ -4288,7 +4309,9 @@ void intel_shared_dpll_init(struct drm_device *dev)const struct dpll_info *dpll_info;int i; -if (INTEL_GEN (dev_priv) >=12 ) +if (IS_ROCKETLAKE (dev_priv)) + dpll_mgr = &rkl_pll_mgr; +else if (INTEL_GEN (dev_priv) >=12 ) dpll_mgr = &tgl_pll_mgr;else if (IS_ELKHARTLAKE (dev_priv)) dpll_mgr = &ehl_pll_mgr;
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v6 2/5] drm/i915/rkl: Add DPLL4 support
Quoted 24 lines · Matt Roper
Rocket Lake has a third DPLL (called 'DPLL4') that must be used to enable a third display. Unlike EHL's variant of DPLL4, the RKL variant behaves the same as DPLL0/1. And despite its name, the DPLL4 registers are offset as if it were DPLL2, so no extra offset handling is needed either.
v2:
- Add new .update_ref_clks() hook.Bspec: 49202
Bspec: 49443
Bspec: 50288
Bspec: 50289Cc Lucas De Marchi <[email protected]>Signed-off-by Matt Roper <[email protected]>---
drivers/gpu/drm/i915/display/intel_dpll_mgr.c| 29 +++++++++++++++++--1 file changed, 26 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/display/intel_dpll_mgr.c +0
-0
drivers/gpu/drm/i915/display/intel_dpll_mgr.c static bool icl_get_combo_phy_dpll(struct intel_atomic_state *state, · line 3513
Quoted 9 lines
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +1
-1@@ -3506,13 +3506,19 @@ static bool icl_get_combo_phy_dpll(struct intel_atomic_state *state,return false; } -if (IS_ELKHARTLAKE (dev_priv) && port !=PORT_A ) +if (IS_ROCKETLAKE (dev_priv)) { dpll_mask =BIT (DPLL_ID_EHL_DPLL4 ) |BIT (DPLL_ID_ICL_DPLL1 ) |BIT (DPLL_ID_ICL_DPLL0 );
I don't think that is sufficient. As you said in the commit message, here DPLL4 are much like DPLL0, DPLL1 rather than the special treatment it has in EHL.
That means we need to update the places making use of it. Example:TGL_DPLL_CFGCR0()TGL_DPLL_CFGCR1()
The way it is now, it would basically be using the address 0x16429C / 0x1642A0 that are actually for TBT
Looking at bspec 50288, it seems we should reorder the IDs to be DPLL0, DPLL1, DPLL4, TBTPLL. Then we can go back and use _MMIO_PLL() rather than _MMIO_PLL3(). There is even a "TODO" in the right place in the source code for that, although I don't remember if in TGL it has any special. I think we never added it for TGL just because with 2 combo ports you will never need 3 PLLs.
Lucas De Marchi
Quoted 52 lines
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +25
-2-else + }else if (IS_ELKHARTLAKE (dev_priv) && port !=PORT_A ) { + dpll_mask = +BIT (DPLL_ID_EHL_DPLL4 ) | +BIT (DPLL_ID_ICL_DPLL1 ) | +BIT (DPLL_ID_ICL_DPLL0 ); + }else { dpll_mask =BIT (DPLL_ID_ICL_DPLL1 ) |BIT (DPLL_ID_ICL_DPLL0 ); + } port_dpll->pll = intel_find_shared_dpll(state, crtc, &port_dpll->hw_state,@@ -4275,6 +4281,21 @@ static const struct intel_dpll_mgr tgl_pll_mgr = { .dump_hw_state = icl_dump_hw_state, }; +static const struct dpll_info rkl_plls[] = { + {"DPLL 0" , &combo_pll_funcs,DPLL_ID_ICL_DPLL0 ,0 }, + {"DPLL 1" , &combo_pll_funcs,DPLL_ID_ICL_DPLL1 ,0 }, + {"DPLL 4" , &combo_pll_funcs,DPLL_ID_EHL_DPLL4 ,0 }, + { }, +}; + +static const struct intel_dpll_mgr rkl_pll_mgr = { + .dpll_info = rkl_plls, + .get_dplls = icl_get_dplls, + .put_dplls = icl_put_dplls, + .update_ref_clks = icl_update_dpll_ref_clks, + .dump_hw_state = icl_dump_hw_state, +}; +/** * intel_shared_dpll_init - Initialize shared DPLLs * @dev: drm device @@ -4288,7 +4309,9 @@ void intel_shared_dpll_init(struct drm_device *dev)const struct dpll_info *dpll_info;int i; -if (INTEL_GEN (dev_priv) >=12 ) +if (IS_ROCKETLAKE (dev_priv)) + dpll_mgr = &rkl_pll_mgr; +else if (INTEL_GEN (dev_priv) >=12 ) dpll_mgr = &tgl_pll_mgr;else if (IS_ELKHARTLAKE (dev_priv)) dpll_mgr = &ehl_pll_mgr;Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 3/5 drm/i915/rkl: Handle HTI
In reply to Matt RoperIf HTI (also sometimes called HDPORT) is enabled at startup, it may be using some of the PHYs and DPLLs making them unavailable for general usage. Let's read out the HDPORT_STATE register and avoid making use of resources that HTI is already using.
v2:
- Fix minor checkpatch warnings
Bspec: 49189
Bspec: 53707
--- drivers/gpu/drm/i915/display/intel_display.c | 30 ++++++++++++++++--- drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 21 +++++++++++++ drivers/gpu/drm/i915/display/intel_dpll_mgr.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_reg.h | 6 ++++ 5 files changed, 57 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +26 -4
@@ -46,6 +46,7 @@#include "display/intel_ddi.h" #include "display/intel_dp.h" #include "display/intel_dp_mst.h" +#include "display/intel_dpll_mgr.h" #include "display/intel_dsi.h" #include "display/intel_dvo.h" #include "display/intel_gmbus.h"
@@ -16814,6 +16815,13 @@ static void intel_pps_init(struct drm_i915_private *dev_priv)intel_pps_unlock_regs_wa (dev_priv); } +static bool hti_uses_phy (u32 hdport_state,enum phy phy) +{ +return hdport_state &HDPORT_ENABLED && + (hdport_state &HDPORT_PHY_USED_DP (phy) || + hdport_state &HDPORT_PHY_USED_HDMI (phy)); +} +static void intel_setup_outputs (struct drm_i915_private *dev_priv) {struct intel_encoder *encoder;
@@ -16825,10 +16833,22 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)return ;if (IS_ROCKETLAKE (dev_priv)) { -intel_ddi_init (dev_priv,PORT_A ); -intel_ddi_init (dev_priv,PORT_B ); -intel_ddi_init (dev_priv,PORT_D );/* DDI TC1 */ -intel_ddi_init (dev_priv,PORT_E );/* DDI TC2 */ +/* +* If HTI (aka HDPORT) is enabled at boot, it may have taken +* over some of the PHYs and made them unavailable to the +* driver. In that case we should skip initializing the +* corresponding outputs. +*/ +u32 hdport_state =intel_de_read (dev_priv,HDPORT_STATE ); + +if (!hti_uses_phy (hdport_state,PHY_A )) +intel_ddi_init (dev_priv,PORT_A ); +if (!hti_uses_phy (hdport_state,PHY_B )) +intel_ddi_init (dev_priv,PORT_B ); +if (!hti_uses_phy (hdport_state,PHY_C )) +intel_ddi_init (dev_priv,PORT_D );/* DDI TC1 */ +if (!hti_uses_phy (hdport_state,PHY_D )) +intel_ddi_init (dev_priv,PORT_E );/* DDI TC2 */ }else if (INTEL_GEN (dev_priv) >=12 ) {intel_ddi_init (dev_priv,PORT_A );intel_ddi_init (dev_priv,PORT_B );
@@ -18376,6 +18396,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)intel_dpll_readout_hw_state (dev_priv); + dev_priv->hti_pll_mask =intel_get_hti_plls (dev_priv); +for_each_intel_encoder (dev, encoder) { pipe =0 ;
drivers/gpu/drm/i915/display/intel_dpll_mgr.c +21 -0
@@ -265,6 +265,24 @@ void intel_disable_shared_dpll(const struct intel_crtc_state *crtc_state)mutex_unlock (&dev_priv->dpll.lock); } +/* +* HTI (aka HDPORT) may be using some of the platform's PLL's, making them +* unavailable for use. +*/ +u32 intel_get_hti_plls (struct drm_i915_private *dev_priv) +{ +u32 hdport_state; + +if (!IS_ROCKETLAKE (dev_priv)) +return 0 ; + + hdport_state =intel_de_read (dev_priv,HDPORT_STATE ); +if (!(hdport_state &HDPORT_ENABLED )) +return 0 ; + +return REG_FIELD_GET (HDPORT_DPLL_USED_MASK , hdport_state); +} +static struct intel_shared_dpll * intel_find_shared_dpll(struct intel_atomic_state *state, const struct intel_crtc *crtc,
@@ -280,6 +298,9 @@ intel_find_shared_dpll(struct intel_atomic_state *state,drm_WARN_ON (&dev_priv->drm, dpll_mask & ~(BIT (I915_NUM_PLLS ) -1 )); +/* Eliminate DPLLs from consideration if reserved by HTI */ + dpll_mask &= ~dev_priv->hti_pll_mask; +for_each_set_bit (i, &dpll_mask,I915_NUM_PLLS ) { pll = &dev_priv->dpll.shared_dplls[i];
drivers/gpu/drm/i915/display/intel_dpll_mgr.h +1 -0
@@ -390,6 +390,7 @@ void intel_shared_dpll_swap_state(struct intel_atomic_state *state);void intel_shared_dpll_init (struct drm_device *dev);void intel_dpll_readout_hw_state (struct drm_i915_private *dev_priv);void intel_dpll_sanitize_state (struct drm_i915_private *dev_priv); +u32 intel_get_hti_plls (struct drm_i915_private *dev_priv);void intel_dpll_dump_hw_state (struct drm_i915_private *dev_priv,const struct intel_dpll_hw_state *hw_state);
drivers/gpu/drm/i915/i915_drv.h +3 -0
@@ -1037,6 +1037,9 @@ struct drm_i915_private {struct intel_l3_parity l3_parity; +/* Mask of PLLs reserved for use by HTI and unavailable to driver. */ +u32 hti_pll_mask; +/* * edram size in MB. * Cannot be determined by PCIID. You must always read a register.
drivers/gpu/drm/i915/i915_reg.h +6 -0
@@ -2909,6 +2909,12 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define MBUS_BBOX_CTL_S1 _MMIO(0x45040)#define MBUS_BBOX_CTL_S2 _MMIO(0x45044) +#define HDPORT_STATE _MMIO(0x45050) +#define HDPORT_DPLL_USED_MASK REG_GENMASK(14, 12) +#define HDPORT_PHY_USED_DP (phy) REG_BIT(2 * (phy) + 2) +#define HDPORT_PHY_USED_HDMI (phy) REG_BIT(2 * (phy) + 1) +#define HDPORT_ENABLED REG_BIT(0) +/* Make render/texture TLB fetches lower priorty than associated data * fetches. This is not turned on by default */
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 4/5 drm/i915/rkl: Add initial workarounds
In reply to Matt RoperRKL and TGL share some general gen12 workarounds, but each platform also has its own platform-specific workarounds.
v2:
- Add Wa_1604555607 for RKL. This makes RKL's ctx WA list identical to TGL's, so we'll have both functions call the tgl_ function for now; this workaround isn't listed for DG1 so we don't want to add it to the general gen12_ function.
--- drivers/gpu/drm/i915/display/intel_sprite.c | 5 +- drivers/gpu/drm/i915/gt/intel_workarounds.c | 88 +++++++++++++-------- 2 files changed, 59 insertions(+), 34 deletions(-)
drivers/gpu/drm/i915/display/intel_sprite.c +3 -2
@@ -2842,8 +2842,9 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,static bool gen12_plane_supports_mc_ccs (struct drm_i915_private *dev_priv,enum plane_id plane_id) { -/* Wa_14010477008:tgl[a0..c0] */ -if (IS_TGL_REVID (dev_priv,TGL_REVID_A0 ,TGL_REVID_C0 )) +/* Wa_14010477008:tgl[a0..c0],rkl[all] */ +if (IS_ROCKETLAKE (dev_priv) || +IS_TGL_REVID (dev_priv,TGL_REVID_A0 ,TGL_REVID_C0 ))return false;return plane_id <PLANE_SPRITE4 ;
drivers/gpu/drm/i915/gt/intel_workarounds.c +56 -32
154 lines not on this page · raw message
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v6 5/5 drm/i915/rkl: Add Wa_14011224835 for PHY B initialization
In reply to Matt RoperAfter doing normal PHY-B initialization on Rocket Lake, we need to manually copy some additional PHY-A register values into PHY-B registers.
Note that the bspec's combo phy page doesn't specify that this workaround is restricted to specific platform steppings (and doesn't even do a very good job of specifying that RKL is the only platform this is needed on), but the RKL workaround page lists this as relevant only for A and B steppings, so I'm trusting that information for now.
Bspec: 49291
Bspec: 53273
--- .../gpu/drm/i915/display/intel_combo_phy.c | 26 +++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 13 +++++++++- 2 files changed, 38 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_combo_phy.c +26 -0
@@ -338,6 +338,27 @@ void intel_combo_phy_power_up_lanes(struct drm_i915_private *dev_priv,intel_de_write (dev_priv,ICL_PORT_CL_DW10 (phy), val); } +void rkl_combo_phy_b_init_wa (struct drm_i915_private *i915) +{ +u32 grccode, grccode_ldo; +u32 iref_rcal_ord, rcompcode_ld_cap_ov; + +intel_de_wait_for_register (i915,ICL_PORT_COMP_DW3 (PHY_A ), +FIRST_COMP_DONE ,FIRST_COMP_DONE ,100 ); + + grccode =REG_FIELD_GET (GRCCODE , +intel_de_read (i915,ICL_PORT_COMP_DW6 (PHY_A ))); + iref_rcal_ord =REG_FIELD_PREP (IREF_RCAL_ORD , grccode); +intel_de_rmw (i915,ICL_PORT_COMP_DW2 (PHY_B ),IREF_RCAL_ORD , + iref_rcal_ord |IREF_RCAL_ORD_EN ); + + grccode_ldo =REG_FIELD_GET (GRCCODE_LDO , +intel_de_read (i915,ICL_PORT_COMP_DW0 (PHY_A ))); + rcompcode_ld_cap_ov =REG_FIELD_PREP (RCOMPCODE_LD_CAP_OV , grccode_ldo); +intel_de_rmw (i915,ICL_PORT_COMP_DW6 (PHY_B ),RCOMPCODE_LD_CAP_OV , + rcompcode_ld_cap_ov |RCOMPCODEOVEN_LDO_SYNC ); +} +static void icl_combo_phys_init (struct drm_i915_private *dev_priv) {enum phy phy;
@@ -390,6 +411,11 @@ static void icl_combo_phys_init(struct drm_i915_private *dev_priv) val =intel_de_read (dev_priv,ICL_PORT_CL_DW5 (phy)); val |=CL_POWER_DOWN_ENABLE ;intel_de_write (dev_priv,ICL_PORT_CL_DW5 (phy), val); + +if (IS_RKL_REVID (dev_priv,RKL_REVID_A0 ,RKL_REVID_B0 ) && + phy ==PHY_B ) +/* Wa_14011224835:rkl[a0..c0] */ +rkl_combo_phy_b_init_wa (dev_priv); } }
drivers/gpu/drm/i915/i915_reg.h +12 -1
@@ -1909,11 +1909,16 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define CNL_PORT_COMP_DW0 _MMIO(0x162100)#define ICL_PORT_COMP_DW0 (phy) _MMIO(_ICL_PORT_COMP_DW(0, phy)) -#define COMP_INIT (1 << 31) +#define COMP_INIT REG_BIT(31) +#define GRCCODE_LDO REG_GENMASK(7, 0)#define CNL_PORT_COMP_DW1 _MMIO(0x162104)#define ICL_PORT_COMP_DW1 (phy) _MMIO(_ICL_PORT_COMP_DW(1, phy)) +#define ICL_PORT_COMP_DW2 (phy) _MMIO(_ICL_PORT_COMP_DW(2, phy)) +#define IREF_RCAL_ORD_EN REG_BIT(7) +#define IREF_RCAL_ORD REG_GENMASK(6, 0) +#define CNL_PORT_COMP_DW3 _MMIO(0x16210c)#define ICL_PORT_COMP_DW3 (phy) _MMIO(_ICL_PORT_COMP_DW(3, phy))#define PROCESS_INFO_DOT_0 (0 << 26)
@@ -1926,6 +1931,12 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define VOLTAGE_INFO_1_05V (2 << 24)#define VOLTAGE_INFO_MASK (3 << 24)#define VOLTAGE_INFO_SHIFT 24 +#define FIRST_COMP_DONE REG_BIT(22) + +#define ICL_PORT_COMP_DW6 (phy) _MMIO(_ICL_PORT_COMP_DW(6, phy)) +#define GRCCODE REG_GENMASK(30, 24) +#define RCOMPCODEOVEN_LDO_SYNC REG_BIT(23) +#define RCOMPCODE_LD_CAP_OV REG_GENMASK(22, 16)#define ICL_PORT_COMP_DW8 (phy) _MMIO(_ICL_PORT_COMP_DW(8, phy))#define IREFGEN (1 << 24)
Signature · 6 lines
2.24.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Remaining RKL patches (rev5)
In reply to Matt Roper== Series Details ==
== Series Details ==
Series: Remaining RKL patches (rev5)
URL : https://patchwork.freedesktop.org/series/77971/
State : warning
== Summary ==
$ dim sparse --fast origin/drm-tip Sparse version: v0.6.0 Fast mode used, each commit won't be checked separately. +drivers/gpu/drm/i915/display/intel_combo_phy.c:341:6: warning: symbol 'rkl_combo_phy_b_init_wa' was not declared. Should it be static?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for Remaining RKL patches (rev5)
In reply to Matt Roper== Series Details ==
== Series Details ==
Series: Remaining RKL patches (rev5)
URL : https://patchwork.freedesktop.org/series/77971/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8637 -> Patchwork_17973
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/index.html
Known issues
------------
Here are the changes found in Patchwork_17973 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_module_load@reload:
- fi-byt-j1900: [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-byt-j1900/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-byt-j1900/igt@[email protected]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-bsw-kefka/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-bsw-kefka/igt@[email protected]
* igt@kms_busy@basic@flip:
- fi-kbl-x1275: [PASS][5] -> [DMESG-WARN][6] ([i915#62] / [i915#92] / [i915#95])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-kbl-x1275/igt@kms_busy@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-kbl-x1275/igt@kms_busy@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- fi-icl-guc: [PASS][7] -> [DMESG-WARN][8] ([i915#1982])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-icl-guc/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-icl-guc/igt@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
- fi-icl-u2: [PASS][9] -> [DMESG-WARN][10] ([i915#1982])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-icl-u2/igt@kms_flip@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-icl-u2/igt@kms_flip@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s0:
- fi-tgl-u2: [FAIL][11] ([i915#1888]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-tgl-u2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-tgl-u2/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-glk-dsi: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-glk-dsi/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-glk-dsi/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-icl-y: [INCOMPLETE][15] -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-icl-y/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-icl-y/igt@i915_selftest@[email protected]
* igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1:
- fi-icl-u2: [DMESG-WARN][17] ([i915#1982]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-icl-u2/igt@kms_flip@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-icl-u2/igt@kms_flip@[email protected]
#### Warnings ####
* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [SKIP][19] ([fdo#109271]) -> [DMESG-FAIL][20] ([i915#62])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-kbl-x1275/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-kbl-x1275/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size:
- fi-kbl-x1275: [DMESG-WARN][21] ([i915#62] / [i915#92]) -> [DMESG-WARN][22] ([i915#62] / [i915#92] / [i915#95]) +4 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-kbl-x1275/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-kbl-x1275/igt@[email protected]
* igt@kms_force_connector_basic@force-edid:
- fi-kbl-x1275: [DMESG-WARN][23] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][24] ([i915#62] / [i915#92]) +6 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8637/fi-kbl-x1275/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/fi-kbl-x1275/igt@[email protected]
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (47 -> 42)
------------------------------
Missing (5): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_8637 -> Patchwork_17973
CI-20190529: 20190529
CI_DRM_8637: 091db6eff650d91a12485725f764bc60909344fb @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5711: 90611a0c90afa4a46496c78a4faf9638a1538ac3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17973: 1d222fefb84f2d28b15a164a357f39db9d3f35e6 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
1d222fefb84f drm/i915/rkl: Add Wa_14011224835 for PHY B initialization fae694548268 drm/i915/rkl: Add initial workarounds 1a857648140e drm/i915/rkl: Handle HTIb9801bb978f8 drm/i915/rkl: Add DPLL4 support54d1bd2f5f04 drm/i915/rkl: Handle new DPCLKA_CFGCR0 layout
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17973/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx