All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Assert that the request is on the execution queue before being removed
@ 2017-12-22 14:19 Chris Wilson
  2017-12-22 14:41 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2017-12-22 14:19 UTC (permalink / raw)
  To: intel-gfx

We should only attempt to remove requests from the execution queue that
are on the execution queue. These are the requests that have been
assigned a global_seqno, so we can assert that we only attempt to remove
requests with a nonzero global_seqno. Afterwards we assert that we
remove them in order, i.e. the global_seqno matches the engine's seqno,
but that leaves a small loophole for an unattached request on an unused
engine.

We can then make the same assertion on queuing the request to the
execution, it must have a zero global_seqno or else we are queuing the
same request twice.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_request.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index 59f023bb7015..d575109f7a7f 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -479,6 +479,7 @@ void __i915_gem_request_submit(struct drm_i915_gem_request *request)
 	/* Transfer from per-context onto the global per-engine timeline */
 	timeline = engine->timeline;
 	GEM_BUG_ON(timeline == request->timeline);
+	GEM_BUG_ON(request->global_seqno);
 
 	seqno = timeline_get_seqno(timeline);
 	GEM_BUG_ON(!seqno);
@@ -525,6 +526,7 @@ void __i915_gem_request_unsubmit(struct drm_i915_gem_request *request)
 	/* Only unwind in reverse order, required so that the per-context list
 	 * is kept in seqno/ring order.
 	 */
+	GEM_BUG_ON(!request->global_seqno);
 	GEM_BUG_ON(request->global_seqno != engine->timeline->seqno);
 	engine->timeline->seqno--;
 
-- 
2.15.1

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

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

* ✓ Fi.CI.BAT: success for drm/i915: Assert that the request is on the execution queue before being removed
  2017-12-22 14:19 [PATCH] drm/i915: Assert that the request is on the execution queue before being removed Chris Wilson
@ 2017-12-22 14:41 ` Patchwork
  2017-12-22 16:06 ` ✗ Fi.CI.IGT: failure " Patchwork
  2017-12-22 17:18 ` [PATCH] " Tvrtko Ursulin
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-12-22 14:41 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert that the request is on the execution queue before being removed
URL   : https://patchwork.freedesktop.org/series/35723/
State : success

== Summary ==

Series 35723v1 drm/i915: Assert that the request is on the execution queue before being removed
https://patchwork.freedesktop.org/api/1.0/series/35723/revisions/1/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:436s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:437s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:382s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:496s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:276s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:490s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:485s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:472s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:467s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:263s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:535s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:403s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:412s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:428s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:475s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:430s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:481s
fi-kbl-7560u     total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  time:515s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:470s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:523s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:589s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:442s
fi-skl-6600u     total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:528s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:552s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:503s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:493s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:448s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:415s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:585s
fi-cnl-y         total:208  pass:187  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:483s

34783c4253df6206c731735524b0297c6894384b drm-tip: 2017y-12m-22d-12h-46m-57s UTC integration manifest
5c9396e9ac21 drm/i915: Assert that the request is on the execution queue before being removed

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7566/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.IGT: failure for drm/i915: Assert that the request is on the execution queue before being removed
  2017-12-22 14:19 [PATCH] drm/i915: Assert that the request is on the execution queue before being removed Chris Wilson
  2017-12-22 14:41 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-12-22 16:06 ` Patchwork
  2017-12-22 17:18 ` [PATCH] " Tvrtko Ursulin
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-12-22 16:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Assert that the request is on the execution queue before being removed
URL   : https://patchwork.freedesktop.org/series/35723/
State : failure

== Summary ==

Test kms_flip:
        Subgroup vblank-vs-modeset-suspend-interruptible:
                pass       -> FAIL       (shard-snb)
                skip       -> PASS       (shard-hsw) fdo#103540
Test gem_softpin:
        Subgroup noreloc-s3:
                pass       -> SKIP       (shard-snb) fdo#102365
Test kms_chv_cursor_fail:
        Subgroup pipe-c-128x128-top-edge:
                incomplete -> PASS       (shard-hsw)
Test pm_rpm:
        Subgroup system-suspend-execbuf:
                skip       -> PASS       (shard-hsw) fdo#103375
Test perf:
        Subgroup polling:
                pass       -> FAIL       (shard-hsw) fdo#102252
Test gem_mmap_wc:
        Subgroup set-cache-level:
                skip       -> PASS       (shard-snb)
Test kms_flip_event_leak:
                skip       -> PASS       (shard-snb)
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
                pass       -> FAIL       (shard-snb) fdo#101623

fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hsw        total:2712 pass:1535 dwarn:1   dfail:0   fail:11  skip:1165 time:9272s
shard-snb        total:2712 pass:1307 dwarn:1   dfail:0   fail:12  skip:1392 time:7919s
Blacklisted hosts:
shard-apl        total:2712 pass:1687 dwarn:1   dfail:0   fail:23  skip:1001 time:13808s
shard-kbl        total:2712 pass:1795 dwarn:12  dfail:1   fail:24  skip:880 time:11097s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7566/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Assert that the request is on the execution queue before being removed
  2017-12-22 14:19 [PATCH] drm/i915: Assert that the request is on the execution queue before being removed Chris Wilson
  2017-12-22 14:41 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-12-22 16:06 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2017-12-22 17:18 ` Tvrtko Ursulin
  2 siblings, 0 replies; 4+ messages in thread
From: Tvrtko Ursulin @ 2017-12-22 17:18 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx


On 22/12/2017 14:19, Chris Wilson wrote:
> We should only attempt to remove requests from the execution queue that
> are on the execution queue. These are the requests that have been
> assigned a global_seqno, so we can assert that we only attempt to remove
> requests with a nonzero global_seqno. Afterwards we assert that we
> remove them in order, i.e. the global_seqno matches the engine's seqno,
> but that leaves a small loophole for an unattached request on an unused
> engine.
> 
> We can then make the same assertion on queuing the request to the
> execution, it must have a zero global_seqno or else we are queuing the
> same request twice.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_gem_request.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 59f023bb7015..d575109f7a7f 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -479,6 +479,7 @@ void __i915_gem_request_submit(struct drm_i915_gem_request *request)
>   	/* Transfer from per-context onto the global per-engine timeline */
>   	timeline = engine->timeline;
>   	GEM_BUG_ON(timeline == request->timeline);
> +	GEM_BUG_ON(request->global_seqno);
>   
>   	seqno = timeline_get_seqno(timeline);
>   	GEM_BUG_ON(!seqno);
> @@ -525,6 +526,7 @@ void __i915_gem_request_unsubmit(struct drm_i915_gem_request *request)
>   	/* Only unwind in reverse order, required so that the per-context list
>   	 * is kept in seqno/ring order.
>   	 */
> +	GEM_BUG_ON(!request->global_seqno);
>   	GEM_BUG_ON(request->global_seqno != engine->timeline->seqno);
>   	engine->timeline->seqno--;
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

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

end of thread, other threads:[~2017-12-22 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-22 14:19 [PATCH] drm/i915: Assert that the request is on the execution queue before being removed Chris Wilson
2017-12-22 14:41 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-22 16:06 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-22 17:18 ` [PATCH] " Tvrtko Ursulin

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.