diff options
author | John Harrison <John.C.Harrison@Intel.com> | 2015-07-08 16:20:18 +0100 |
---|---|---|
committer | John Harrison <John.C.Harrison@Intel.com> | 2016-06-28 17:17:09 +0100 |
commit | 10ea434ebd98442bc3490ddb550ae7f083e3b5b8 (patch) | |
tree | 3f2d81db0d9865d3cc397a86d376451dfcb5c301 /drivers/gpu/drm/i915 | |
parent | 8f43178b1fc5ff21e4c1b5d7210905723962bb5c (diff) |
drm/i915: Hook scheduler node clean up into retire requests
The scheduler keeps its own lock on various DRM objects in order to
guarantee safe access long after the original execbuff IOCTL has
completed. This is especially important when pre-emption is enabled as
the batch buffer might need to be submitted to the hardware multiple
times. This patch hooks the clean up of these locks into the request
retire function. The request can only be retired after it has
completed on the hardware and thus is no longer eligible for
re-submission. Thus there is no point holding on to the locks beyond
that time.
v3: Updated to not WARN when cleaning a node that is being cancelled.
The clean will happen later so skipping it at the point of
cancellation is fine.
v5: Squashed the i915_scheduler.c portions down into the 'start of
scheduler' patch. [Joonas Lahtinen]
For: VIZ-1587
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 53a65c55abde..a4b9435f4947 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1476,6 +1476,9 @@ static void i915_gem_request_retire(struct drm_i915_gem_request *request) fence_signal_locked(&request->fence); } + if (request->scheduler_qe) + i915_scheduler_clean_node(request->scheduler_qe); + i915_gem_request_unreference(request); } |