Skip to content

Commit

Permalink
drm/i915/gt: Move the late flush_submission in retire to the end
Browse files Browse the repository at this point in the history
Avoid flushing the submission queue (of others) under the client's
timeline lock, but instead move it to the end so that we may catch more.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/1066
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/20200420125356.26614-2-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Apr 20, 2020
1 parent a95f3ac commit f153f63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/i915/gt/intel_gt_requests.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ long intel_gt_retire_requests_timeout(struct intel_gt *gt, long timeout)
}
}

if (!retire_requests(tl) || flush_submission(gt))
if (!retire_requests(tl))
active_count++;
mutex_unlock(&tl->mutex);

Expand All @@ -185,6 +185,9 @@ out_active: spin_lock(&timelines->lock);
list_for_each_entry_safe(tl, tn, &free, link)
__intel_timeline_free(&tl->kref);

if (flush_submission(gt)) /* Wait, there's more! */
active_count++;

return active_count ? timeout : 0;
}

Expand Down

0 comments on commit f153f63

Please sign in to comment.