[Intel-gfx] [PATCH] drm/i915: Nuke struct_mutex from context_setparam

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Sep 11 13:23:52 UTC 2018


On 11/09/2018 14:14, Chris Wilson wrote:
> Quoting Chris Wilson (2018-09-11 13:50:22)
>> Userspace should be free to race against itself and shoot itself in
>> the foot if it so desires to adjust a parameter at the same time as
>> submitting a batch to that context. As such, the struct_mutex in context
>> setparam is only being used to serialise userspace against itself and
>> not for any protection of internal structs and so is superfluous.
>>
>> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> To reduce the amount of queasiness here, we should split off the
> ctx->flags and ctx->user_flags.

I think all that would be needed for a start is to handle 
PARAM_NO_ZEROMAP with the same set/clear_bit approach as the rest. With 
that it would all be atomic for all theoretical scenarios.

Regards,

Tvrtko



More information about the Intel-gfx mailing list