Commit 58d4ad50 authored by Jani Nikula's avatar Jani Nikula

drm/i915/psr: pass i915 to psr_global_enabled()

Make future work slightly easier.
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200204135217.21974-1-jani.nikula@intel.com
parent 27495962
...@@ -61,9 +61,9 @@ ...@@ -61,9 +61,9 @@
* must be correctly synchronized/cancelled when shutting down the pipe." * 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: case I915_PSR_DEBUG_DEFAULT:
return i915_modparams.enable_psr; return i915_modparams.enable_psr;
case I915_PSR_DEBUG_DISABLE: case I915_PSR_DEBUG_DISABLE:
...@@ -930,7 +930,7 @@ void intel_psr_enable(struct intel_dp *intel_dp, ...@@ -930,7 +930,7 @@ void intel_psr_enable(struct intel_dp *intel_dp,
mutex_lock(&dev_priv->psr.lock); 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"); drm_dbg_kms(&dev_priv->drm, "PSR disabled by flag\n");
goto unlock; goto unlock;
} }
...@@ -1085,7 +1085,7 @@ void intel_psr_update(struct intel_dp *intel_dp, ...@@ -1085,7 +1085,7 @@ void intel_psr_update(struct intel_dp *intel_dp,
mutex_lock(&dev_priv->psr.lock); 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); psr2_enable = intel_psr2_enabled(dev_priv, crtc_state);
if (enable == psr->enabled && psr2_enable == psr->psr2_enabled) { if (enable == psr->enabled && psr2_enable == psr->psr2_enabled) {
......
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