All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gt: Mark the execlists->active as the primary volatile access
@ 2019-11-23 11:03 ` Chris Wilson
  0 siblings, 0 replies; 18+ messages in thread
From: Chris Wilson @ 2019-11-23 11:03 UTC (permalink / raw)
  To: intel-gfx

Since we want to do a lockless read of the current active request, and
that request is written to by process_csb also without serialisation, we
need to instruct gcc to take care in reading the pointer itself.

Otherwise, we have observed execlists_active() to report 0x40.

[ 2400.760381] igt/para-4098    1..s. 2376479300us : process_csb: rcs0 cs-irq head=3, tail=4
[ 2400.760826] igt/para-4098    1..s. 2376479303us : process_csb: rcs0 csb[4]: status=0x00000001:0x00000000
[ 2400.761271] igt/para-4098    1..s. 2376479306us : trace_ports: rcs0: promote { b9c59:2622, b9c55:2624 }
[ 2400.761726] igt/para-4097    0d... 2376479311us : __i915_schedule: rcs0: -2147483648->3, inflight:0000000000000040, rq:ffff888208c1e940

which is impossible!

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

diff --git a/drivers/gpu/drm/i915/gt/intel_engine.h b/drivers/gpu/drm/i915/gt/intel_engine.h
index bc3b72bfa9e3..7f3cd84982b1 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine.h
+++ b/drivers/gpu/drm/i915/gt/intel_engine.h
@@ -102,7 +102,7 @@ execlists_active(const struct intel_engine_execlists *execlists)
 {
 	GEM_BUG_ON(execlists->active - execlists->inflight >
 		   execlists_num_ports(execlists));
-	return READ_ONCE(*execlists->active);
+	return *READ_ONCE(execlists->active);
 }
 
 static inline void
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-11-25 10:51 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-23 11:03 [PATCH] drm/i915/gt: Mark the execlists->active as the primary volatile access Chris Wilson
2019-11-23 11:03 ` [Intel-gfx] " Chris Wilson
2019-11-23 11:37 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-11-23 11:37   ` [Intel-gfx] " Patchwork
2019-11-23 17:35 ` [PATCH] " Chris Wilson
2019-11-23 17:35   ` [Intel-gfx] " Chris Wilson
2019-11-23 17:46 ` Chris Wilson
2019-11-23 17:46   ` [Intel-gfx] " Chris Wilson
2019-11-23 17:49 ` Chris Wilson
2019-11-23 17:49   ` [Intel-gfx] " Chris Wilson
2019-11-23 18:05   ` Chris Wilson
2019-11-23 18:05     ` [Intel-gfx] " Chris Wilson
2019-11-25 10:51   ` Andi Shyti
2019-11-25 10:51     ` [Intel-gfx] " Andi Shyti
2019-11-23 17:58 ` ✗ Fi.CI.BAT: failure for drm/i915/gt: Mark the execlists->active as the primary volatile access (rev2) Patchwork
2019-11-23 17:58   ` [Intel-gfx] " Patchwork
2019-11-23 18:26 ` ✗ Fi.CI.BAT: failure for drm/i915/gt: Mark the execlists->active as the primary volatile access (rev4) Patchwork
2019-11-23 18:26   ` [Intel-gfx] " Patchwork

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.