[Intel-gfx] [PATCH 06/62] drm/i915: Flush the RPS bottom-half when the GPU idles
Michał Winiarski
michal.winiarski at intel.com
Thu Jun 16 08:49:17 UTC 2016
On Fri, Jun 03, 2016 at 05:36:31PM +0100, Chris Wilson wrote:
> Make sure that the RPS bottom-half is flushed before we set the idle
> frequency when we decide the GPU is idle. This should prevent any races
> with the bottom-half and setting the idle frequency, and ensures that
> the bottom-half is bounded by the GPU's rpm reference taken for when it
> is active (i.e. between gen6_rps_busy() and gen6_rps_idle()).
>
> v2: Avoid recursively using the i915->wq - RPS does not touch the
> struct_mutex so has no place being on the ordered i915->wq.
> v3: Enable/disable interrupts for RPS busy/idle in order to prevent
> further HW access from RPS outside of the wakeref.
The race can be easily observed since:
commit aed242ff7ebb697e4dff912bd4dc7ec7192f7581
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Mar 18 09:48:21 2015 +0000
drm/i915: Relax RPS contraints to allows setting minfreq on idle
Because idle_freq != min_freq_softlimit for BDW and HSW - we see a failure in
pm_rps. Flushing RPS bottom-half partially fixes that. We need to either modify
the test to match the current behaviour, or switch back to min_freq_softlimit
as soon as we transition idle->active.
References: https://bugs.freedesktop.org/show_bug.cgi?id=89728
Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>
-Michał
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 3 ---
> drivers/gpu/drm/i915/i915_irq.c | 32 ++++++++++++--------------------
> drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++++----
> 3 files changed, 22 insertions(+), 27 deletions(-)
More information about the Intel-gfx
mailing list