[Intel-gfx] [PATCH v2 02/14] drm/i915: Use a local to shorten req->i915->gpu_error.wait_queue

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Feb 15 17:06:53 UTC 2017


On 14/02/2017 09:54, Chris Wilson wrote:
> Use a local variable to avoid having to type out the full name of the
> gpu_error wait_queue.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem_request.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 2d84da0e2b39..f7ff3736797f 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -1061,6 +1061,7 @@ long i915_wait_request(struct drm_i915_gem_request *req,
>  {
>  	const int state = flags & I915_WAIT_INTERRUPTIBLE ?
>  		TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE;
> +	wait_queue_head_t *errq = &req->i915->gpu_error.wait_queue;
>  	DEFINE_WAIT(reset);
>  	struct intel_wait wait;
>
> @@ -1096,7 +1097,7 @@ long i915_wait_request(struct drm_i915_gem_request *req,
>
>  	set_current_state(state);
>  	if (flags & I915_WAIT_LOCKED)
> -		add_wait_queue(&req->i915->gpu_error.wait_queue, &reset);
> +		add_wait_queue(errq, &reset);
>
>  	intel_wait_init(&wait, req->global_seqno);
>  	if (intel_engine_add_wait(req->engine, &wait))
> @@ -1147,8 +1148,7 @@ long i915_wait_request(struct drm_i915_gem_request *req,
>  		    i915_reset_in_progress(&req->i915->gpu_error)) {
>  			__set_current_state(TASK_RUNNING);
>  			i915_reset(req->i915);
> -			reset_wait_queue(&req->i915->gpu_error.wait_queue,
> -					 &reset);
> +			reset_wait_queue(errq, &reset);
>  			continue;
>  		}
>
> @@ -1159,7 +1159,7 @@ long i915_wait_request(struct drm_i915_gem_request *req,
>
>  	intel_engine_remove_wait(req->engine, &wait);
>  	if (flags & I915_WAIT_LOCKED)
> -		remove_wait_queue(&req->i915->gpu_error.wait_queue, &reset);
> +		remove_wait_queue(errq, &reset);
>  	__set_current_state(TASK_RUNNING);
>
>  complete:
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list