summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt/intel_timeline.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-12-13 17:03:47 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-12-13 21:16:23 +0100
commitf1925f3309d13d431f70e7b6b72ba59cae90fdff (patch)
tree1042010629454f562d2a8fab9a96aba7a4fdf237 /drivers/gpu/drm/i915/gt/intel_timeline.c
parentdrm/i915: Introduce new macros for tracing (diff)
downloadlinux-f1925f3309d13d431f70e7b6b72ba59cae90fdff.tar.xz
linux-f1925f3309d13d431f70e7b6b72ba59cae90fdff.zip
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: c81471f5e95c ("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
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_timeline.c')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_timeline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c
index 038e05a6336c..d71aafb66d6e 100644
--- a/drivers/gpu/drm/i915/gt/intel_timeline.c
+++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
@@ -527,7 +527,7 @@ int intel_timeline_read_hwsp(struct i915_request *from,
GEM_BUG_ON(rcu_access_pointer(to->timeline) == tl);
- err = -EBUSY;
+ err = -EAGAIN;
if (mutex_trylock(&tl->mutex)) {
struct intel_timeline_cacheline *cl = from->hwsp_cacheline;