[01/12] drm/i915/selftests: Check for any sign of request starting in wait_for_submit()
diff mbox series

Message ID 20200218162150.1300405-1-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [01/12] drm/i915/selftests: Check for any sign of request starting in wait_for_submit()
Related show

Commit Message

Chris Wilson Feb. 18, 2020, 4:21 p.m. UTC
We only want to wait until the request has been submitted at least once;
that is it is either in flight, or has been.

References: fcf7df7aae24 ("drm/i915/selftests: Check for the error interrupt before we wait!")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matthew Auld Feb. 18, 2020, 8:08 p.m. UTC | #1
On Tue, 18 Feb 2020 at 16:22, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> We only want to wait until the request has been submitted at least once;
> that is it is either in flight, or has been.
>
> References: fcf7df7aae24 ("drm/i915/selftests: Check for the error interrupt before we wait!")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
index 40c53cc1c7c0..7b303d5fd5b8 100644
--- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
@@ -83,7 +83,7 @@  static int wait_for_submit(struct intel_engine_cs *engine,
 			return 0;
 		}
 
-		if (i915_request_completed(rq)) /* that was quick! */
+		if (i915_request_started(rq)) /* that was quick! */
 			return 0;
 	} while (time_before(jiffies, timeout));