1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright �� 2014-2018 Intel Corporation 4 */ 5 6#ifndef INTEL_GT_BUFFER_POOL_TYPES_H 7#define INTEL_GT_BUFFER_POOL_TYPES_H 8 9#include <linux/list.h> 10#include <linux/spinlock.h> 11#include <linux/workqueue.h> 12 13#include "gem/i915_gem_object_types.h" 14#include "i915_active_types.h" 15 16struct intel_gt_buffer_pool { 17 spinlock_t lock; 18 struct list_head cache_list[4]; 19 struct delayed_work work; 20}; 21 22struct intel_gt_buffer_pool_node { 23 struct i915_active active; 24 struct drm_i915_gem_object *obj; 25 struct list_head link; 26 union { 27 struct intel_gt_buffer_pool *pool; 28 struct intel_gt_buffer_pool_node *free; 29 struct rcu_head rcu; 30 }; 31 unsigned long age; 32 enum i915_map_type type; 33 u32 pinned; 34}; 35 36#endif /* INTEL_GT_BUFFER_POOL_TYPES_H */ 37