diff mbox series

[02/14] drm/i915: Restrict gen6_reset_rps_interrupts to gen6+

Message ID 20180812223642.24865-2-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [01/14] drm/i915: Cleanup gt powerstate from gem | expand

Commit Message

Chris Wilson Aug. 12, 2018, 10:36 p.m. UTC
Do not call gen6_reset_rps_interrupts() when we know the registers do not
exist.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mika Kuoppala Aug. 13, 2018, 4:09 p.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> Do not call gen6_reset_rps_interrupts() when we know the registers do not
> exist.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

This makes me wonder about adding some known gen6+ debug
register range assertions to I915_WRITE when gen < 6.

i915.mmio_debug for all (gens) :)

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

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 03654f5f68c3..9a01560c5bd1 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -8260,7 +8260,7 @@ void intel_sanitize_gt_powersave(struct drm_i915_private *dev_priv)
>  
>  	if (INTEL_GEN(dev_priv) >= 11)
>  		gen11_reset_rps_interrupts(dev_priv);
> -	else
> +	else if (INTEL_GEN(dev_priv) >= 6)
>  		gen6_reset_rps_interrupts(dev_priv);
>  }
>  
> -- 
> 2.18.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 03654f5f68c3..9a01560c5bd1 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -8260,7 +8260,7 @@  void intel_sanitize_gt_powersave(struct drm_i915_private *dev_priv)
 
 	if (INTEL_GEN(dev_priv) >= 11)
 		gen11_reset_rps_interrupts(dev_priv);
-	else
+	else if (INTEL_GEN(dev_priv) >= 6)
 		gen6_reset_rps_interrupts(dev_priv);
 }