b24413180f560 (Greg Kroah-Hartman 2017-11-01 15:07:57 +0100 1) /* SPDX-License-Identifier: GPL-2.0 */
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 2) #ifndef __DRM_GEM_CMA_HELPER_H__
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 3) #define __DRM_GEM_CMA_HELPER_H__
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 4)
785cabaae94e2 (Sam Ravnborg 2019-01-08 20:29:39 +0100 5) #include <drm/drm_file.h>
785cabaae94e2 (Sam Ravnborg 2019-01-08 20:29:39 +0100 6) #include <drm/drm_ioctl.h>
d9fc9413f97f5 (Daniel Vetter 2014-09-23 15:46:53 +0200 7) #include <drm/drm_gem.h>
740c22ae516c2 (Shawn Guo 2014-03-24 20:14:48 +0800 8)
785cabaae94e2 (Sam Ravnborg 2019-01-08 20:29:39 +0100 9) struct drm_mode_create_dumb;
785cabaae94e2 (Sam Ravnborg 2019-01-08 20:29:39 +0100 10)
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 11) /**
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 12) * struct drm_gem_cma_object - GEM object backed by CMA memory allocations
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 13) * @base: base GEM object
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 14) * @paddr: physical address of the backing memory
998fb1a0f478b (Liviu Dudau 2017-11-10 13:33:10 +0000 15) * @sgt: scatter/gather table for imported PRIME buffers. The table can have
998fb1a0f478b (Liviu Dudau 2017-11-10 13:33:10 +0000 16) * more than one entry but they are guaranteed to have contiguous
998fb1a0f478b (Liviu Dudau 2017-11-10 13:33:10 +0000 17) * DMA addresses.
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 18) * @vaddr: kernel virtual address of the backing memory
cf8ccbc72d610 (Paul Cercueil 2021-05-23 18:04:13 +0100 19) * @map_noncoherent: if true, the GEM object is backed by non-coherent memory
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 20) */
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 21) struct drm_gem_cma_object {
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 22) struct drm_gem_object base;
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 23) dma_addr_t paddr;
71d7282a0f1ab (Laurent Pinchart 2013-02-17 01:57:30 +0100 24) struct sg_table *sgt;
71d7282a0f1ab (Laurent Pinchart 2013-02-17 01:57:30 +0100 25)
71d7282a0f1ab (Laurent Pinchart 2013-02-17 01:57:30 +0100 26) /* For objects with DMA memory allocated by GEM CMA */
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 27) void *vaddr;
cf8ccbc72d610 (Paul Cercueil 2021-05-23 18:04:13 +0100 28)
cf8ccbc72d610 (Paul Cercueil 2021-05-23 18:04:13 +0100 29) bool map_noncoherent;
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 30) };
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 31)
8d25ccebef55b (Noralf Trønnes 2017-11-07 20:13:42 +0100 32) #define to_drm_gem_cma_obj(gem_obj) \
8d25ccebef55b (Noralf Trønnes 2017-11-07 20:13:42 +0100 33) container_of(gem_obj, struct drm_gem_cma_object, base)
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 34)
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 35) #ifndef CONFIG_MMU
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 36) #define DRM_GEM_CMA_UNMAPPED_AREA_FOPS \
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 37) .get_unmapped_area = drm_gem_cma_get_unmapped_area,
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 38) #else
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 39) #define DRM_GEM_CMA_UNMAPPED_AREA_FOPS
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 40) #endif
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 41)
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 42) /**
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 43) * DEFINE_DRM_GEM_CMA_FOPS() - macro to generate file operations for CMA drivers
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 44) * @name: name for the generated structure
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 45) *
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 46) * This macro autogenerates a suitable &struct file_operations for CMA based
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 47) * drivers, which can be assigned to &drm_driver.fops. Note that this structure
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 48) * cannot be shared between drivers, because it contains a reference to the
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 49) * current module using THIS_MODULE.
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 50) *
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 51) * Note that the declaration is already marked as static - if you need a
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 52) * non-static version of this you're probably doing it wrong and will break the
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 53) * THIS_MODULE reference by accident.
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 54) */
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 55) #define DEFINE_DRM_GEM_CMA_FOPS(name) \
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 56) static const struct file_operations name = {\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 57) .owner = THIS_MODULE,\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 58) .open = drm_open,\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 59) .release = drm_release,\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 60) .unlocked_ioctl = drm_ioctl,\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 61) .compat_ioctl = drm_compat_ioctl,\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 62) .poll = drm_poll,\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 63) .read = drm_read,\
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 64) .llseek = noop_llseek,\
f5ca8eb6f9bd5 (Thomas Zimmermann 2020-11-23 12:56:46 +0100 65) .mmap = drm_gem_mmap,\
75cccac4028ce (Eric Anholt 2017-04-17 16:31:24 -0700 66) DRM_GEM_CMA_UNMAPPED_AREA_FOPS \
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 67) }
d55f7e5d54c31 (Daniel Vetter 2017-03-08 15:12:56 +0100 68)
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 69) /* free GEM object */
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 70) void drm_gem_cma_free_object(struct drm_gem_object *gem_obj);
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 71)
6d1782919dc9b (Thierry Reding 2014-11-03 11:48:49 +0100 72) /* create memory region for DRM framebuffer */
6d1782919dc9b (Thierry Reding 2014-11-03 11:48:49 +0100 73) int drm_gem_cma_dumb_create_internal(struct drm_file *file_priv,
6d1782919dc9b (Thierry Reding 2014-11-03 11:48:49 +0100 74) struct drm_device *drm,
6d1782919dc9b (Thierry Reding 2014-11-03 11:48:49 +0100 75) struct drm_mode_create_dumb *args);
6d1782919dc9b (Thierry Reding 2014-11-03 11:48:49 +0100 76)
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 77) /* create memory region for DRM framebuffer */
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 78) int drm_gem_cma_dumb_create(struct drm_file *file_priv,
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 79) struct drm_device *drm,
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 80) struct drm_mode_create_dumb *args);
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 81)
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 82) /* allocate physical memory */
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 83) struct drm_gem_cma_object *drm_gem_cma_create(struct drm_device *drm,
d7883f8759ab6 (Thierry Reding 2014-11-03 13:56:55 +0100 84) size_t size);
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 85)
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 86) extern const struct vm_operations_struct drm_gem_cma_vm_ops;
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 87)
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 88) #ifndef CONFIG_MMU
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 89) unsigned long drm_gem_cma_get_unmapped_area(struct file *filp,
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 90) unsigned long addr,
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 91) unsigned long len,
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 92) unsigned long pgoff,
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 93) unsigned long flags);
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 94) #endif
62a0d98a188cc (Benjamin Gaignard 2017-01-04 10:12:57 +0100 95)
d68920120d712 (Noralf Trønnes 2017-11-07 20:13:43 +0100 96) void drm_gem_cma_print_info(struct drm_printer *p, unsigned int indent,
d68920120d712 (Noralf Trønnes 2017-11-07 20:13:43 +0100 97) const struct drm_gem_object *obj);
6f646095ec2f5 (Rob Clark 2012-12-10 10:46:43 -0600 98)
bc2532ab7c208 (Thomas Zimmermann 2020-11-23 12:56:45 +0100 99) struct sg_table *drm_gem_cma_get_sg_table(struct drm_gem_object *obj);
78467dc5f70fb (Joonyoung Shim 2013-06-28 14:24:54 +0900 100) struct drm_gem_object *
b5e9c1a25fcf8 (Maarten Lankhorst 2014-01-09 11:03:14 +0100 101) drm_gem_cma_prime_import_sg_table(struct drm_device *dev,
b5e9c1a25fcf8 (Maarten Lankhorst 2014-01-09 11:03:14 +0100 102) struct dma_buf_attachment *attach,
78467dc5f70fb (Joonyoung Shim 2013-06-28 14:24:54 +0900 103) struct sg_table *sgt);
bc2532ab7c208 (Thomas Zimmermann 2020-11-23 12:56:45 +0100 104) int drm_gem_cma_vmap(struct drm_gem_object *obj, struct dma_buf_map *map);
f5ca8eb6f9bd5 (Thomas Zimmermann 2020-11-23 12:56:46 +0100 105) int drm_gem_cma_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma);
78467dc5f70fb (Joonyoung Shim 2013-06-28 14:24:54 +0900 106)
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 107) /**
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 108) * DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE - CMA GEM driver operations
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 109) * @dumb_create_func: callback function for .dumb_create
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 110) *
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 111) * This macro provides a shortcut for setting the default GEM operations in the
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 112) * &drm_driver structure.
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 113) *
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 114) * This macro is a variant of DRM_GEM_CMA_DRIVER_OPS for drivers that
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 115) * override the default implementation of &struct rm_driver.dumb_create. Use
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 116) * DRM_GEM_CMA_DRIVER_OPS if possible. Drivers that require a virtual address
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 117) * on imported buffers should use
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 118) * DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE() instead.
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 119) */
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 120) #define DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(dumb_create_func) \
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 121) .dumb_create = (dumb_create_func), \
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 122) .prime_handle_to_fd = drm_gem_prime_handle_to_fd, \
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 123) .prime_fd_to_handle = drm_gem_prime_fd_to_handle, \
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 124) .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table, \
f5ca8eb6f9bd5 (Thomas Zimmermann 2020-11-23 12:56:46 +0100 125) .gem_prime_mmap = drm_gem_prime_mmap
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 126)
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 127) /**
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 128) * DRM_GEM_CMA_DRIVER_OPS - CMA GEM driver operations
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 129) *
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 130) * This macro provides a shortcut for setting the default GEM operations in the
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 131) * &drm_driver structure.
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 132) *
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 133) * Drivers that come with their own implementation of
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 134) * &struct drm_driver.dumb_create should use
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 135) * DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE() instead. Use
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 136) * DRM_GEM_CMA_DRIVER_OPS if possible. Drivers that require a virtual address
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 137) * on imported buffers should use DRM_GEM_CMA_DRIVER_OPS_VMAP instead.
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 138) */
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 139) #define DRM_GEM_CMA_DRIVER_OPS \
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 140) DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(drm_gem_cma_dumb_create)
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 141)
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 142) /**
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 143) * DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE - CMA GEM driver operations
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 144) * ensuring a virtual address
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 145) * on the buffer
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 146) * @dumb_create_func: callback function for .dumb_create
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 147) *
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 148) * This macro provides a shortcut for setting the default GEM operations in the
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 149) * &drm_driver structure for drivers that need the virtual address also on
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 150) * imported buffers.
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 151) *
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 152) * This macro is a variant of DRM_GEM_CMA_DRIVER_OPS_VMAP for drivers that
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 153) * override the default implementation of &struct drm_driver.dumb_create. Use
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 154) * DRM_GEM_CMA_DRIVER_OPS_VMAP if possible. Drivers that do not require a
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 155) * virtual address on imported buffers should use
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 156) * DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE() instead.
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 157) */
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 158) #define DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE(dumb_create_func) \
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 159) .dumb_create = dumb_create_func, \
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 160) .prime_handle_to_fd = drm_gem_prime_handle_to_fd, \
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 161) .prime_fd_to_handle = drm_gem_prime_fd_to_handle, \
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 162) .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table_vmap, \
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 163) .gem_prime_mmap = drm_gem_prime_mmap
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 164)
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 165) /**
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 166) * DRM_GEM_CMA_DRIVER_OPS_VMAP - CMA GEM driver operations ensuring a virtual
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 167) * address on the buffer
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 168) *
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 169) * This macro provides a shortcut for setting the default GEM operations in the
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 170) * &drm_driver structure for drivers that need the virtual address also on
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 171) * imported buffers.
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 172) *
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 173) * Drivers that come with their own implementation of
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 174) * &struct drm_driver.dumb_create should use
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 175) * DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE() instead. Use
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 176) * DRM_GEM_CMA_DRIVER_OPS_VMAP if possible. Drivers that do not require a
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 177) * virtual address on imported buffers should use DRM_GEM_CMA_DRIVER_OPS
654bf12bad116 (Thomas Zimmermann 2020-06-05 09:32:07 +0200 178) * instead.
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 179) */
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 180) #define DRM_GEM_CMA_DRIVER_OPS_VMAP \
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 181) DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE(drm_gem_cma_dumb_create)
06d6620164b29 (Thomas Zimmermann 2020-06-05 09:32:06 +0200 182)
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 183) struct drm_gem_object *
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 184) drm_gem_cma_prime_import_sg_table_vmap(struct drm_device *drm,
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 185) struct dma_buf_attachment *attach,
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 186) struct sg_table *sgt);
b9068cde51eea (Noralf Trønnes 2018-11-10 15:56:46 +0100 187)
b9d4745005461 (Sascha Hauer 2012-06-27 15:30:18 +0200 188) #endif /* __DRM_GEM_CMA_HELPER_H__ */