cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

i915_gem_shrinker.h (973B)


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