drm/i915: Use uninterruptible mutex_lock for userptr bo creation
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_gem_userptr.c
index 4039ede158be237cb34c165634e5d471159dc710..1f4e5a32a16e568cae0cc340c39482d13af7ef41 100644 (file)
@@ -219,11 +219,14 @@ i915_mmu_notifier_add(struct drm_device *dev,
                      struct i915_mmu_object *mo)
 {
        struct interval_tree_node *it;
-       int ret;
+       int ret = 0;
 
-       ret = i915_mutex_lock_interruptible(dev);
-       if (ret)
-               return ret;
+       /* By this point we have already done a lot of expensive setup that
+        * we do not want to repeat just because the caller (e.g. X) has a
+        * signal pending (and partly because of that expensive setup, X
+        * using an interrupt timer is likely to get stuck in an EINTR loop).
+        */
+       mutex_lock(&dev->struct_mutex);
 
        /* Make sure we drop the final active reference (and thereby
         * remove the objects from the interval tree) before we do
This page took 0.049297 seconds and 5 git commands to generate.