diff options
author | Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> | 2018-05-11 12:51:43 -0700 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2018-05-24 16:31:54 +0300 |
commit | 1e8b251ebcbbfc6bfa826bca4d91a8e1bcad2e5f (patch) | |
tree | 91a45233793db16606be0e6204c7f13a6f203bba /drivers/gpu/drm/i915/intel_psr.c | |
parent | 84bb2916a6835636fe28e8db192c3293f2d4df21 (diff) | |
download | linux-1e8b251ebcbbfc6bfa826bca4d91a8e1bcad2e5f.tar.bz2 |
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: Tarun Vyas <tarun.vyas@intel.com>
Reviewed-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180511195145.3829-4-dhinakaran.pandiyan@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_psr.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_psr.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 26dbb6097981..4f34abcacacf 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -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) { uint8_t dprx = 0; @@ -271,7 +262,7 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) * GTC first. */ 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", dev_priv->psr.sink_psr2_support ? "" : "not "); |