Skip to content

Commit c85dce1

Browse files
author
Thomas Zimmermann
committed
drm/xlnx: Initialize DRM driver instance with CMA helper macro
The xlnx driver uses CMA helpers with default callback functions. Initialize the driver structure with the rsp CMA helper macro. The driver is being converted to use GEM object functions as part of this change. Two callbacks, .dumb_destroy and .gem_prime_import, were initialized to their default implementations, so they are just kept empty now. v2: * initialize with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE (Laurent) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Hyun Kwon <[email protected]> Acked-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1adda8b commit c85dce1

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/gpu/drm/xlnx/zynqmp_dpsub.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,7 @@ static struct drm_driver zynqmp_dpsub_drm_driver = {
8080
.driver_features = DRIVER_MODESET | DRIVER_GEM |
8181
DRIVER_ATOMIC,
8282

83-
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
84-
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
85-
.gem_prime_export = drm_gem_prime_export,
86-
.gem_prime_import = drm_gem_prime_import,
87-
.gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
88-
.gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
89-
.gem_prime_vmap = drm_gem_cma_prime_vmap,
90-
.gem_prime_vunmap = drm_gem_cma_prime_vunmap,
91-
.gem_prime_mmap = drm_gem_cma_prime_mmap,
92-
.gem_free_object_unlocked = drm_gem_cma_free_object,
93-
.gem_vm_ops = &drm_gem_cma_vm_ops,
94-
.dumb_create = zynqmp_dpsub_dumb_create,
95-
.dumb_destroy = drm_gem_dumb_destroy,
83+
DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(zynqmp_dpsub_dumb_create),
9684

9785
.fops = &zynqmp_dpsub_drm_fops,
9886

0 commit comments

Comments
 (0)