drm/i915/selftests: Be paranoid and flush the tasklet before checking status
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Dec 2020 11:35:36 +0000 (11:35 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Dec 2020 14:38:16 +0000 (14:38 +0000)
When waiting for the submit, before checking the status of the request,
kick the tasklet to make sure we are processing the submission. This
speeds up submission if we are using any tasklet suppression for
secondary requests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201222113536.3775-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_execlists.c
drivers/gpu/drm/i915/gt/selftest_lrc.c

index 2d0d7e17f0424e65bb81d260eb60a561e1dd8996..fa51cf6d840a6800be935a297d0b480d09d73fae 100644 (file)
@@ -43,6 +43,9 @@ static int wait_for_submit(struct intel_engine_cs *engine,
                           struct i915_request *rq,
                           unsigned long timeout)
 {
+       /* Ignore our own attempts to suppress excess tasklets */
+       tasklet_hi_schedule(&engine->execlists.tasklet);
+
        timeout += jiffies;
        do {
                bool done = time_after(jiffies, timeout);
index 6b069bb1ddcc50547e7d964fbaabc89a7cf7c69e..d55421f6a2504c4f181870823213675ca1670572 100644 (file)
@@ -48,6 +48,9 @@ static int wait_for_submit(struct intel_engine_cs *engine,
                           struct i915_request *rq,
                           unsigned long timeout)
 {
+       /* Ignore our own attempts to suppress excess tasklets */
+       tasklet_hi_schedule(&engine->execlists.tasklet);
+
        timeout += jiffies;
        do {
                bool done = time_after(jiffies, timeout);