Commit 1e8b251e authored by Dhinakaran Pandiyan's avatar Dhinakaran Pandiyan Committed by Jani Nikula

drm/i915/psr: Avoid unnecessary DPCD read of DP_PSR_CAPS

intel_dp->psr_dpcd already has the required values.

Cc: Jose Roberto de Souza <jose.souza@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-4-dhinakaran.pandiyan@intel.com
parent 84bb2916
...@@ -197,15 +197,6 @@ void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir) ...@@ -197,15 +197,6 @@ void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir)
} }
} }
static bool intel_dp_get_y_coord_required(struct intel_dp *intel_dp)
{
uint8_t psr_caps = 0;
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_CAPS, &psr_caps) != 1)
return false;
return psr_caps & DP_PSR2_SU_Y_COORDINATE_REQUIRED;
}
static bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp) static bool intel_dp_get_colorimetry_status(struct intel_dp *intel_dp)
{ {
uint8_t dprx = 0; uint8_t dprx = 0;
...@@ -271,7 +262,7 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) ...@@ -271,7 +262,7 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp)
* GTC first. * GTC first.
*/ */
dev_priv->psr.sink_psr2_support = dev_priv->psr.sink_psr2_support =
intel_dp_get_y_coord_required(intel_dp); intel_dp->psr_dpcd[1] & DP_PSR2_SU_Y_COORDINATE_REQUIRED;
DRM_DEBUG_KMS("PSR2 %ssupported\n", DRM_DEBUG_KMS("PSR2 %ssupported\n",
dev_priv->psr.sink_psr2_support ? "" : "not "); dev_priv->psr.sink_psr2_support ? "" : "not ");
......
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