Skip to content

Commit 06d6620

Browse files
committed
drm/cma-helper: Rework DRM_GEM_CMA_VMAP_DRIVER_OPS macro
Rename the macro to DRM_GEM_CMA_DRIVER_OPS_VMAP to align naming with SHMEM helpers and drm_gem_cma_prime_import_sg_table_vmap(). An variant of the macro is provided for drivers that override the default .dumb_create callback. Adapt drivers to the changes. v3: * rename macro to signal implicit vmap on imported buffers v2: * provide DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-3-tzimmermann@suse.de
1 parent 26eb603 commit 06d6620

12 files changed

Lines changed: 37 additions & 16 deletions

File tree

‎drivers/gpu/drm/drm_gem_cma_helper.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ EXPORT_SYMBOL(drm_gem_cma_create_object_default_funcs);
620620
* address set. This address is released when the object is freed.
621621
*
622622
* This function can be used as the &drm_driver.gem_prime_import_sg_table
623-
* callback. The DRM_GEM_CMA_VMAP_DRIVER_OPS() macro provides a shortcut to set
623+
* callback. The &DRM_GEM_CMA_DRIVER_OPS_VMAP macro provides a shortcut to set
624624
* the necessary DRM driver operations.
625625
*
626626
* Returns:

‎drivers/gpu/drm/sun4i/sun4i_drv.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ static struct drm_driver sun4i_drv_driver = {
5252
.minor = 0,
5353

5454
/* GEM Operations */
55-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
56-
.dumb_create = drm_sun4i_gem_dumb_create,
55+
DRM_GEM_CMA_DRIVER_OPS_VMAP_WITH_DUMB_CREATE(drm_sun4i_gem_dumb_create),
5756
};
5857

5958
static int sun4i_drv_bind(struct device *dev)

‎drivers/gpu/drm/tidss/tidss_drv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static struct drm_driver tidss_driver = {
112112
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
113113
.fops = &tidss_fops,
114114
.release = tidss_release,
115-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
115+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
116116
.name = "tidss",
117117
.desc = "TI Keystone DSS",
118118
.date = "20180215",

‎drivers/gpu/drm/tiny/hx8357d.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ DEFINE_DRM_GEM_CMA_FOPS(hx8357d_fops);
196196
static struct drm_driver hx8357d_driver = {
197197
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
198198
.fops = &hx8357d_fops,
199-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
199+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
200200
.debugfs_init = mipi_dbi_debugfs_init,
201201
.name = "hx8357d",
202202
.desc = "HX8357D",

‎drivers/gpu/drm/tiny/ili9225.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ DEFINE_DRM_GEM_CMA_FOPS(ili9225_fops);
346346
static struct drm_driver ili9225_driver = {
347347
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
348348
.fops = &ili9225_fops,
349-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
349+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
350350
.name = "ili9225",
351351
.desc = "Ilitek ILI9225",
352352
.date = "20171106",

‎drivers/gpu/drm/tiny/ili9341.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ DEFINE_DRM_GEM_CMA_FOPS(ili9341_fops);
152152
static struct drm_driver ili9341_driver = {
153153
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
154154
.fops = &ili9341_fops,
155-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
155+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
156156
.debugfs_init = mipi_dbi_debugfs_init,
157157
.name = "ili9341",
158158
.desc = "Ilitek ILI9341",

‎drivers/gpu/drm/tiny/ili9486.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ DEFINE_DRM_GEM_CMA_FOPS(ili9486_fops);
165165
static struct drm_driver ili9486_driver = {
166166
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
167167
.fops = &ili9486_fops,
168-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
168+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
169169
.debugfs_init = mipi_dbi_debugfs_init,
170170
.name = "ili9486",
171171
.desc = "Ilitek ILI9486",

‎drivers/gpu/drm/tiny/mi0283qt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ DEFINE_DRM_GEM_CMA_FOPS(mi0283qt_fops);
156156
static struct drm_driver mi0283qt_driver = {
157157
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
158158
.fops = &mi0283qt_fops,
159-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
159+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
160160
.debugfs_init = mipi_dbi_debugfs_init,
161161
.name = "mi0283qt",
162162
.desc = "Multi-Inno MI0283QT",

‎drivers/gpu/drm/tiny/repaper.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ DEFINE_DRM_GEM_CMA_FOPS(repaper_fops);
946946
static struct drm_driver repaper_driver = {
947947
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
948948
.fops = &repaper_fops,
949-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
949+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
950950
.name = "repaper",
951951
.desc = "Pervasive Displays RePaper e-ink panels",
952952
.date = "20170405",

‎drivers/gpu/drm/tiny/st7586.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ DEFINE_DRM_GEM_CMA_FOPS(st7586_fops);
285285
static struct drm_driver st7586_driver = {
286286
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
287287
.fops = &st7586_fops,
288-
DRM_GEM_CMA_VMAP_DRIVER_OPS,
288+
DRM_GEM_CMA_DRIVER_OPS_VMAP,
289289
.debugfs_init = mipi_dbi_debugfs_init,
290290
.name = "st7586",
291291
.desc = "Sitronix ST7586",

0 commit comments

Comments
 (0)