Commit 8cf6da7e authored by Dhinakaran Pandiyan's avatar Dhinakaran Pandiyan Committed by Jani Nikula

drm/i915/psr: Avoid DPCD reads when panel does not support PSR

Ville noticed that we are unncessarily reading DPCD's after knowing
panel did not support PSR. Looks like this check that was present
earlier got removed unintentionally, let's put it back.

While we do this, add the PSR version number in the debug print.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarTarun Vyas <tarun.vyas@intel.com>
Reviewed-by: default avatarVathsala Nagaraju <vathsala.nagaraju@intel.com>
Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180511195145.3829-1-dhinakaran.pandiyan@intel.com
parent ce3508fd
...@@ -246,10 +246,12 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) ...@@ -246,10 +246,12 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd, drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd,
sizeof(intel_dp->psr_dpcd)); sizeof(intel_dp->psr_dpcd));
if (intel_dp->psr_dpcd[0]) { if (!intel_dp->psr_dpcd[0])
dev_priv->psr.sink_support = true; return;
DRM_DEBUG_KMS("Detected EDP PSR Panel.\n");
} DRM_DEBUG_KMS("eDP panel supports PSR version %x\n",
intel_dp->psr_dpcd[0]);
dev_priv->psr.sink_support = true;
if (INTEL_GEN(dev_priv) >= 9 && if (INTEL_GEN(dev_priv) >= 9 &&
(intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) { (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) {
...@@ -266,8 +268,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) ...@@ -266,8 +268,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
*/ */
dev_priv->psr.sink_psr2_support = dev_priv->psr.sink_psr2_support =
intel_dp_get_y_coord_required(intel_dp); intel_dp_get_y_coord_required(intel_dp);
DRM_DEBUG_KMS("PSR2 %s on sink", dev_priv->psr.sink_psr2_support DRM_DEBUG_KMS("PSR2 %ssupported\n",
? "supported" : "not supported"); dev_priv->psr.sink_psr2_support ? "" : "not ");
if (dev_priv->psr.sink_psr2_support) { if (dev_priv->psr.sink_psr2_support) {
dev_priv->psr.colorimetry_support = dev_priv->psr.colorimetry_support =
......
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