]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/gpu/drm/i915/i915_gem_userptr.c
drm/i915: Add flag to i915_add_request() to skip the cache flush
[mirror_ubuntu-hirsute-kernel.git] / drivers / gpu / drm / i915 / i915_gem_userptr.c
index 1719078c763ac0d140c8fb7a9e954862bd8d3bc7..1f4e5a32a16e568cae0cc340c39482d13af7ef41 100644 (file)
@@ -22,8 +22,8 @@
  *
  */
 
-#include "drmP.h"
-#include "i915_drm.h"
+#include <drm/drmP.h>
+#include <drm/i915_drm.h>
 #include "i915_drv.h"
 #include "i915_trace.h"
 #include "intel_drv.h"
@@ -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