diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_request.c')
| -rw-r--r-- | drivers/gpu/drm/i915/i915_request.c | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 894068bb37b6..7c7da284990d 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -1220,7 +1220,7 @@ emit_semaphore_wait(struct i915_request *to,  	/*  	 * If this or its dependents are waiting on an external fence  	 * that may fail catastrophically, then we want to avoid using -	 * sempahores as they bypass the fence signaling metadata, and we +	 * semaphores as they bypass the fence signaling metadata, and we  	 * lose the fence->error propagation.  	 */  	if (from->sched.flags & I915_SCHED_HAS_EXTERNAL_CHAIN) @@ -1353,7 +1353,7 @@ __i915_request_await_external(struct i915_request *rq, struct dma_fence *fence)  {  	mark_external(rq);  	return i915_sw_fence_await_dma_fence(&rq->submit, fence, -					     i915_fence_context_timeout(rq->engine->i915, +					     i915_fence_context_timeout(rq->i915,  									fence->context),  					     I915_FENCE_GFP);  } @@ -1661,6 +1661,11 @@ __i915_request_ensure_parallel_ordering(struct i915_request *rq,  	request_to_parent(rq)->parallel.last_rq = i915_request_get(rq); +	/* +	 * Users have to put a reference potentially got by +	 * __i915_active_fence_set() to the returned request +	 * when no longer needed +	 */  	return to_request(__i915_active_fence_set(&timeline->last_request,  						  &rq->fence));  } @@ -1707,6 +1712,10 @@ __i915_request_ensure_ordering(struct i915_request *rq,  							 0);  	} +	/* +	 * Users have to put the reference to prev potentially got +	 * by __i915_active_fence_set() when no longer needed +	 */  	return prev;  } @@ -1760,6 +1769,8 @@ __i915_request_add_to_timeline(struct i915_request *rq)  		prev = __i915_request_ensure_ordering(rq, timeline);  	else  		prev = __i915_request_ensure_parallel_ordering(rq, timeline); +	if (prev) +		i915_request_put(prev);  	/*  	 * Make sure that no request gazumped us - if it was allocated after | 
