[Intel-gfx] [PATCH] drm/i915: Flush the execlist ports if idle
Chris Wilson
chris at chris-wilson.co.uk
Mon Jul 3 09:28:20 UTC 2017
Quoting Chris Wilson (2017-07-03 09:58:51)
> When doing a GPU reset, the CSB register will be trashed and we will
> lose any context-switch notifications that happened since the tasklet
> was disabled. If we find that all requests on this engine were
> completed, we want to make sure that the ELSP tracker is similarly empty
> so that we do not feed back in the completed requests upon recovering
> from the reset.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 28 ++++++++++++++++++----------
> 1 file changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 699868d81de8..60d86f9492c3 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1306,6 +1306,23 @@ static void reset_common_ring(struct intel_engine_cs *engine,
> {
> struct execlist_port *port = engine->execlist_port;
> struct intel_context *ce;
> + unsigned int n;
> +
> + /* Catch up with any missed context-switch interrupts */
* Ideally we would just read the remaining CSB entries now that we know
* the gpu is idle. However, the CSB registers are sometimes trashed
* across a GPU reset! Instead we have to rely on guessing the missed
* context-switch events by looking at what requests were completed.
*/
-Chris
More information about the Intel-gfx
mailing list