drm/i915/psr: Avoid initializing PSR if there is no sink support.
DPCD read for the eDP is complete by the time intel_psr_init() is called, which means we can avoid initializing PSR structures and state if there is no sink support. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180103213824.1405-3-dhinakaran.pandiyan@intel.com
This commit is contained in:

committed by
Rodrigo Vivi

parent
4371d89601
commit
c9ef291a7e
@@ -503,6 +503,9 @@ void intel_psr_enable(struct intel_dp *intel_dp,
|
||||
if (!crtc_state->has_psr)
|
||||
return;
|
||||
|
||||
if (WARN_ON(!CAN_PSR(dev_priv)))
|
||||
return;
|
||||
|
||||
WARN_ON(dev_priv->drrs.dp);
|
||||
mutex_lock(&dev_priv->psr.lock);
|
||||
if (dev_priv->psr.enabled) {
|
||||
@@ -633,6 +636,9 @@ void intel_psr_disable(struct intel_dp *intel_dp,
|
||||
if (!old_crtc_state->has_psr)
|
||||
return;
|
||||
|
||||
if (WARN_ON(!CAN_PSR(dev_priv)))
|
||||
return;
|
||||
|
||||
mutex_lock(&dev_priv->psr.lock);
|
||||
if (!dev_priv->psr.enabled) {
|
||||
mutex_unlock(&dev_priv->psr.lock);
|
||||
@@ -913,6 +919,9 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
|
||||
dev_priv->psr_mmio_base = IS_HASWELL(dev_priv) ?
|
||||
HSW_EDP_PSR_BASE : BDW_EDP_PSR_BASE;
|
||||
|
||||
if (!dev_priv->psr.sink_support)
|
||||
return;
|
||||
|
||||
/* Per platform default: all disabled. */
|
||||
if (i915_modparams.enable_psr == -1)
|
||||
i915_modparams.enable_psr = 0;
|
||||
|
Reference in New Issue
Block a user