From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: Chris Wilson <chris@chris-wilson.co.uk>, Mika Kuoppala <mika.kuoppala@intel.com>, "# v4 . 10+" <stable@vger.kernel.org> Subject: [PATCH 1/2] drm/i915/execlists: Wrap tail pointer after reset tweaking Date: Mon, 27 Mar 2017 04:28:14 +0100 [thread overview] Message-ID: <20170327032815.19504-1-chris@chris-wilson.co.uk> (raw) If the request->wa_tail is 0 (because it landed exactly on the end of the ringbuffer), when we reconstruct request->tail following a reset we fill in an illegal value (-8 or 0x001ffff8). As a result, RING_HEAD is never able to catch up with RING_TAIL and the GPU spins endlessly. If the ring contains a couple of breadcrumbs, even our hangcheck is unable to catch the busy-looping as the ACTHD and seqno continually advance. Fixes: a3aabe86a340 ("drm/i915/execlists: Reinitialise context image after GPU hang") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: <stable@vger.kernel.org> # v4.10+ --- drivers/gpu/drm/i915/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 3fdabba0a32d..c8dd848d2ebe 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1302,6 +1302,7 @@ static void reset_common_ring(struct intel_engine_cs *engine, /* Reset WaIdleLiteRestore:bdw,skl as well */ request->tail = request->wa_tail - WA_TAIL_DWORDS * sizeof(u32); + request->tail &= request->ring->size - 1; GEM_BUG_ON(!IS_ALIGNED(request->tail, 8)); } -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: Mika Kuoppala <mika.kuoppala@intel.com>, "# v4 . 10+" <stable@vger.kernel.org> Subject: [PATCH 1/2] drm/i915/execlists: Wrap tail pointer after reset tweaking Date: Mon, 27 Mar 2017 04:28:14 +0100 [thread overview] Message-ID: <20170327032815.19504-1-chris@chris-wilson.co.uk> (raw) If the request->wa_tail is 0 (because it landed exactly on the end of the ringbuffer), when we reconstruct request->tail following a reset we fill in an illegal value (-8 or 0x001ffff8). As a result, RING_HEAD is never able to catch up with RING_TAIL and the GPU spins endlessly. If the ring contains a couple of breadcrumbs, even our hangcheck is unable to catch the busy-looping as the ACTHD and seqno continually advance. Fixes: a3aabe86a340 ("drm/i915/execlists: Reinitialise context image after GPU hang") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: <stable@vger.kernel.org> # v4.10+ --- drivers/gpu/drm/i915/intel_lrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 3fdabba0a32d..c8dd848d2ebe 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1302,6 +1302,7 @@ static void reset_common_ring(struct intel_engine_cs *engine, /* Reset WaIdleLiteRestore:bdw,skl as well */ request->tail = request->wa_tail - WA_TAIL_DWORDS * sizeof(u32); + request->tail &= request->ring->size - 1; GEM_BUG_ON(!IS_ALIGNED(request->tail, 8)); } -- 2.11.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2017-03-27 3:28 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-27 3:28 Chris Wilson [this message] 2017-03-27 3:28 ` [PATCH 1/2] drm/i915/execlists: Wrap tail pointer after reset tweaking Chris Wilson 2017-03-27 3:28 ` [PATCH 2/2] drm/i915: Assert that the request->tail fits within the ring Chris Wilson 2017-03-27 3:45 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/execlists: Wrap tail pointer after reset tweaking Patchwork 2017-03-27 10:44 ` [Intel-gfx] [PATCH 1/2] " Mika Kuoppala 2017-03-27 10:44 ` Mika Kuoppala 2017-03-27 11:00 ` [Intel-gfx] " Chris Wilson 2017-03-27 11:00 ` Chris Wilson 2017-03-27 11:07 ` [Intel-gfx] " Mika Kuoppala 2017-03-27 11:07 ` Mika Kuoppala 2017-03-27 11:19 ` [Intel-gfx] " Chris Wilson 2017-03-27 11:19 ` Chris Wilson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170327032815.19504-1-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=intel-gfx@lists.freedesktop.org \ --cc=mika.kuoppala@intel.com \ --cc=stable@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.