Lines Matching full:shmem
21 * struct drm_gem_shmem_object - GEM object backed by shmem
91 * @map_wc: map object write-combined (instead of using shmem defaults).
100 void drm_gem_shmem_free(struct drm_gem_shmem_object *shmem);
102 void drm_gem_shmem_put_pages(struct drm_gem_shmem_object *shmem);
103 int drm_gem_shmem_pin(struct drm_gem_shmem_object *shmem);
104 void drm_gem_shmem_unpin(struct drm_gem_shmem_object *shmem);
105 int drm_gem_shmem_vmap(struct drm_gem_shmem_object *shmem,
107 void drm_gem_shmem_vunmap(struct drm_gem_shmem_object *shmem,
109 int drm_gem_shmem_mmap(struct drm_gem_shmem_object *shmem, struct vm_area_struct *vma);
111 int drm_gem_shmem_pin_locked(struct drm_gem_shmem_object *shmem);
112 void drm_gem_shmem_unpin_locked(struct drm_gem_shmem_object *shmem);
114 int drm_gem_shmem_madvise(struct drm_gem_shmem_object *shmem, int madv);
116 static inline bool drm_gem_shmem_is_purgeable(struct drm_gem_shmem_object *shmem) in drm_gem_shmem_is_purgeable() argument
118 return (shmem->madv > 0) && in drm_gem_shmem_is_purgeable()
119 !shmem->vmap_use_count && shmem->sgt && in drm_gem_shmem_is_purgeable()
120 !shmem->base.dma_buf && !shmem->base.import_attach; in drm_gem_shmem_is_purgeable()
123 void drm_gem_shmem_purge(struct drm_gem_shmem_object *shmem);
125 struct sg_table *drm_gem_shmem_get_sg_table(struct drm_gem_shmem_object *shmem);
126 struct sg_table *drm_gem_shmem_get_pages_sgt(struct drm_gem_shmem_object *shmem);
128 void drm_gem_shmem_print_info(const struct drm_gem_shmem_object *shmem,
141 * This function wraps drm_gem_shmem_free(). Drivers that employ the shmem helpers
146 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_free() local
148 drm_gem_shmem_free(shmem); in drm_gem_shmem_object_free()
157 * This function wraps drm_gem_shmem_print_info(). Drivers that employ the shmem helpers should
163 const struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_print_info() local
165 drm_gem_shmem_print_info(shmem, p, indent); in drm_gem_shmem_object_print_info()
172 * This function wraps drm_gem_shmem_pin(). Drivers that employ the shmem helpers should
177 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_pin() local
179 return drm_gem_shmem_pin_locked(shmem); in drm_gem_shmem_object_pin()
186 * This function wraps drm_gem_shmem_unpin(). Drivers that employ the shmem helpers should
191 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_unpin() local
193 drm_gem_shmem_unpin_locked(shmem); in drm_gem_shmem_object_unpin()
200 * This function wraps drm_gem_shmem_get_sg_table(). Drivers that employ the shmem helpers should
208 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_get_sg_table() local
210 return drm_gem_shmem_get_sg_table(shmem); in drm_gem_shmem_object_get_sg_table()
216 * @map: Returns the kernel virtual address of the SHMEM GEM object's backing store.
218 * This function wraps drm_gem_shmem_vmap(). Drivers that employ the shmem helpers should
227 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_vmap() local
229 return drm_gem_shmem_vmap(shmem, map); in drm_gem_shmem_object_vmap()
235 * @map: Kernel virtual address where the SHMEM GEM object was mapped
237 * This function wraps drm_gem_shmem_vunmap(). Drivers that employ the shmem helpers should
243 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_vunmap() local
245 drm_gem_shmem_vunmap(shmem, map); in drm_gem_shmem_object_vunmap()
253 * This function wraps drm_gem_shmem_mmap(). Drivers that employ the shmem helpers should
261 struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj); in drm_gem_shmem_object_mmap() local
263 return drm_gem_shmem_mmap(shmem, vma); in drm_gem_shmem_object_mmap()
278 * DRM_GEM_SHMEM_DRIVER_OPS - Default shmem GEM operations
280 * This macro provides a shortcut for setting the shmem GEM operations in