[Intel-gfx] [PATCH 16/16] drm/i915: Assert that the request hasn't been retired
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Thu Aug 4 11:18:33 UTC 2016
On ma, 2016-08-01 at 19:22 +0100, Chris Wilson wrote:
> With all callers now not playing tricks with dropping the struct_mutex
> between waiting and retiring, we can assert that the request is ready to
> be retired.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_request.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 8289d31c0ef5..b79ee5a35079 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -170,7 +170,7 @@ static void i915_gem_request_retire(struct drm_i915_gem_request *request)
> struct i915_gem_active *active, *next;
>
> trace_i915_gem_request_retire(request);
> - list_del_init(&request->link);
> + list_del(&request->link);
>
> /* We know the GPU must have read the request to have
> * sent us the seqno + interrupt, so use the position
> @@ -228,9 +228,7 @@ void i915_gem_request_retire_upto(struct drm_i915_gem_request *req)
> struct drm_i915_gem_request *tmp;
>
> lockdep_assert_held(&req->i915->drm.struct_mutex);
> -
> - if (list_empty(&req->link))
> - return;
> + GEM_BUG_ON(list_empty(&req->link));
>
> do {
> tmp = list_first_entry(&engine->request_list,
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list