treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / gem / i915_gem_shrinker.h
blobb397d7785789a1167eb2de905f1712ba1831624b
1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Copyright © 2019 Intel Corporation
4 */
6 #ifndef __I915_GEM_SHRINKER_H__
7 #define __I915_GEM_SHRINKER_H__
9 #include <linux/bits.h>
11 struct drm_i915_private;
12 struct mutex;
14 /* i915_gem_shrinker.c */
15 unsigned long i915_gem_shrink(struct drm_i915_private *i915,
16 unsigned long target,
17 unsigned long *nr_scanned,
18 unsigned flags);
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,
29 struct mutex *mutex);
31 #endif /* __I915_GEM_SHRINKER_H__ */