summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-09-23 12:21:58 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2020-09-25 09:21:43 +0200
commitc85dce1b2e7e5037ef9f01bc64a26e40c92a9e79 (patch)
tree2925c9d45379e24c70107456552cfbf01e319d92
parent1adda8b8f12c22705e7f86c120499d806d09af6a (diff)
downloadlinux-stable-c85dce1b2e7e5037ef9f01bc64a26e40c92a9e79.tar.gz
linux-stable-c85dce1b2e7e5037ef9f01bc64a26e40c92a9e79.tar.bz2
linux-stable-c85dce1b2e7e5037ef9f01bc64a26e40c92a9e79.zip
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 <tzimmermann@suse.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> Acked-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-22-tzimmermann@suse.de
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_dpsub.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
index 8e69303aad3f..f3ffc3703a0e 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_dpsub.c
@@ -80,19 +80,7 @@ static struct drm_driver zynqmp_dpsub_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM |
DRIVER_ATOMIC,
- .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
- .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
- .gem_prime_export = drm_gem_prime_export,
- .gem_prime_import = drm_gem_prime_import,
- .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table,
- .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table,
- .gem_prime_vmap = drm_gem_cma_prime_vmap,
- .gem_prime_vunmap = drm_gem_cma_prime_vunmap,
- .gem_prime_mmap = drm_gem_cma_prime_mmap,
- .gem_free_object_unlocked = drm_gem_cma_free_object,
- .gem_vm_ops = &drm_gem_cma_vm_ops,
- .dumb_create = zynqmp_dpsub_dumb_create,
- .dumb_destroy = drm_gem_dumb_destroy,
+ DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(zynqmp_dpsub_dumb_create),
.fops = &zynqmp_dpsub_drm_fops,