xref: /linux/drivers/gpu/drm/i915/i915_gem_evict.h (revision 34f7c6e7d4396090692a09789db231e12cb4762b)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5 
6 #ifndef __I915_GEM_EVICT_H__
7 #define __I915_GEM_EVICT_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_mm_node;
12 struct i915_address_space;
13 struct i915_gem_ww_ctx;
14 
15 int __must_check i915_gem_evict_something(struct i915_address_space *vm,
16 					  struct i915_gem_ww_ctx *ww,
17 					  u64 min_size, u64 alignment,
18 					  unsigned long color,
19 					  u64 start, u64 end,
20 					  unsigned flags);
21 int __must_check i915_gem_evict_for_node(struct i915_address_space *vm,
22 					 struct i915_gem_ww_ctx *ww,
23 					 struct drm_mm_node *node,
24 					 unsigned int flags);
25 int i915_gem_evict_vm(struct i915_address_space *vm,
26 		      struct i915_gem_ww_ctx *ww);
27 
28 #endif /* __I915_GEM_EVICT_H__ */
29