#include <linux/vmalloc.h>
#include <linux/sched/mm.h>
#include "msm_drv.h"
#include "msm_gem.h"
#include "msm_gpu.h"
#include "msm_gpu_trace.h"
static bool enable_eviction = …;
MODULE_PARM_DESC(…) …;
module_param(enable_eviction, bool, 0600);
static bool can_swap(void)
{ … }
static bool can_block(struct shrink_control *sc)
{ … }
static unsigned long
msm_gem_shrinker_count(struct shrinker *shrinker, struct shrink_control *sc)
{ … }
static bool
purge(struct drm_gem_object *obj)
{ … }
static bool
evict(struct drm_gem_object *obj)
{ … }
static bool
wait_for_idle(struct drm_gem_object *obj)
{ … }
static bool
active_purge(struct drm_gem_object *obj)
{ … }
static bool
active_evict(struct drm_gem_object *obj)
{ … }
static unsigned long
msm_gem_shrinker_scan(struct shrinker *shrinker, struct shrink_control *sc)
{ … }
#ifdef CONFIG_DEBUG_FS
unsigned long
msm_gem_shrinker_shrink(struct drm_device *dev, unsigned long nr_to_scan)
{ … }
#endif
static const int vmap_shrink_limit = …;
static bool
vmap_shrink(struct drm_gem_object *obj)
{ … }
static int
msm_gem_shrinker_vmap(struct notifier_block *nb, unsigned long event, void *ptr)
{ … }
int msm_gem_shrinker_init(struct drm_device *dev)
{ … }
void msm_gem_shrinker_cleanup(struct drm_device *dev)
{ … }