Re: [PATCH 26/38] drm/i915: Restore nonblocking awaits for modesetting

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

 



CC'ing Maarten to A-b or R-b.

On ti, 2016-09-20 at 09:30 +0100, Chris Wilson wrote:
> @@ -14615,31 +14641,25 @@ intel_prepare_plane_fb(struct drm_plane *plane,
>  		 * This should only fail upon a hung GPU, in which case we
>  		 * can safely continue.
>  		 */
> -		if (needs_modeset(crtc_state))
> -			timeout = i915_gem_object_wait(old_obj,
> -						       I915_WAIT_INTERRUPTIBLE |
> -						       I915_WAIT_LOCKED,
> -						       MAX_SCHEDULE_TIMEOUT,
> -						       NULL);
> -		if (timeout < 0) {
> -			/* GPU hangs should have been swallowed by the wait */
> -			WARN_ON(timeout == -EIO);
> -			return timeout;
> +		if (needs_modeset(crtc_state)) {
> +			ret = i915_sw_fence_await_reservation(&to_intel_atomic_state(new_state->state)->commit_ready,

D'oh, use a variable here to limit the line length.

> +							      old_obj->resv, NULL,
> +							      false, 0,
> +							      GFP_KERNEL);
> +			if (ret < 0)
> +				return ret;
>  		}
>  	}
>  
>  	if (!obj)
>  		return 0;
>  
> -	/* For framebuffer backed by dmabuf, wait for fence */
> -	lret = i915_gem_object_wait(obj,
> -				    I915_WAIT_INTERRUPTIBLE | I915_WAIT_LOCKED,
> -				    MAX_SCHEDULE_TIMEOUT,
> -				    NULL);
> -	if (lret == -ERESTARTSYS)
> -		return lret;
> -
> -	WARN(lret < 0, "waiting returns %li\n", lret);
> +	ret = i915_sw_fence_await_reservation(&to_intel_atomic_state(new_state->state)->commit_ready,

Ditto.

> +					      obj->resv, NULL,
> +					      false, 10*HZ,

Magic once again.

With above fixed;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
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