From: Jani Nikula Date: Tue, 4 Feb 2020 13:52:17 +0000 (+0200) Subject: drm/i915/psr: pass i915 to psr_global_enabled() X-Git-Tag: baikal/mips/sdk5.9~13997^2~18^2~114 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=515abebeb2537604398d979cac1ae69810809d15;p=kernel.git drm/i915/psr: pass i915 to psr_global_enabled() Make future work slightly easier. Reviewed-by: Mika Kuoppala Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200204135217.21974-1-jani.nikula@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index db3d1561e9bf7..e86e9dc1fe06f 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -61,9 +61,9 @@ * must be correctly synchronized/cancelled when shutting down the pipe." */ -static bool psr_global_enabled(u32 debug) +static bool psr_global_enabled(struct drm_i915_private *i915) { - switch (debug & I915_PSR_DEBUG_MODE_MASK) { + switch (i915->psr.debug & I915_PSR_DEBUG_MODE_MASK) { case I915_PSR_DEBUG_DEFAULT: return i915_modparams.enable_psr; case I915_PSR_DEBUG_DISABLE: @@ -930,7 +930,7 @@ void intel_psr_enable(struct intel_dp *intel_dp, mutex_lock(&dev_priv->psr.lock); - if (!psr_global_enabled(dev_priv->psr.debug)) { + if (!psr_global_enabled(dev_priv)) { drm_dbg_kms(&dev_priv->drm, "PSR disabled by flag\n"); goto unlock; } @@ -1085,7 +1085,7 @@ void intel_psr_update(struct intel_dp *intel_dp, mutex_lock(&dev_priv->psr.lock); - enable = crtc_state->has_psr && psr_global_enabled(psr->debug); + enable = crtc_state->has_psr && psr_global_enabled(dev_priv); psr2_enable = intel_psr2_enabled(dev_priv, crtc_state); if (enable == psr->enabled && psr2_enable == psr->psr2_enabled) {