drm/i915/pool: constrain pool objects by mapping type
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / gt / intel_gt_buffer_pool_types.h
index e28bdda..d8d82c8 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
 
+#include "gem/i915_gem_object_types.h"
 #include "i915_active_types.h"
 
-struct drm_i915_gem_object;
-
 struct intel_gt_buffer_pool {
        spinlock_t lock;
        struct list_head cache_list[4];
@@ -25,8 +24,13 @@ struct intel_gt_buffer_pool_node {
        struct i915_active active;
        struct drm_i915_gem_object *obj;
        struct list_head link;
-       struct intel_gt_buffer_pool *pool;
+       union {
+               struct intel_gt_buffer_pool *pool;
+               struct intel_gt_buffer_pool_node *free;
+               struct rcu_head rcu;
+       };
        unsigned long age;
+       enum i915_map_type type;
 };
 
 #endif /* INTEL_GT_BUFFER_POOL_TYPES_H */