[Intel-gfx] [PATCH 3/9] drm/i915/pmu: Suspend sampling when GPU is idle

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 25 09:13:49 UTC 2017


Quoting Tvrtko Ursulin (2017-10-25 10:06:01)
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index bafe1cdd57d8..08bbceaeb9b8 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3349,6 +3349,7 @@ i915_gem_idle_work_handler(struct work_struct *work)
>  
>         intel_engines_mark_idle(dev_priv);
>         i915_gem_timelines_mark_idle(dev_priv);
> +       i915_pmu_gt_idle(dev_priv);

Heads up, the new trend here is to use "park". Does i915_pmu_park_gt()
or i915_pmu_gt_park() work for you?

>  
>         GEM_BUG_ON(!dev_priv->gt.awake);
>         dev_priv->gt.awake = false;
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index d140fcf5c6a3..165988932c8b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -258,6 +258,7 @@ static void mark_busy(struct drm_i915_private *i915)
>         i915_update_gfx_val(i915);
>         if (INTEL_GEN(i915) >= 6)
>                 gen6_rps_busy(i915);
> +       i915_pmu_gt_active(i915);

And unpark here.
-Chris


More information about the Intel-gfx mailing list