1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
6 #ifndef __I915_GEM_SHRINKER_H__
7 #define __I915_GEM_SHRINKER_H__
9 #include <linux/bits.h>
11 struct drm_i915_private
;
14 /* i915_gem_shrinker.c */
15 unsigned long i915_gem_shrink(struct drm_i915_private
*i915
,
17 unsigned long *nr_scanned
,
19 #define I915_SHRINK_UNBOUND BIT(0)
20 #define I915_SHRINK_BOUND BIT(1)
21 #define I915_SHRINK_ACTIVE BIT(2)
22 #define I915_SHRINK_VMAPS BIT(3)
23 #define I915_SHRINK_WRITEBACK BIT(4)
25 unsigned long i915_gem_shrink_all(struct drm_i915_private
*i915
);
26 void i915_gem_driver_register__shrinker(struct drm_i915_private
*i915
);
27 void i915_gem_driver_unregister__shrinker(struct drm_i915_private
*i915
);
28 void i915_gem_shrinker_taints_mutex(struct drm_i915_private
*i915
,
31 #endif /* __I915_GEM_SHRINKER_H__ */