From 80cf656c25b6febea689c49a4bcec98ed8776d64 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Wed, 23 Sep 2020 12:21:44 +0200 Subject: [PATCH] drm/imx/dcss: Initialize DRM driver instance with CMA helper macro MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The i.MX DCSS 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, .gem_prime_export and .gem_prime_import, were initialized to their default implementations, so they are just kept empty now. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurentiu Palcu Acked-by: Christian König Reported-by: kernel test robot Link: https://patchwork.freedesktop.org/patch/msgid/20200923102159.24084-8-tzimmermann@suse.de --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c index 135a623..b72e5ce 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-kms.c +++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c @@ -28,19 +28,7 @@ static const struct drm_mode_config_funcs dcss_drm_mode_config_funcs = { static struct drm_driver dcss_kms_driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, - .gem_free_object_unlocked = drm_gem_cma_free_object, - .gem_vm_ops = &drm_gem_cma_vm_ops, - .dumb_create = drm_gem_cma_dumb_create, - - .prime_handle_to_fd = drm_gem_prime_handle_to_fd, - .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_import = drm_gem_prime_import, - .gem_prime_export = drm_gem_prime_export, - .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, + DRM_GEM_CMA_DRIVER_OPS, .fops = &dcss_cma_fops, .name = "imx-dcss", .desc = "i.MX8MQ Display Subsystem", -- 2.7.4