]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/gpu/drm/i915/i915_drv.h
drm/i915: Move user fault tracking to a separate list
[mirror_ubuntu-artful-kernel.git] / drivers / gpu / drm / i915 / i915_drv.h
index f022f438e5b93e1c408d102ee3f70d57a57a6c11..a53172e7790fe522a8d20354724e913e29ac9460 100644 (file)
@@ -1361,6 +1361,14 @@ struct i915_gem_mm {
         */
        struct list_head unbound_list;
 
+       /** Protects access to the userfault_list */
+       spinlock_t userfault_lock;
+
+       /** List of all objects in gtt_space, currently mmaped by userspace.
+        * All objects within this list must also be on bound_list.
+        */
+       struct list_head userfault_list;
+
        /** Usable portion of the GTT for GEM */
        unsigned long stolen_base; /* limited to low memory (32-bit) */
 
@@ -2205,6 +2213,11 @@ struct drm_i915_gem_object {
        struct drm_mm_node *stolen;
        struct list_head global_list;
 
+       /**
+        * Whether the object is currently in the GGTT mmap.
+        */
+       struct list_head userfault_link;
+
        /** Used in execbuf to temporarily hold a ref */
        struct list_head obj_exec_link;
 
@@ -2232,13 +2245,6 @@ struct drm_i915_gem_object {
         */
        unsigned int madv:2;
 
-       /**
-        * Whether the current gtt mapping needs to be mappable (and isn't just
-        * mappable by accident). Track pin and fault separate for a more
-        * accurate mappable working set.
-        */
-       unsigned int fault_mappable:1;
-
        /*
         * Is the object to be mapped as read-only to the GPU
         * Only honoured if hardware has relevant pte bit