]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use EAGAIN for trylock failures
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 13 Dec 2019 16:03:47 +0000 (16:03 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 13 Dec 2019 20:16:23 +0000 (20:16 +0000)
commit8fc2673c3cd2f506bf39fc34ce665b3bc4ce5334
tree1042010629454f562d2a8fab9a96aba7a4fdf237
parentf6ca47391eb155911a347783eafc559a77dc5b2a
drm/i915: Use EAGAIN for trylock failures

While not good behaviour, it is, however, established behaviour that we
can punt EAGAIN to userspace if we need to retry the ioctl. When trying
to acquire a mutex, prefer to use EAGAIN to propagate losing the race
so that if it does end up back in userspace, we try again.

Fixes: 5478de461342 ("drm/i915: Copy across scheduler behaviour flags across submit fences")
Closes: https://gitlab.freedesktop.org/drm/intel/issues/800
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213160347.1789004-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_timeline.c
drivers/gpu/drm/i915/i915_request.c