Commit ace98ffc authored by Anusha Srivatsa's avatar Anusha Srivatsa
Browse files

drm/i915/display: Cleanup intel_phy_is_combo()



Cleanup the intel_phy_is_combo
to accommodate for cases where combo phy is not available.

v2: retain comment that explains DG2 returning false from
intel_phy_is_combo() (Arun)

Cc: Arun R Murthy <arun.r.murthy@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarAnusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Reviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220725225028.98612-1-anusha.srivatsa@intel.com
parent 3565c721
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
@@ -2082,22 +2082,20 @@ 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_DG2(dev_priv))
		/*
		 * DG2 outputs labelled as "combo PHY" in the bspec use
		 * SNPS PHYs with completely different programming,
		 * hence we always return false here.
		 */
		return false;
	else if (IS_ALDERLAKE_S(dev_priv))
	else if (IS_ALDERLAKE_S(dev_priv))
		return phy <= PHY_E;
		return phy <= PHY_E;
	else if (IS_DG1(dev_priv) || IS_ROCKETLAKE(dev_priv))
	else if (IS_DG1(dev_priv) || IS_ROCKETLAKE(dev_priv))
		return phy <= PHY_D;
		return phy <= PHY_D;
	else if (IS_JSL_EHL(dev_priv))
	else if (IS_JSL_EHL(dev_priv))
		return phy <= PHY_C;
		return phy <= PHY_C;
	else if (DISPLAY_VER(dev_priv) >= 11)
	else if (IS_ALDERLAKE_P(dev_priv) || IS_DISPLAY_VER(dev_priv, 11, 12))
		return phy <= PHY_B;
		return phy <= PHY_B;
	else
	else
		/*
		 * DG2 outputs labelled as "combo PHY" in the bspec use
		 * SNPS PHYs with completely different programming,
		 * hence we always return false here.
		 */
		return false;
		return false;
}
}