~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/drm/drm_gem_cma_helper.h

Version: ~ [ linux-5.8-rc4 ] ~ [ linux-5.7.7 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.50 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.131 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.187 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.229 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.229 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __DRM_GEM_CMA_HELPER_H__
  2 #define __DRM_GEM_CMA_HELPER_H__
  3 
  4 struct drm_gem_cma_object {
  5         struct drm_gem_object base;
  6         dma_addr_t paddr;
  7         struct sg_table *sgt;
  8 
  9         /* For objects with DMA memory allocated by GEM CMA */
 10         void *vaddr;
 11 };
 12 
 13 static inline struct drm_gem_cma_object *
 14 to_drm_gem_cma_obj(struct drm_gem_object *gem_obj)
 15 {
 16         return container_of(gem_obj, struct drm_gem_cma_object, base);
 17 }
 18 
 19 /* free gem object. */
 20 void drm_gem_cma_free_object(struct drm_gem_object *gem_obj);
 21 
 22 /* create memory region for drm framebuffer. */
 23 int drm_gem_cma_dumb_create(struct drm_file *file_priv,
 24                 struct drm_device *drm, struct drm_mode_create_dumb *args);
 25 
 26 /* map memory region for drm framebuffer to user space. */
 27 int drm_gem_cma_dumb_map_offset(struct drm_file *file_priv,
 28                 struct drm_device *drm, uint32_t handle, uint64_t *offset);
 29 
 30 /* set vm_flags and we can change the vm attribute to other one at here. */
 31 int drm_gem_cma_mmap(struct file *filp, struct vm_area_struct *vma);
 32 
 33 /*
 34  * destroy memory region allocated.
 35  *      - a gem handle and physical memory region pointed by a gem object
 36  *      would be released by drm_gem_handle_delete().
 37  */
 38 int drm_gem_cma_dumb_destroy(struct drm_file *file_priv,
 39                 struct drm_device *drm, unsigned int handle);
 40 
 41 /* allocate physical memory. */
 42 struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
 43                 unsigned int size);
 44 
 45 extern const struct vm_operations_struct drm_gem_cma_vm_ops;
 46 
 47 #ifdef CONFIG_DEBUG_FS
 48 void drm_gem_cma_describe(struct drm_gem_cma_object *obj, struct seq_file *m);
 49 #endif
 50 
 51 struct sg_table *drm_gem_cma_prime_get_sg_table(struct drm_gem_object *obj);
 52 struct drm_gem_object *
 53 drm_gem_cma_prime_import_sg_table(struct drm_device *dev, size_t size,
 54                                   struct sg_table *sgt);
 55 int drm_gem_cma_prime_mmap(struct drm_gem_object *obj,
 56                            struct vm_area_struct *vma);
 57 void *drm_gem_cma_prime_vmap(struct drm_gem_object *obj);
 58 void drm_gem_cma_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
 59 
 60 #endif /* __DRM_GEM_CMA_HELPER_H__ */
 61 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp