diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-11-06 16:16:32 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-11-09 11:23:03 +0300 |
commit | a39855076c859b7f6c58ed4da8f195a2a6cd3c7b (patch) | |
tree | 0d1d4a690f8865d75eb4beaee2ad7b0851bff8d1 /include/drm | |
parent | 222ec45f4c69dfa8cd02c72928147ac06dffffa2 (diff) | |
download | linux-a39855076c859b7f6c58ed4da8f195a2a6cd3c7b.tar.xz |
drm/cma-helper: Make default object functions the default
As GEM object functions are now mandatory, DRM drivers based on CMA
helpers either set them in their implementation of gem_create_object,
or use the default via drm_gem_cma_create_object_default_funcs().
Simplify this by setting the default CMA object functions for all
objects that don't have any functions of their own. Follows the pattern
of similar code in SHMEM and VRAM helpers. The function
drm_gem_cma_create_object_default_funcs() is redundant and therefore
being removed.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201106131632.6796-1-tzimmermann@suse.de
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_gem_cma_helper.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/drm/drm_gem_cma_helper.h b/include/drm/drm_gem_cma_helper.h index caf98b9cf4b4..5605c1b8f779 100644 --- a/include/drm/drm_gem_cma_helper.h +++ b/include/drm/drm_gem_cma_helper.h @@ -105,9 +105,6 @@ int drm_gem_cma_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma); int drm_gem_cma_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map); -struct drm_gem_object * -drm_gem_cma_create_object_default_funcs(struct drm_device *dev, size_t size); - /** * DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE - CMA GEM driver operations * @dumb_create_func: callback function for .dumb_create @@ -122,7 +119,6 @@ drm_gem_cma_create_object_default_funcs(struct drm_device *dev, size_t size); * DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE() instead. */ #define DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(dumb_create_func) \ - .gem_create_object = drm_gem_cma_create_object_default_funcs, \ .dumb_create = (dumb_create_func), \ .prime_handle_to_fd = drm_gem_prime_handle_to_fd, \ .prime_fd_to_handle = drm_gem_prime_fd_to_handle, \ @@ -161,7 +157,6 @@ drm_gem_cma_create_object_default_funcs(struct drm_device *dev, size_t size); * DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE() instead. */ #define DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE(dumb_create_func) \ - .gem_create_object = drm_gem_cma_create_object_default_funcs, \ .dumb_create = dumb_create_func, \ .prime_handle_to_fd = drm_gem_prime_handle_to_fd, \ .prime_fd_to_handle = drm_gem_prime_fd_to_handle, \ |