Commit aefaa1f4 authored by Matt Roper's avatar Matt Roper

drm/i915/rkl: Setup ports/phys

RKL uses DDI's A, B, TC1, and TC2 which need to map to combo PHY's A-D.

Bspec: 49181
Cc: Imre Deak <imre.deak@intel.com>
Cc: Aditya Swarup <aditya.swarup@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-6-matthew.d.roper@intel.comReviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent 9fa67699
...@@ -7218,30 +7218,33 @@ bool intel_phy_is_combo(struct drm_i915_private *dev_priv, enum phy phy) ...@@ -7218,30 +7218,33 @@ bool intel_phy_is_combo(struct drm_i915_private *dev_priv, enum phy phy)
{ {
if (phy == PHY_NONE) if (phy == PHY_NONE)
return false; return false;
else if (IS_ROCKETLAKE(dev_priv))
if (IS_ELKHARTLAKE(dev_priv)) return phy <= PHY_D;
else if (IS_ELKHARTLAKE(dev_priv))
return phy <= PHY_C; return phy <= PHY_C;
else if (INTEL_GEN(dev_priv) >= 11)
if (INTEL_GEN(dev_priv) >= 11)
return phy <= PHY_B; return phy <= PHY_B;
else
return false; return false;
} }
bool intel_phy_is_tc(struct drm_i915_private *dev_priv, enum phy phy) bool intel_phy_is_tc(struct drm_i915_private *dev_priv, enum phy phy)
{ {
if (INTEL_GEN(dev_priv) >= 12) if (IS_ROCKETLAKE(dev_priv))
return false;
else if (INTEL_GEN(dev_priv) >= 12)
return phy >= PHY_D && phy <= PHY_I; return phy >= PHY_D && phy <= PHY_I;
else if (INTEL_GEN(dev_priv) >= 11 && !IS_ELKHARTLAKE(dev_priv))
if (INTEL_GEN(dev_priv) >= 11 && !IS_ELKHARTLAKE(dev_priv))
return phy >= PHY_C && phy <= PHY_F; return phy >= PHY_C && phy <= PHY_F;
else
return false; return false;
} }
enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port) enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port)
{ {
if (IS_ELKHARTLAKE(i915) && port == PORT_D) if (IS_ROCKETLAKE(i915) && port >= PORT_D)
return (enum phy)port - 1;
else if (IS_ELKHARTLAKE(i915) && port == PORT_D)
return PHY_A; return PHY_A;
return (enum phy)port; return (enum phy)port;
...@@ -16818,7 +16821,12 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv) ...@@ -16818,7 +16821,12 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
if (!HAS_DISPLAY(dev_priv) || !INTEL_DISPLAY_ENABLED(dev_priv)) if (!HAS_DISPLAY(dev_priv) || !INTEL_DISPLAY_ENABLED(dev_priv))
return; return;
if (INTEL_GEN(dev_priv) >= 12) { 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 */
} else if (INTEL_GEN(dev_priv) >= 12) {
intel_ddi_init(dev_priv, PORT_A); intel_ddi_init(dev_priv, PORT_A);
intel_ddi_init(dev_priv, PORT_B); intel_ddi_init(dev_priv, PORT_B);
intel_ddi_init(dev_priv, PORT_D); intel_ddi_init(dev_priv, PORT_D);
......
...@@ -1869,9 +1869,11 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) ...@@ -1869,9 +1869,11 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
#define _ICL_COMBOPHY_A 0x162000 #define _ICL_COMBOPHY_A 0x162000
#define _ICL_COMBOPHY_B 0x6C000 #define _ICL_COMBOPHY_B 0x6C000
#define _EHL_COMBOPHY_C 0x160000 #define _EHL_COMBOPHY_C 0x160000
#define _RKL_COMBOPHY_D 0x161000
#define _ICL_COMBOPHY(phy) _PICK(phy, _ICL_COMBOPHY_A, \ #define _ICL_COMBOPHY(phy) _PICK(phy, _ICL_COMBOPHY_A, \
_ICL_COMBOPHY_B, \ _ICL_COMBOPHY_B, \
_EHL_COMBOPHY_C) _EHL_COMBOPHY_C, \
_RKL_COMBOPHY_D)
/* CNL/ICL Port CL_DW registers */ /* CNL/ICL Port CL_DW registers */
#define _ICL_PORT_CL_DW(dw, phy) (_ICL_COMBOPHY(phy) + \ #define _ICL_PORT_CL_DW(dw, phy) (_ICL_COMBOPHY(phy) + \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment