Re: [PATCH 04/14] drm/i915: Inline __i915_gem_request_wait_for_execute()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 14, 2017 at 01:32:37PM +0200, Joonas Lahtinen wrote:
> On to, 2017-02-02 at 15:13 +0000, Chris Wilson wrote:
> > It had only one callsite and existed to keep the code clearer. Now
> > having shared the wait-on-error between phases and with plans to change
> > the wait-for-execute in the next few patches, remove the out of line
> > wait loop and move it into the main body of i915_wait_request.
> > 
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> 
> <SNIP>
> 
> > @@ -1080,7 +1037,30 @@ long i915_wait_request(struct drm_i915_gem_request *req,
> >  		add_wait_queue(errq, &reset);
> >  
> >  	if (!i915_sw_fence_done(&req->execute)) {
> > -		timeout = __i915_request_wait_for_execute(req, flags, timeout);
> > +		DEFINE_WAIT(exec);
> > +
> > +		do {
> > +			prepare_to_wait(&req->execute.wait, &exec, state);
> > +			if (i915_sw_fence_done(&req->execute))
> > +				break;
> > +
> > +			if (flags & I915_WAIT_LOCKED &&
> > +			    i915_reset_in_progress(&req->i915->gpu_error)) {
> > +				__set_current_state(TASK_RUNNING);
> > +				i915_reset(req->i915);
> 
> I'm no the expert here, but this reads funnily; "if reset in progress,
> do reset".

In a series-to-come, this is renamed to

	if (i915_reset_handoff())
		i915_reset();

-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux