On Wed, Apr 12, 2017 at 01:48:23PM +0100, Chris Wilson wrote:
> Although we do check the completion-status of the request before
> actually adding a wait on it (either to its submit fence or its
> completion dma-fence), we currently do not check before adding it to the
> dependency lists.
> 
> Signed-off-by: Chris Wilson <[email protected]>

Reviewed-by: Michał Winiarski <[email protected]>

-Michał

> ---
>  drivers/gpu/drm/i915/i915_gem_request.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c 
> b/drivers/gpu/drm/i915/i915_gem_request.c
> index 87ca3453140a..436693b12bae 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -665,6 +665,9 @@ i915_gem_request_await_request(struct 
> drm_i915_gem_request *to,
>       GEM_BUG_ON(to == from);
>       GEM_BUG_ON(to->timeline == from->timeline);
>  
> +     if (i915_gem_request_completed(from))
> +             return 0;
> +
>       if (to->engine->schedule) {
>               ret = i915_priotree_add_dependency(to->i915,
>                                                  &to->priotree,
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to