Re: [PATCH 03/10] drm/i915/gem: Reduce ctx->engine_mutex for reading the clone source

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

 



Hi Chris,

On Wed, Jan 13, 2021 at 12:45:53PM +0000, Chris Wilson wrote:
> When cloning the engines from the source context, we need to ensure that
> the engines are not freed as we copy them, and that the flags we clone
> from the source correspond with the engines we copy across. To do this
> we need only take a reference to the src->engines, rather than hold the
> src->engine_mutex, so long as we verify that nothing changed under the
> read.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxx>

Thanks,
Andi

> +		if (user_engines)
> +			*user_engines = i915_gem_context_user_engines(ctx);
> +


> +		/* successful await => strong mb */

P.S.: mmhhh? :)

>  		if (unlikely(!i915_sw_fence_await(&engines->fence)))
>  			continue;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux