[Intel-gfx] [PATCH] drm/i915/psr: pass i915 to psr_global_enabled()

Mika Kuoppala mika.kuoppala at linux.intel.com
Mon Feb 10 11:00:25 UTC 2020


Jani Nikula <jani.nikula at intel.com> writes:

> Make future work slightly easier.
>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index db3d1561e9bf..e86e9dc1fe06 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) {
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list