Skip to content

Commit

Permalink
drm/i915: Clear gt.active_requests before checking idle status
Browse files Browse the repository at this point in the history
commit 8490ae2 ("drm/i915: Suppress busy status for engines if
wedged") moved the check for inflight requests to the
intel_engines_are_idle() check to protect the idle worker. However, the
request selftests were also checking the engine idle status and erroring
out if they did not become idle within a short period of time after the
final wait. In order to accommodate the new check, call retire requests
prior to the engine check so that we flush all the waits.

Fixes: 8490ae2 ("drm/i915: Suppress busy status for engines if wedged")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170331192121.10024-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
  • Loading branch information
Chris Wilson committed Mar 31, 2017
1 parent b9ab1f3 commit 5f09ad8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/selftests/i915_gem_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ static int end_live_test(struct live_test *t)
{
struct drm_i915_private *i915 = t->i915;

if (wait_for(intel_engines_are_idle(i915), 1)) {
i915_gem_retire_requests(i915);

if (wait_for(intel_engines_are_idle(i915), 10)) {
pr_err("%s(%s): GPU not idle\n", t->func, t->name);
return -EIO;
}
Expand Down

0 comments on commit 5f09ad8

Please sign in to comment.