diff options
Diffstat (limited to 'include/drm/drm_gem.h')
-rw-r--r-- | include/drm/drm_gem.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index f1f00fc2dba6..b8efd836edef 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -165,6 +165,16 @@ struct drm_gem_object_funcs { int (*mmap)(struct drm_gem_object *obj, struct vm_area_struct *vma); /** + * @evict: + * + * Evicts gem object out from memory. Used by the drm_gem_object_evict() + * helper. Returns 0 on success, -errno otherwise. + * + * This callback is optional. + */ + int (*evict)(struct drm_gem_object *obj); + + /** * @vm_ops: * * Virtual memory operations used with mmap. @@ -475,10 +485,13 @@ int drm_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, void drm_gem_lru_init(struct drm_gem_lru *lru, struct mutex *lock); void drm_gem_lru_remove(struct drm_gem_object *obj); +void drm_gem_lru_move_tail_locked(struct drm_gem_lru *lru, struct drm_gem_object *obj); void drm_gem_lru_move_tail(struct drm_gem_lru *lru, struct drm_gem_object *obj); unsigned long drm_gem_lru_scan(struct drm_gem_lru *lru, unsigned int nr_to_scan, unsigned long *remaining, bool (*shrink)(struct drm_gem_object *obj)); +int drm_gem_evict(struct drm_gem_object *obj); + #endif /* __DRM_GEM_H__ */ |