summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>2012-10-03 17:15:26 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-04 10:33:42 +0200
commite79e0fe380847493266fba557217e2773c61bd1b (patch)
tree97e55deebc73b06739e28811f592e5ca6231065c /drivers/gpu
parent2477367083b3eaa97f87993ab26627a02f350551 (diff)
downloadop-kernel-dev-e79e0fe380847493266fba557217e2773c61bd1b.zip
op-kernel-dev-e79e0fe380847493266fba557217e2773c61bd1b.tar.gz
drm/i915: EBUSY status handling added to i915_gem_fault().
Subsequent threads returning EBUSY from vm_insert_pfn() was not handled correctly. As a result concurrent access from new threads to mmapped data caused SIGBUS. Note that this fixes i-g-t/tests/gem_threaded_tiled_access. Tested-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 76bbb37..5fa3419 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1400,6 +1400,11 @@ out:
case 0:
case -ERESTARTSYS:
case -EINTR:
+ case -EBUSY:
+ /*
+ * EBUSY is ok: this just means that another thread
+ * already did the job.
+ */
return VM_FAULT_NOPAGE;
case -ENOMEM:
return VM_FAULT_OOM;
OpenPOWER on IntegriCloud