linux/drivers/gpu/drm
Danilo Krummrich 6bcfe8eaee drm/fb: rename FB CMA helpers to FB DMA helpers
Rename "FB CMA" helpers to "FB DMA" helpers - considering the hierarchy
of APIs (mm/cma -> dma -> fb dma) calling them "FB DMA" seems to be
more applicable.

Besides that, commit e57924d4ae ("drm/doc: Task to rename CMA helpers")
requests to rename the CMA helpers and implies that people seem to be
confused about the naming.

In order to do this renaming the following script was used:

```
	#!/bin/bash

	DIRS="drivers/gpu include/drm Documentation/gpu"

	REGEX_SYM_UPPER="[0-9A-Z_\-]"
	REGEX_SYM_LOWER="[0-9a-z_\-]"

	REGEX_GREP_UPPER="(${REGEX_SYM_UPPER}*)(FB)_CMA_(${REGEX_SYM_UPPER}*)"
	REGEX_GREP_LOWER="(${REGEX_SYM_LOWER}*)(fb)_cma_(${REGEX_SYM_LOWER}*)"

	REGEX_SED_UPPER="s/${REGEX_GREP_UPPER}/\1\2_DMA_\3/g"
	REGEX_SED_LOWER="s/${REGEX_GREP_LOWER}/\1\2_dma_\3/g"

	# Find all upper case 'CMA' symbols and replace them with 'DMA'.
	for ff in $(grep -REHl "${REGEX_GREP_UPPER}" $DIRS)
	do
	       sed -i -E "$REGEX_SED_UPPER" $ff
	done

	# Find all lower case 'cma' symbols and replace them with 'dma'.
	for ff in $(grep -REHl "${REGEX_GREP_LOWER}" $DIRS)
	do
	       sed -i -E "$REGEX_SED_LOWER" $ff
	done

	# Replace all occurrences of 'CMA' / 'cma' in comments and
	# documentation files with 'DMA' / 'dma'.
	for ff in $(grep -RiHl " cma " $DIRS)
	do
		sed -i -E "s/ cma / dma /g" $ff
		sed -i -E "s/ CMA / DMA /g" $ff
	done
```

Only a few more manual modifications were needed, e.g. reverting the
following modifications in some DRM Kconfig files

    -       select CMA if HAVE_DMA_CONTIGUOUS
    +       select DMA if HAVE_DMA_CONTIGUOUS

as well as manually picking the occurrences of 'CMA'/'cma' in comments and
documentation which relate to "FB CMA", but not "GEM CMA".

This patch is compile-time tested building a x86_64 kernel with
`make allyesconfig && make drivers/gpu/drm`.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> #drivers/gpu/drm/arm
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220802000405.949236-3-dakr@redhat.com
2022-08-03 18:30:55 +02:00
..
amd Merge drm/drm-next into drm-misc-next 2022-08-01 16:04:00 +02:00
arm drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
armada drm/armada: Use drm_plane_helper_destroy() 2022-07-26 18:42:10 +02:00
aspeed drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
ast drm/atomic-helper: Remove _HELPER_ infix from DRM_PLANE_HELPER_NO_SCALING 2022-07-26 18:42:00 +02:00
atmel-hlcdc drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
bridge drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log 2022-07-23 01:39:28 +02:00
display drm/dp_mst: fix drm_dp_dpcd_read return value checks 2022-07-29 13:55:39 +02:00
etnaviv Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next 2022-05-17 12:20:04 +10:00
exynos drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
fsl-dcu drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
gma500 drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
gud drm/gud: Fix endianness in gud_xrgb8888_to_color() helper 2022-07-19 16:17:31 +02:00
hisilicon drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
hyperv drm/hyperv-drm: Include framebuffer and EDID headers 2022-06-22 16:07:38 +02:00
i2c drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
i810
i915 Merge drm/drm-next into drm-misc-next 2022-08-01 16:04:00 +02:00
imx drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
ingenic drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
kmb drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
lib
lima dma-buf: specify usage while adding fences to dma_resv obj v7 2022-04-07 12:53:53 +02:00
logicvc drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
mcde drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
mediatek drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
meson drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
mga
mgag200 Merge drm/drm-next into drm-misc-next 2022-08-01 16:04:00 +02:00
msm drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
mxsfb drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
nouveau Merge drm/drm-next into drm-misc-next 2022-08-01 16:04:00 +02:00
omapdrm drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
panel drm/panel/panel-sitronix-st7701: Add Densitron DMT028VGHMCMI-1A TFT 2022-07-27 09:19:27 +02:00
panfrost drm-misc-next for 5.20: 2022-06-15 19:12:17 +02:00
pl111 drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
qxl drm/plane-helper: Export individual helpers 2022-07-26 18:42:07 +02:00
r128 drm/r128: Fix undefined behavior due to shift overflowing the constant 2022-05-21 18:02:47 +02:00
radeon Merge drm/drm-next into drm-misc-next 2022-08-01 16:04:00 +02:00
rcar-du drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
rockchip drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
savage
scheduler drm/sched: move calling drm_sched_entity_select_rq 2022-07-19 17:22:25 +02:00
shmobile drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
sis drm/sis: use idr_init_base() to initialize dev_priv->object_idr 2022-07-28 15:35:56 +01:00
solomon drm/fb: remove unused includes of drm_fb_cma_helper.h 2022-08-03 18:30:20 +02:00
sprd drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
sti drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
stm drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
sun4i drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
tdfx
tegra drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
tests drm/tests: Split up test cases in igt_check_drm_format_min_pitch 2022-07-29 12:37:03 -01:00
tidss drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
tilcdc drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
tiny drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
ttm Merge drm/drm-next into drm-misc-next 2022-07-13 10:33:00 +02:00
tve200 drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
udl drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
v3d drm/fb: remove unused includes of drm_fb_cma_helper.h 2022-08-03 18:30:20 +02:00
vboxvideo drm/plane-helper: Export individual helpers 2022-07-26 18:42:07 +02:00
vc4 drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
vgem dma-buf: specify usage while adding fences to dma_resv obj v7 2022-04-07 12:53:53 +02:00
via drm/via: use idr_init_base() to initialize dev_priv->object_idr 2022-07-28 16:36:49 +02:00
virtio drm/atomic-helper: Remove _HELPER_ infix from DRM_PLANE_HELPER_NO_SCALING 2022-07-26 18:42:00 +02:00
vkms drm/atomic-helper: Remove _HELPER_ infix from DRM_PLANE_HELPER_NO_SCALING 2022-07-26 18:42:00 +02:00
vmwgfx drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
xen Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
xlnx drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
drm_agpsupport.c
drm_aperture.c drm/aperture: Run fbdev removal before internal helpers 2022-07-09 11:12:05 -07:00
drm_atomic_helper.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
drm_atomic_state_helper.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_atomic_uapi.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_atomic.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_auth.c drm: use idr_init_base() to initialize master->lessee_idr 2022-07-28 15:35:55 +01:00
drm_blend.c drm/doc: Fix comment typo 2022-06-28 07:56:32 +02:00
drm_bridge_connector.c drm: Config orientation property if panel provides it 2022-06-21 08:52:59 -07:00
drm_bridge.c drm/bridge: Avoid uninitialized variable warning 2022-07-08 13:41:28 +02:00
drm_buddy.c drm: add a check to verify the size alignment 2022-04-11 15:35:47 +02:00
drm_bufs.c
drm_cache.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
drm_client_modeset.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_client.c drm/client: Use actual bpp when allocating frame buffers 2022-07-09 15:00:52 +02:00
drm_color_mgmt.c drm: fix typo in comment 2022-05-04 14:09:34 +02:00
drm_connector.c drm/connector: Introduce drmm_connector_init 2022-07-13 10:46:06 +02:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
drm_crtc_internal.h drm/edid: abstract debugfs override EDID set/reset 2022-06-30 10:50:59 +03:00
drm_crtc.c drm/crtc: Introduce drmm_crtc_init_with_planes 2022-07-13 10:46:05 +02:00
drm_damage_helper.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_debugfs_crc.c
drm_debugfs.c drm/edid: abstract debugfs override EDID set/reset 2022-06-30 10:50:59 +03:00
drm_displayid.c drm/displayid: convert to drm_edid 2022-05-13 18:55:13 +03:00
drm_dma.c
drm_drv.c
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: take HF-EEODB extension count into account 2022-06-30 10:51:12 +03:00
drm_encoder_slave.c
drm_encoder.c drm/encoder: Introduce drmm_encoder_init 2022-07-13 10:46:05 +02:00
drm_fb_dma_helper.c drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
drm_fb_helper.c drm/fb-helper: Add support for DRM_FORMAT_C[124] 2022-07-09 15:07:09 +02:00
drm_file.c
drm_flip_work.c
drm_format_helper.c drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00
drm_fourcc.c drm/fourcc: Add DRM_FORMAT_D[1248] 2022-07-09 15:36:07 +02:00
drm_framebuffer.c drm:remove rebundant word "in" in comments 2022-07-19 09:03:24 +02:00
drm_gem_atomic_helper.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_gem_cma_helper.c drm/cma-helper: Describe what a "contiguous chunk" actually means 2022-06-08 17:36:15 +02:00
drm_gem_framebuffer_helper.c drm/gem-fb-helper: Use actual bpp for size calculations 2022-07-09 15:08:16 +02:00
drm_gem_shmem_helper.c drm: correct comments 2022-07-21 12:16:10 +02:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c drm/ttm: rename and cleanup ttm_bo_init 2022-07-11 10:53:13 +02:00
drm_gem.c dma-buf: add enum dma_resv_usage v4 2022-04-07 12:53:53 +02:00
drm_hashtab.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c drm: Prevent drm_copy_field() to attempt copying a NULL pointer 2022-07-15 10:25:36 +02:00
drm_irq.c
drm_kms_helper_common.c drm: Drop drm_edid.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
drm_lease.c
drm_legacy_misc.c
drm_legacy.h
drm_lock.c
drm_managed.c drm: Add DRM-managed mutex_init() 2022-05-05 09:04:10 +02:00
drm_memory.c
drm_mipi_dbi.c drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
drm_mipi_dsi.c drm/mipi-dsi: Detach devices when removing the host 2022-07-13 10:46:05 +02:00
drm_mm.c
drm_mode_config.c drm: use idr_init_base() to initialize mode_config.tile_idr 2022-07-28 15:35:56 +01:00
drm_mode_object.c drm/object: Add drm_object_property_get_default_value() function 2022-02-25 17:55:42 +01:00
drm_modes.c drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
drm_modeset_helper.c drm/plane-helper: Export individual helpers 2022-07-26 18:42:07 +02:00
drm_modeset_lock.c
drm_nomodeset.c
drm_of.c drm: Remove linux/media-bus-format.h from drm_crtc.h 2022-07-05 21:15:13 +03:00
drm_panel_orientation_quirks.c Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm/plane-helper: Export individual helpers 2022-07-26 18:42:07 +02:00
drm_plane.c drm/plane: Move range check for format_count earlier 2022-04-28 16:13:04 +01:00
drm_prime.c drm/prime: drop unexpected word "the" in the comments 2022-06-22 09:22:05 +02:00
drm_print.c
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c drm/probe-helper: add drm_connector_helper_get_modes() 2022-06-30 10:51:03 +03:00
drm_property.c
drm_rect.c
drm_scatter.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c drm/atomic-helper: Remove _HELPER_ infix from DRM_PLANE_HELPER_NO_SCALING 2022-07-26 18:42:00 +02:00
drm_syncobj.c drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline() 2022-06-13 08:54:16 +02:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank_work.c
drm_vblank.c drm: Use drm_mode_copy() 2022-04-12 09:27:20 +03:00
drm_vm.c LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
drm_vma_manager.c
drm_writeback.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
Kconfig drm: selftest: convert drm_mm selftest to KUnit 2022-07-11 14:00:05 +02:00
Makefile drm/fb: rename FB CMA helpers to FB DMA helpers 2022-08-03 18:30:55 +02:00