drm: rename CMA helpers to DMA helpers
Subsystems (53)
v2 cover drm: rename CMA helpers to DMA helpers
This patch series renames all CMA helpers to DMA helpers - considering the hierarchy of APIs (mm/cma -> dma -> gem/fb dma helpers) calling them DMA helpers seems to be more applicable.
Additionally, commit e57924d4ae80 ("drm/doc: Task to rename CMA helpers") requests to rename the CMA helpers and implies that people seem to be confused about the naming.
The patches are compile-time tested building a x86_64 kernel with make allyesconfig && make drivers/gpu/drm.
Changes in v2:
- Fixed up comments for consistent memory/address classification (DMA-contiguous)
- Added a patch to rename struct drm_gem_dma_object.{paddr => dma_addr}
Danilo Krummrich (4):
drm/fb: rename FB CMA helpers to FB DMA helpers drm/gem: rename GEM CMA helpers to GEM DMA helpers drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} drm/todo: remove task to rename CMA helpers
Documentation/gpu/drm-kms-helpers.rst | 8 +-
Documentation/gpu/drm-mm.rst | 16 +-
Documentation/gpu/todo.rst | 13 -
drivers/gpu/drm/Kconfig | 4 +-
drivers/gpu/drm/Makefile | 6 +-
drivers/gpu/drm/arm/Kconfig | 4 +-
drivers/gpu/drm/arm/display/Kconfig | 2 +-
.../arm/display/komeda/komeda_framebuffer.c | 12 +-
.../gpu/drm/arm/display/komeda/komeda_kms.c | 10 +-
drivers/gpu/drm/arm/hdlcd_crtc.c | 6 +-
drivers/gpu/drm/arm/hdlcd_drv.c | 8 +-
drivers/gpu/drm/arm/malidp_drv.c | 10 +-
drivers/gpu/drm/arm/malidp_mw.c | 8 +-
drivers/gpu/drm/arm/malidp_planes.c | 34 +-
drivers/gpu/drm/armada/armada_gem.c | 6 +-
drivers/gpu/drm/aspeed/Kconfig | 2 +-
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 10 +-
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 8 +-
drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 6 +-
.../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 6 +-
...rm_fb_cma_helper.c => drm_fb_dma_helper.c} | 67 ++--
drivers/gpu/drm/drm_file.c | 2 +-
drivers/gpu/drm/drm_format_helper.c | 4 +-
..._gem_cma_helper.c => drm_gem_dma_helper.c} | 314 +++++++++---------
drivers/gpu/drm/drm_mipi_dbi.c | 2 +-
drivers/gpu/drm/fsl-dcu/Kconfig | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 8 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 8 +-
drivers/gpu/drm/hisilicon/kirin/Kconfig | 2 +-
.../gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 +-
.../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 4 +-
drivers/gpu/drm/imx/Kconfig | 2 +-
drivers/gpu/drm/imx/dcss/Kconfig | 2 +-
drivers/gpu/drm/imx/dcss/dcss-kms.c | 6 +-
drivers/gpu/drm/imx/dcss/dcss-plane.c | 18 +-
drivers/gpu/drm/imx/imx-drm-core.c | 10 +-
drivers/gpu/drm/imx/imx-drm.h | 2 +-
drivers/gpu/drm/imx/ipuv3-crtc.c | 4 +-
drivers/gpu/drm/imx/ipuv3-plane.c | 28 +-
drivers/gpu/drm/ingenic/Kconfig | 2 +-
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 14 +-
drivers/gpu/drm/ingenic/ingenic-ipu.c | 12 +-
drivers/gpu/drm/kmb/Kconfig | 2 +-
drivers/gpu/drm/kmb/kmb_drv.c | 6 +-
drivers/gpu/drm/kmb/kmb_plane.c | 10 +-
drivers/gpu/drm/mcde/Kconfig | 2 +-
drivers/gpu/drm/mcde/mcde_display.c | 8 +-
drivers/gpu/drm/mcde/mcde_drv.c | 10 +-
drivers/gpu/drm/mediatek/Kconfig | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_gem.c | 4 +-
drivers/gpu/drm/meson/Kconfig | 2 +-
drivers/gpu/drm/meson/meson_drv.c | 10 +-
drivers/gpu/drm/meson/meson_overlay.c | 12 +-
drivers/gpu/drm/meson/meson_plane.c | 8 +-
drivers/gpu/drm/msm/msm_drv.c | 2 +-
drivers/gpu/drm/mxsfb/Kconfig | 2 +-
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 6 +-
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 10 +-
drivers/gpu/drm/panel/Kconfig | 2 +-
drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 6 +-
drivers/gpu/drm/pl111/Kconfig | 2 +-
drivers/gpu/drm/pl111/pl111_display.c | 8 +-
drivers/gpu/drm/pl111/pl111_drv.c | 10 +-
drivers/gpu/drm/rcar-du/Kconfig | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 4 +-
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 6 +-
drivers/gpu/drm/rcar-du/rcar_du_kms.c | 38 +--
drivers/gpu/drm/rcar-du/rcar_du_plane.c | 8 +-
drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 6 +-
drivers/gpu/drm/rockchip/Kconfig | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 4 +-
drivers/gpu/drm/shmobile/Kconfig | 2 +-
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 10 +-
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 6 +-
drivers/gpu/drm/shmobile/shmob_drm_kms.c | 4 +-
drivers/gpu/drm/shmobile/shmob_drm_kms.h | 2 +-
drivers/gpu/drm/shmobile/shmob_drm_plane.c | 10 +-
drivers/gpu/drm/solomon/ssd130x.c | 2 +-
drivers/gpu/drm/sprd/Kconfig | 2 +-
drivers/gpu/drm/sprd/sprd_dpu.c | 10 +-
drivers/gpu/drm/sprd/sprd_drm.c | 6 +-
drivers/gpu/drm/sti/Kconfig | 2 +-
drivers/gpu/drm/sti/sti_cursor.c | 14 +-
drivers/gpu/drm/sti/sti_drv.c | 8 +-
drivers/gpu/drm/sti/sti_gdp.c | 18 +-
drivers/gpu/drm/sti/sti_hqvdp.c | 18 +-
drivers/gpu/drm/sti/sti_plane.c | 4 +-
drivers/gpu/drm/stm/Kconfig | 2 +-
drivers/gpu/drm/stm/drv.c | 12 +-
drivers/gpu/drm/stm/ltdc.c | 16 +-
drivers/gpu/drm/sun4i/Kconfig | 2 +-
drivers/gpu/drm/sun4i/sun4i_backend.c | 6 +-
drivers/gpu/drm/sun4i/sun4i_drv.c | 10 +-
drivers/gpu/drm/sun4i/sun4i_frontend.c | 10 +-
drivers/gpu/drm/sun4i/sun8i_mixer.c | 4 +-
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 22 +-
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 22 +-
drivers/gpu/drm/tegra/fb.c | 2 +-
drivers/gpu/drm/tidss/Kconfig | 2 +-
drivers/gpu/drm/tidss/tidss_crtc.c | 4 +-
drivers/gpu/drm/tidss/tidss_dispc.c | 28 +-
drivers/gpu/drm/tidss/tidss_drv.c | 6 +-
drivers/gpu/drm/tidss/tidss_kms.c | 2 +-
drivers/gpu/drm/tidss/tidss_plane.c | 2 +-
drivers/gpu/drm/tilcdc/Kconfig | 2 +-
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 8 +-
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 +-
drivers/gpu/drm/tiny/Kconfig | 22 +-
drivers/gpu/drm/tiny/arcpgu.c | 14 +-
drivers/gpu/drm/tiny/hx8357d.c | 6 +-
drivers/gpu/drm/tiny/ili9163.c | 6 +-
drivers/gpu/drm/tiny/ili9225.c | 12 +-
drivers/gpu/drm/tiny/ili9341.c | 6 +-
drivers/gpu/drm/tiny/ili9486.c | 6 +-
drivers/gpu/drm/tiny/mi0283qt.c | 6 +-
drivers/gpu/drm/tiny/panel-mipi-dbi.c | 6 +-
drivers/gpu/drm/tiny/repaper.c | 12 +-
drivers/gpu/drm/tiny/st7586.c | 12 +-
drivers/gpu/drm/tiny/st7735r.c | 6 +-
drivers/gpu/drm/tve200/Kconfig | 2 +-
drivers/gpu/drm/tve200/tve200_display.c | 12 +-
drivers/gpu/drm/tve200/tve200_drv.c | 8 +-
drivers/gpu/drm/v3d/v3d_drv.c | 2 +-
drivers/gpu/drm/v3d/v3d_gem.c | 4 +-
drivers/gpu/drm/vc4/Kconfig | 2 +-
drivers/gpu/drm/vc4/vc4_bo.c | 46 +--
drivers/gpu/drm/vc4/vc4_crtc.c | 10 +-
drivers/gpu/drm/vc4/vc4_drv.c | 8 +-
drivers/gpu/drm/vc4/vc4_drv.h | 18 +-
drivers/gpu/drm/vc4/vc4_gem.c | 12 +-
drivers/gpu/drm/vc4/vc4_irq.c | 2 +-
drivers/gpu/drm/vc4/vc4_plane.c | 14 +-
drivers/gpu/drm/vc4/vc4_render_cl.c | 40 +--
drivers/gpu/drm/vc4/vc4_txp.c | 8 +-
drivers/gpu/drm/vc4/vc4_v3d.c | 8 +-
drivers/gpu/drm/vc4/vc4_validate.c | 28 +-
drivers/gpu/drm/vc4/vc4_validate_shaders.c | 2 +-
drivers/gpu/drm/xlnx/Kconfig | 2 +-
drivers/gpu/drm/xlnx/zynqmp_disp.c | 4 +-
drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 8 +-
...rm_fb_cma_helper.h => drm_fb_dma_helper.h} | 10 +-
include/drm/drm_gem.h | 2 +-
..._gem_cma_helper.h => drm_gem_dma_helper.h} | 158 ++++-----
147 files changed, 856 insertions(+), 858 deletions(-)
rename drivers/gpu/drm/{drm_fb_cma_helper.c => drm_fb_dma_helper.c} (60%)
rename drivers/gpu/drm/{drm_gem_cma_helper.c => drm_gem_dma_helper.c} (56%)
rename include/drm/{drm_fb_cma_helper.h => drm_fb_dma_helper.h} (56%)
rename include/drm/{drm_gem_cma_helper.h => drm_gem_dma_helper.h} (53%)Signature · 1 line
2.36.1
PATCH v2 1/4 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 e57924d4ae80 ("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.
---
Documentation/gpu/drm-kms-helpers.rst | 8 ++--
drivers/gpu/drm/Makefile | 2 +-
.../arm/display/komeda/komeda_framebuffer.c | 4 +-
drivers/gpu/drm/arm/hdlcd_crtc.c | 4 +-
drivers/gpu/drm/arm/hdlcd_drv.c | 2 +-
drivers/gpu/drm/arm/malidp_drv.c | 2 +-
drivers/gpu/drm/arm/malidp_mw.c | 4 +-
drivers/gpu/drm/arm/malidp_planes.c | 8 ++--
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 4 +-
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 2 +-
.../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 4 +-
...rm_fb_cma_helper.c => drm_fb_dma_helper.c} | 43 +++++++++++--------
drivers/gpu/drm/drm_format_helper.c | 4 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 4 +-
.../gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 +-
.../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +-
drivers/gpu/drm/imx/dcss/dcss-plane.c | 6 +--
drivers/gpu/drm/imx/imx-drm-core.c | 2 +-
drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +-
drivers/gpu/drm/imx/ipuv3-plane.c | 8 ++--
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 +--
drivers/gpu/drm/ingenic/ingenic-ipu.c | 10 ++---
drivers/gpu/drm/kmb/kmb_plane.c | 8 ++--
drivers/gpu/drm/mcde/mcde_display.c | 6 +--
drivers/gpu/drm/mcde/mcde_drv.c | 4 +-
drivers/gpu/drm/meson/meson_overlay.c | 8 ++--
drivers/gpu/drm/meson/meson_plane.c | 4 +-
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 ++--
drivers/gpu/drm/pl111/pl111_display.c | 6 +--
drivers/gpu/drm/pl111/pl111_drv.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_kms.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_plane.c | 4 +-
drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 +-
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 6 +--
drivers/gpu/drm/shmobile/shmob_drm_kms.c | 2 +-
drivers/gpu/drm/shmobile/shmob_drm_plane.c | 6 +--
drivers/gpu/drm/solomon/ssd130x.c | 2 +-
drivers/gpu/drm/sprd/sprd_dpu.c | 4 +-
drivers/gpu/drm/sti/sti_cursor.c | 6 +--
drivers/gpu/drm/sti/sti_drv.c | 2 +-
drivers/gpu/drm/sti/sti_gdp.c | 6 +--
drivers/gpu/drm/sti/sti_hqvdp.c | 6 +--
drivers/gpu/drm/sti/sti_plane.c | 2 +-
drivers/gpu/drm/stm/drv.c | 2 +-
drivers/gpu/drm/stm/ltdc.c | 14 +++---
drivers/gpu/drm/sun4i/sun4i_backend.c | 4 +-
drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_frontend.c | 8 ++--
drivers/gpu/drm/sun4i/sun8i_mixer.c | 2 +-
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 4 +-
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 4 +-
drivers/gpu/drm/tegra/fb.c | 2 +-
drivers/gpu/drm/tidss/tidss_crtc.c | 2 +-
drivers/gpu/drm/tidss/tidss_dispc.c | 6 +--
drivers/gpu/drm/tidss/tidss_kms.c | 2 +-
drivers/gpu/drm/tidss/tidss_plane.c | 2 +-
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 +-
drivers/gpu/drm/tiny/arcpgu.c | 4 +-
drivers/gpu/drm/tiny/ili9225.c | 4 +-
drivers/gpu/drm/tiny/repaper.c | 4 +-
drivers/gpu/drm/tiny/st7586.c | 4 +-
drivers/gpu/drm/tve200/tve200_display.c | 10 ++---
drivers/gpu/drm/tve200/tve200_drv.c | 2 +-
drivers/gpu/drm/v3d/v3d_drv.c | 2 +-
drivers/gpu/drm/vc4/vc4_crtc.c | 8 ++--
drivers/gpu/drm/vc4/vc4_drv.c | 2 +-
drivers/gpu/drm/vc4/vc4_plane.c | 10 ++---
drivers/gpu/drm/vc4/vc4_txp.c | 4 +-
drivers/gpu/drm/xlnx/zynqmp_disp.c | 4 +-
...rm_fb_cma_helper.h => drm_fb_dma_helper.h} | 10 ++---
74 files changed, 186 insertions(+), 181 deletions(-)
rename drivers/gpu/drm/{drm_fb_cma_helper.c => drm_fb_dma_helper.c} (70%)
rename include/drm/{drm_fb_cma_helper.h => drm_fb_dma_helper.h} (56%)Documentation/gpu/drm-kms-helpers.rst +4 -4
@@ -122,13 +122,13 @@ format Helper Functions Reference .. kernel-doc:: drivers/gpu/drm/drm_format_helper.c :export: -Framebuffer CMA Helper Functions Reference +Framebuffer DMA Helper Functions Reference ========================================== -.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c - :doc: framebuffer cma helper functions +.. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c + :doc: framebuffer dma helper functions -.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c +.. kernel-doc:: drivers/gpu/drm/drm_fb_dma_helper.c :export: Framebuffer GEM Helper Reference
drivers/gpu/drm/Makefile +1 -1
@@ -41,7 +41,7 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o drm_cma_helper-y := drm_gem_cma_helper.o -drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_cma_helper.o +drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o drm_shmem_helper-y := drm_gem_shmem_helper.o
drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +2 -2
@@ -5,7 +5,7 @@* */ #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
@@ -247,7 +247,7 @@ komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane)return -EINVAL ; } - obj =drm_fb_cma_get_gem_obj (fb, plane); + obj =drm_fb_dma_get_gem_obj (fb, plane); offset = fb->offsets[plane];if (!fb->modifier) {
drivers/gpu/drm/arm/hdlcd_crtc.c +2 -2
@@ -18,7 +18,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_of.h>
@@ -273,7 +273,7 @@ static void hdlcd_plane_atomic_update(struct drm_plane *plane,return ; dest_h =drm_rect_height (&new_plane_state->dst); - scanout_start =drm_fb_cma_get_gem_addr (fb, new_plane_state,0 ); + scanout_start =drm_fb_dma_get_gem_addr (fb, new_plane_state,0 ); hdlcd = plane->dev->dev_private;hdlcd_write (hdlcd,HDLCD_REG_FB_LINE_LENGTH , fb->pitches[0 ]);
drivers/gpu/drm/arm/hdlcd_drv.c +1 -1
@@ -25,7 +25,7 @@#include <drm/drm_crtc.h> #include <drm/drm_debugfs.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/arm/malidp_drv.c +1 -1
@@ -19,7 +19,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h>
drivers/gpu/drm/arm/malidp_mw.c +2 -2
@@ -9,7 +9,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_probe_helper.h>
@@ -158,7 +158,7 @@ malidp_mw_encoder_atomic_check(struct drm_encoder *encoder, n_planes = fb->format->num_planes;for (i =0 ; i < n_planes; i++) { -struct drm_gem_cma_object *obj =drm_fb_cma_get_gem_obj (fb, i); +struct drm_gem_cma_object *obj =drm_fb_dma_get_gem_obj (fb, i);/* memory write buffers are never rotated */ u8 alignment =malidp_hw_get_pitch_align (malidp->dev,0 );
drivers/gpu/drm/arm/malidp_planes.c +4 -4
@@ -12,7 +12,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
@@ -721,19 +721,19 @@ static void malidp_set_plane_base_addr(struct drm_framebuffer *fb, ptr = mp->layer->ptr + (plane_index <<4 );/* -* drm_fb_cma_get_gem_addr() alters the physical base address of the +* drm_fb_dma_get_gem_addr() alters the physical base address of the * framebuffer as per the plane's src_x, src_y co-ordinates (ie to * take care of source cropping). * For AFBC, this is not needed as the cropping is handled by _AD_CROP_H * and _AD_CROP_V registers. */ if (!afbc) { - paddr =drm_fb_cma_get_gem_addr (fb, plane->state, + paddr =drm_fb_dma_get_gem_addr (fb, plane->state, plane_index); }else {struct drm_gem_cma_object *obj; - obj =drm_fb_cma_get_gem_obj (fb, plane_index); + obj =drm_fb_dma_get_gem_obj (fb, plane_index);if (WARN_ON (!obj))return ;
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c +2 -2
@@ -7,7 +7,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -184,7 +184,7 @@ static void aspeed_gfx_pipe_update(struct drm_simple_display_pipe *pipe,if (!fb)return ; - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 );if (!gem)return ;writel (gem->paddr, priv->base +CRT_ADDR );
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +1 -1
@@ -16,7 +16,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +2 -2
@@ -11,7 +11,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h>
@@ -447,7 +447,7 @@ static void atmel_hlcdc_plane_update_buffers(struct atmel_hlcdc_plane *plane, sr =atmel_hlcdc_layer_read_reg (&plane->layer,ATMEL_HLCDC_LAYER_CHSR );for (i =0 ; i < state->nplanes; i++) { -struct drm_gem_cma_object *gem =drm_fb_cma_get_gem_obj (fb, i); +struct drm_gem_cma_object *gem =drm_fb_dma_get_gem_obj (fb, i); state->dscrs[i]->addr = gem->paddr + state->offsets[i];
drivers/gpu/drm/drm_fb_dma_helper.c renamed from drivers/gpu/drm/drm_fb_cma_helper.c +24 -19
120 lines not on this page · raw message
drivers/gpu/drm/drm_format_helper.c +2 -2
@@ -54,7 +54,7 @@ static int drm_fb_xfrm(void *dst, unsigned long dst_pitch, unsigned long dst_pixconst void *sbuf;/* -* Some source buffers, such as CMA memory, use write-combine +* Some source buffers, such as DMA memory, use write-combine * caching, so reads are uncached. Speed up access by fetching * one line at a time. */
@@ -664,7 +664,7 @@ void drm_fb_xrgb8888_to_mono(void *dst, unsigned int dst_pitch, const void *vadd dst_pitch =DIV_ROUND_UP (linepixels,8 );/* -* The cma memory is write-combined so reads are uncached. +* The dma memory is write-combined so reads are uncached. * Speed up by fetching one line at a time. * * Also, format conversion from XR24 to monochrome are done
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +1 -1
@@ -20,7 +20,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_modeset_helper.h>
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c +1 -1
@@ -6,7 +6,7 @@*/ #include <drm/drm_atomic_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +2 -2
@@ -10,7 +10,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h>
@@ -94,7 +94,7 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,if (index <0 )return ; - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 );switch (fb->format->format) {case DRM_FORMAT_RGB565 :
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +2 -2
@@ -24,7 +24,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h>
@@ -548,7 +548,7 @@ static const struct drm_crtc_funcs ade_crtc_funcs = {static void ade_rdma_set (void __iomem *base,struct drm_framebuffer *fb,u32 ch,u32 y,u32 in_h,u32 fmt) { -struct drm_gem_cma_object *obj =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *obj =drm_fb_dma_get_gem_obj (fb,0 );u32 reg_ctrl, reg_addr, reg_size, reg_stride, reg_space, reg_en;u32 stride = fb->pitches[0 ];u32 addr = (u32 )obj->paddr + y * stride;
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +1 -1
@@ -19,7 +19,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/imx/dcss/dcss-plane.c +3 -3
@@ -5,7 +5,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -154,7 +154,7 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,if (!fb || !new_plane_state->crtc)return 0 ; - cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); + cma_obj =drm_fb_dma_get_gem_obj (fb,0 );WARN_ON (!cma_obj); crtc_state = drm_atomic_get_existing_crtc_state(state,
@@ -216,7 +216,7 @@ static void dcss_plane_atomic_set_base(struct dcss_plane *dcss_plane)struct dcss_dev *dcss = plane->dev->dev_private;struct drm_framebuffer *fb = state->fb;const struct drm_format_info *format = fb->format; -struct drm_gem_cma_object *cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 );unsigned long p1_ba =0 , p2_ba =0 ; if (!format->is_yuv ||
drivers/gpu/drm/imx/imx-drm-core.c +1 -1
@@ -16,7 +16,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/imx/ipuv3-crtc.c +1 -1
@@ -18,7 +18,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/imx/ipuv3-plane.c +4 -4
@@ -7,7 +7,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -128,7 +128,7 @@ drm_plane_state_to_eba(struct drm_plane_state *state, int plane)int x = state->src.x1 >>16 ;int y = state->src.y1 >>16 ; - cma_obj =drm_fb_cma_get_gem_obj (fb, plane); + cma_obj =drm_fb_dma_get_gem_obj (fb, plane);BUG_ON (!cma_obj); return cma_obj->paddr + fb->offsets[plane] + fb->pitches[plane] * y +
@@ -144,7 +144,7 @@ drm_plane_state_to_ubo(struct drm_plane_state *state)int x = state->src.x1 >>16 ;int y = state->src.y1 >>16 ; - cma_obj =drm_fb_cma_get_gem_obj (fb,1 ); + cma_obj =drm_fb_dma_get_gem_obj (fb,1 );BUG_ON (!cma_obj); x /= fb->format->hsub;
@@ -163,7 +163,7 @@ drm_plane_state_to_vbo(struct drm_plane_state *state)int x = state->src.x1 >>16 ;int y = state->src.y1 >>16 ; - cma_obj =drm_fb_cma_get_gem_obj (fb,2 ); + cma_obj =drm_fb_dma_get_gem_obj (fb,2 );BUG_ON (!cma_obj); x /= fb->format->hsub;
drivers/gpu/drm/ingenic/ingenic-drm-drv.c +3 -3
@@ -30,7 +30,7 @@#include <drm/drm_drv.h> #include <drm/drm_encoder.h> #include <drm/drm_gem_cma_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h>
@@ -666,12 +666,12 @@ static void ingenic_drm_plane_atomic_update(struct drm_plane *plane,if (newstate && newstate->fb) {if (priv->soc_info->map_noncoherent) -drm_fb_cma_sync_non_coherent (&priv->drm, oldstate, newstate); +drm_fb_dma_sync_non_coherent (&priv->drm, oldstate, newstate); crtc_state = newstate->crtc->state; plane_id = !!(priv->soc_info->has_osd && plane != &priv->f0); - addr =drm_fb_cma_get_gem_addr (newstate->fb, newstate,0 ); + addr =drm_fb_dma_get_gem_addr (newstate->fb, newstate,0 ); width = newstate->src_w >>16 ; height = newstate->src_h >>16 ; cpp = newstate->fb->format->cpp[0 ];
drivers/gpu/drm/ingenic/ingenic-ipu.c +5 -5
@@ -22,7 +22,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_damage_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -362,15 +362,15 @@ static void ingenic_ipu_plane_atomic_update(struct drm_plane *plane, }if (ingenic_drm_map_noncoherent (ipu->master)) -drm_fb_cma_sync_non_coherent (ipu->drm, oldstate, newstate); +drm_fb_dma_sync_non_coherent (ipu->drm, oldstate, newstate);/* New addresses will be committed in vblank handler... */ - ipu->addr_y =drm_fb_cma_get_gem_addr (newstate->fb, newstate,0 ); + ipu->addr_y =drm_fb_dma_get_gem_addr (newstate->fb, newstate,0 );if (finfo->num_planes >1 ) - ipu->addr_u =drm_fb_cma_get_gem_addr (newstate->fb, newstate, + ipu->addr_u =drm_fb_dma_get_gem_addr (newstate->fb, newstate,1 );if (finfo->num_planes >2 ) - ipu->addr_v =drm_fb_cma_get_gem_addr (newstate->fb, newstate, + ipu->addr_v =drm_fb_dma_get_gem_addr (newstate->fb, newstate,2 );if (!needs_modeset)
drivers/gpu/drm/kmb/kmb_plane.c +4 -4
@@ -7,7 +7,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h>
@@ -402,7 +402,7 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,kmb_write_lcd (kmb,LCD_LAYERn_DMA_LINE_WIDTH (plane_id), (width * fb->format->cpp[0 ])); - addr[Y_PLANE ] =drm_fb_cma_get_gem_addr (fb, new_plane_state,0 ); + addr[Y_PLANE ] =drm_fb_dma_get_gem_addr (fb, new_plane_state,0 );kmb_write_lcd (kmb,LCD_LAYERn_DMA_START_ADDR (plane_id), addr[Y_PLANE ] + fb->offsets[0 ]); val =get_pixel_format (fb->format->format);
@@ -414,7 +414,7 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,kmb_write_lcd (kmb,LCD_LAYERn_DMA_CB_LINE_WIDTH (plane_id), (width * fb->format->cpp[0 ])); - addr[U_PLANE ] =drm_fb_cma_get_gem_addr (fb, new_plane_state, + addr[U_PLANE ] =drm_fb_dma_get_gem_addr (fb, new_plane_state,U_PLANE );/* check if Cb/Cr is swapped*/ if (num_planes ==3 && (val &LCD_LAYER_CRCB_ORDER ))
@@ -435,7 +435,7 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,LCD_LAYERn_DMA_CR_LINE_WIDTH (plane_id), ((width) * fb->format->cpp[0])); - addr[V_PLANE ] =drm_fb_cma_get_gem_addr (fb, + addr[V_PLANE ] =drm_fb_dma_get_gem_addr (fb, new_plane_state,V_PLANE );
drivers/gpu/drm/mcde/mcde_display.c +3 -3
@@ -11,7 +11,7 @@#include <linux/media-bus-format.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -164,7 +164,7 @@ static int mcde_display_check(struct drm_simple_display_pipe *pipe,struct drm_framebuffer *fb = pstate->fb;if (fb) { -u32 offset =drm_fb_cma_get_gem_addr (fb, pstate,0 ); +u32 offset =drm_fb_dma_get_gem_addr (fb, pstate,0 );/* FB base address must be dword aligned. */ if (offset &3 ) {
@@ -1423,7 +1423,7 @@ static void mcde_display_update(struct drm_simple_display_pipe *pipe,* from the DRM core before the display is enabled. */ if (fb) { -mcde_set_extsrc (mcde,drm_fb_cma_get_gem_addr (fb, pstate,0 )); +mcde_set_extsrc (mcde,drm_fb_dma_get_gem_addr (fb, pstate,0 ));dev_info_once (mcde->dev,"first update of display contents\n" );/* * Usually the flow is already active, unless we are in
drivers/gpu/drm/mcde/mcde_drv.c +2 -2
@@ -37,7 +37,7 @@* (effectively using channels 0..3) for concurrent use. * * In the current DRM/KMS setup, we use one external source, one overlay, -* one FIFO and one formatter which we connect to the simple CMA framebuffer +* one FIFO and one formatter which we connect to the simple DMA framebuffer * helpers. We then provide a bridge to the DSI port, and on the DSI port * bridge we connect hang a panel bridge or other bridge. This may be subject * to change as we exploit more of the hardware capabilities.
@@ -68,7 +68,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem.h> #include <drm/drm_gem_cma_helper.h>
drivers/gpu/drm/meson/meson_overlay.c +4 -4
@@ -10,7 +10,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -649,7 +649,7 @@ static void meson_overlay_atomic_update(struct drm_plane *plane,switch (priv->viu.vd1_planes) {case 3 : - gem =drm_fb_cma_get_gem_obj (fb,2 ); + gem =drm_fb_dma_get_gem_obj (fb,2 ); priv->viu.vd1_addr2 = gem->paddr + fb->offsets[2 ]; priv->viu.vd1_stride2 = fb->pitches[2 ]; priv->viu.vd1_height2 =
@@ -661,7 +661,7 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, priv->viu.vd1_height2); fallthrough;case 2 : - gem =drm_fb_cma_get_gem_obj (fb,1 ); + gem =drm_fb_dma_get_gem_obj (fb,1 ); priv->viu.vd1_addr1 = gem->paddr + fb->offsets[1 ]; priv->viu.vd1_stride1 = fb->pitches[1 ]; priv->viu.vd1_height1 =
@@ -673,7 +673,7 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, priv->viu.vd1_height1); fallthrough;case 1 : - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 ); priv->viu.vd1_addr0 = gem->paddr + fb->offsets[0 ]; priv->viu.vd1_stride0 = fb->pitches[0 ]; priv->viu.vd1_height0 =
drivers/gpu/drm/meson/meson_plane.c +2 -2
@@ -14,7 +14,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -364,7 +364,7 @@ static void meson_plane_atomic_update(struct drm_plane *plane, }/* Update Canvas with buffer address */ - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 ); priv->viu.osd1_addr = gem->paddr; priv->viu.osd1_stride = fb->pitches[0 ];
drivers/gpu/drm/mxsfb/mxsfb_kms.c +4 -4
@@ -19,7 +19,7 @@#include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_encoder.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -387,7 +387,7 @@ static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc,mxsfb_crtc_mode_set_nofb (mxsfb, bridge_state, bus_format);/* Write cur_buf as well to avoid an initial corrupt frame */ - paddr =drm_fb_cma_get_gem_addr (new_pstate->fb, new_pstate,0 ); + paddr =drm_fb_dma_get_gem_addr (new_pstate->fb, new_pstate,0 );if (paddr) {writel (paddr, mxsfb->base + mxsfb->devdata->cur_buf);writel (paddr, mxsfb->base + mxsfb->devdata->next_buf);
@@ -542,7 +542,7 @@ static void mxsfb_plane_primary_atomic_update(struct drm_plane *plane, plane);dma_addr_t paddr; - paddr =drm_fb_cma_get_gem_addr (new_pstate->fb, new_pstate,0 ); + paddr =drm_fb_dma_get_gem_addr (new_pstate->fb, new_pstate,0 );if (paddr)writel (paddr, mxsfb->base + mxsfb->devdata->next_buf); }
@@ -558,7 +558,7 @@ static void mxsfb_plane_overlay_atomic_update(struct drm_plane *plane,dma_addr_t paddr;u32 ctrl; - paddr =drm_fb_cma_get_gem_addr (new_pstate->fb, new_pstate,0 ); + paddr =drm_fb_dma_get_gem_addr (new_pstate->fb, new_pstate,0 );if (!paddr) {writel (0 , mxsfb->base +LCDC_AS_CTRL );return ;
drivers/gpu/drm/pl111/pl111_display.c +3 -3
@@ -14,7 +14,7 @@#include <linux/dma-buf.h> #include <linux/of_graph.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -92,7 +92,7 @@ static int pl111_display_check(struct drm_simple_display_pipe *pipe,return -EINVAL ;if (fb) { -u32 offset =drm_fb_cma_get_gem_addr (fb, pstate,0 ); +u32 offset =drm_fb_dma_get_gem_addr (fb, pstate,0 );/* FB base address must be dword aligned. */ if (offset &3 )
@@ -396,7 +396,7 @@ static void pl111_display_update(struct drm_simple_display_pipe *pipe,struct drm_framebuffer *fb = pstate->fb;if (fb) { -u32 addr =drm_fb_cma_get_gem_addr (fb, pstate,0 ); +u32 addr =drm_fb_dma_get_gem_addr (fb, pstate,0 );writel (addr, priv->regs +CLCD_UBAS ); }
drivers/gpu/drm/pl111/pl111_drv.c +1 -1
@@ -48,7 +48,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +1 -1
@@ -17,7 +17,7 @@#include <drm/drm_bridge.h> #include <drm/drm_crtc.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/rcar-du/rcar_du_drv.c +1 -1
@@ -20,7 +20,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_managed.h>
drivers/gpu/drm/rcar-du/rcar_du_kms.c +1 -1
@@ -11,7 +11,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_managed.h>
drivers/gpu/drm/rcar-du/rcar_du_plane.c +2 -2
@@ -11,7 +11,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h>
@@ -349,7 +349,7 @@ static void rcar_du_plane_setup_scanout(struct rcar_du_group *rgrp, pitch = fb->pitches[0 ] *8 / state->format->bpp;for (i =0 ; i < state->format->planes; ++i) { - gem =drm_fb_cma_get_gem_obj (fb, i); + gem =drm_fb_dma_get_gem_obj (fb, i); dma[i] = gem->paddr + fb->offsets[i]; } }else {
drivers/gpu/drm/rcar-du/rcar_du_vsp.c +2 -2
@@ -10,7 +10,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -182,7 +182,7 @@ int rcar_du_vsp_map_fb(struct rcar_du_vsp *vsp, struct drm_framebuffer *fb,int ret;for (i =0 ; i < fb->format->num_planes; ++i) { -struct drm_gem_cma_object *gem =drm_fb_cma_get_gem_obj (fb, i); +struct drm_gem_cma_object *gem =drm_fb_dma_get_gem_obj (fb, i);struct sg_table *sgt = &sg_tables[i];if (gem->sgt) {
drivers/gpu/drm/shmobile/shmob_drm_crtc.c +3 -3
@@ -12,7 +12,7 @@#include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h>
@@ -292,13 +292,13 @@ static void shmob_drm_crtc_compute_base(struct shmob_drm_crtc *scrtc,unsigned int bpp; bpp = scrtc->format->yuv ?8 : scrtc->format->bpp; - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 ); scrtc->dma[0 ] = gem->paddr + fb->offsets[0 ] + y * fb->pitches[0 ] + x * bpp /8 ;if (scrtc->format->yuv) { bpp = scrtc->format->bpp -8 ; - gem =drm_fb_cma_get_gem_obj (fb,1 ); + gem =drm_fb_dma_get_gem_obj (fb,1 ); scrtc->dma[1 ] = gem->paddr + fb->offsets[1 ] + y / (bpp ==4 ?2 :1 ) * fb->pitches[1 ] + x * (bpp ==16 ?2 :1 );
drivers/gpu/drm/shmobile/shmob_drm_kms.c +1 -1
@@ -9,7 +9,7 @@#include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/shmobile/shmob_drm_plane.c +3 -3
@@ -9,7 +9,7 @@#include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h>
@@ -44,13 +44,13 @@ static void shmob_drm_plane_compute_base(struct shmob_drm_plane *splane,unsigned int bpp; bpp = splane->format->yuv ?8 : splane->format->bpp; - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 ); splane->dma[0 ] = gem->paddr + fb->offsets[0 ] + y * fb->pitches[0 ] + x * bpp /8 ;if (splane->format->yuv) { bpp = splane->format->bpp -8 ; - gem =drm_fb_cma_get_gem_obj (fb,1 ); + gem =drm_fb_dma_get_gem_obj (fb,1 ); splane->dma[1 ] = gem->paddr + fb->offsets[1 ] + y / (bpp ==4 ?2 :1 ) * fb->pitches[1 ] + x * (bpp ==16 ?2 :1 );
drivers/gpu/drm/solomon/ssd130x.c +1 -1
@@ -20,7 +20,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_damage_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_format_helper.h> #include <drm/drm_gem_atomic_helper.h>
drivers/gpu/drm/sprd/sprd_dpu.c +2 -2
@@ -18,7 +18,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_plane_helper.h>
@@ -339,7 +339,7 @@ static void sprd_dpu_layer(struct sprd_dpu *dpu, struct drm_plane_state *state) size = (src_w &0xffff ) | (src_h <<16 );for (i =0 ; i < fb->format->num_planes; i++) { - cma_obj =drm_fb_cma_get_gem_obj (fb, i); + cma_obj =drm_fb_dma_get_gem_obj (fb, i); addr = cma_obj->paddr + fb->offsets[i];if (i ==0 )
drivers/gpu/drm/sti/sti_cursor.c +3 -3
@@ -11,7 +11,7 @@#include <drm/drm_atomic.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include "sti_compositor.h"
@@ -242,7 +242,7 @@ static int sti_cursor_atomic_check(struct drm_plane *drm_plane, } } -if (!drm_fb_cma_get_gem_obj (fb,0 )) { +if (!drm_fb_dma_get_gem_obj (fb,0 )) {DRM_ERROR ("Can't get CMA GEM object for fb\n" );return -EINVAL ; }
@@ -277,7 +277,7 @@ static void sti_cursor_atomic_update(struct drm_plane *drm_plane, dst_x = newstate->crtc_x; dst_y = newstate->crtc_y; - cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); + cma_obj =drm_fb_dma_get_gem_obj (fb,0 );/* Convert ARGB8888 to CLUT8 */ sti_cursor_argb8888_to_clut8 (cursor, (u32 *)cma_obj->vaddr);
drivers/gpu/drm/sti/sti_drv.c +1 -1
@@ -14,7 +14,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_debugfs.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/sti/sti_gdp.c +3 -3
@@ -11,7 +11,7 @@#include <drm/drm_atomic.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h>
@@ -656,7 +656,7 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,return -EINVAL ; } -if (!drm_fb_cma_get_gem_obj (fb,0 )) { +if (!drm_fb_dma_get_gem_obj (fb,0 )) {DRM_ERROR ("Can't get CMA GEM object for fb\n" );return -EINVAL ; }
@@ -776,7 +776,7 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane, top_field->gam_gdp_ctl |=sti_gdp_get_alpharange (format); top_field->gam_gdp_ppt &= ~GAM_GDP_PPT_IGNORE ; - cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); + cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); DRM_DEBUG_DRIVER("drm FB:%d format:%.4s phys@:0x%lx\n", fb->base.id, (char *)&fb->format->format,
drivers/gpu/drm/sti/sti_hqvdp.c +3 -3
@@ -15,7 +15,7 @@#include <drm/drm_atomic.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h>
@@ -1053,7 +1053,7 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane,return -EINVAL ; } -if (!drm_fb_cma_get_gem_obj (fb,0 )) { +if (!drm_fb_dma_get_gem_obj (fb,0 )) {DRM_ERROR ("Can't get CMA GEM object for fb\n" );return -EINVAL ; }
@@ -1176,7 +1176,7 @@ static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane, cmd->iqi.sat_gain =IQI_SAT_GAIN_DFLT ; cmd->iqi.pxf_conf =IQI_PXF_CONF_DFLT ; - cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); + cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); DRM_DEBUG_DRIVER("drm FB:%d format:%.4s phys@:0x%lx\n", fb->base.id, (char *)&fb->format->format,
drivers/gpu/drm/sti/sti_plane.c +1 -1
@@ -8,7 +8,7 @@#include <linux/types.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h>
drivers/gpu/drm/stm/drv.c +1 -1
@@ -18,7 +18,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/stm/ltdc.c +7 -7
@@ -25,7 +25,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -1309,7 +1309,7 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,regmap_write_bits (ldev->regmap,LTDC_L1CFBLNR + lofs,LXCFBLNR_CFBLN , line_number);/* Sets the FB address */ - paddr = (u32 )drm_fb_cma_get_gem_addr (fb, newstate,0 ); + paddr = (u32 )drm_fb_dma_get_gem_addr (fb, newstate,0 );DRM_DEBUG_DRIVER ("fb: phys 0x%08x" , paddr);regmap_write (ldev->regmap,LTDC_L1CFBAR + lofs, paddr);
@@ -1320,7 +1320,7 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,case DRM_FORMAT_NV12 :case DRM_FORMAT_NV21 :/* Configure the auxiliary frame buffer address 0 & 1 */ - paddr = (u32 )drm_fb_cma_get_gem_addr (fb, newstate,1 ); + paddr = (u32 )drm_fb_dma_get_gem_addr (fb, newstate,1 );regmap_write (ldev->regmap,LTDC_L1AFBA0R + lofs, paddr);regmap_write (ldev->regmap,LTDC_L1AFBA1R + lofs, paddr +1 );
@@ -1334,11 +1334,11 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,break ;case DRM_FORMAT_YUV420 :/* Configure the auxiliary frame buffer address 0 */ - paddr = (u32 )drm_fb_cma_get_gem_addr (fb, newstate,1 ); + paddr = (u32 )drm_fb_dma_get_gem_addr (fb, newstate,1 );regmap_write (ldev->regmap,LTDC_L1AFBA0R + lofs, paddr);/* Configure the auxiliary frame buffer address 1 */ - paddr = (u32 )drm_fb_cma_get_gem_addr (fb, newstate,2 ); + paddr = (u32 )drm_fb_dma_get_gem_addr (fb, newstate,2 );regmap_write (ldev->regmap,LTDC_L1AFBA1R + lofs, paddr); line_length = ((fb->format->cpp[0] * (x1 - x0 + 1)) >> 1) +
@@ -1354,11 +1354,11 @@ static void ltdc_plane_atomic_update(struct drm_plane *plane,break ;case DRM_FORMAT_YVU420 :/* Configure the auxiliary frame buffer address 0 */ - paddr = (u32 )drm_fb_cma_get_gem_addr (fb, newstate,2 ); + paddr = (u32 )drm_fb_dma_get_gem_addr (fb, newstate,2 );regmap_write (ldev->regmap,LTDC_L1AFBA0R + lofs, paddr);/* Configure the auxiliary frame buffer address 1 */ - paddr = (u32 )drm_fb_cma_get_gem_addr (fb, newstate,1 ); + paddr = (u32 )drm_fb_dma_get_gem_addr (fb, newstate,1 );regmap_write (ldev->regmap,LTDC_L1AFBA1R + lofs, paddr); line_length = ((fb->format->cpp[0] * (x1 - x0 + 1)) >> 1) +
drivers/gpu/drm/sun4i/sun4i_backend.c +2 -2
@@ -18,7 +18,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h>
@@ -337,7 +337,7 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend, fb->pitches[0] * 8);/* Get the start of the displayed memory */ - paddr =drm_fb_cma_get_gem_addr (fb, state,0 ); + paddr =drm_fb_dma_get_gem_addr (fb, state,0 );DRM_DEBUG_DRIVER ("Setting buffer address to %pad\n" , &paddr);if (fb->format->is_yuv)
drivers/gpu/drm/sun4i/sun4i_drv.c +1 -1
@@ -17,7 +17,7 @@#include <drm/drm_aperture.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_module.h>
drivers/gpu/drm/sun4i/sun4i_frontend.c +4 -4
@@ -14,7 +14,7 @@#include <linux/reset.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> #include <drm/drm_gem_cma_helper.h>
@@ -221,19 +221,19 @@ void sun4i_frontend_update_buffer(struct sun4i_frontend *frontend, swap =sun4i_frontend_format_chroma_requires_swap (fb->format->format);/* Set the physical address of the buffer in memory */ - paddr =drm_fb_cma_get_gem_addr (fb, state,0 ); + paddr =drm_fb_dma_get_gem_addr (fb, state,0 );DRM_DEBUG_DRIVER ("Setting buffer #0 address to %pad\n" , &paddr);regmap_write (frontend->regs,SUN4I_FRONTEND_BUF_ADDR0_REG , paddr);if (fb->format->num_planes >1 ) { - paddr =drm_fb_cma_get_gem_addr (fb, state, swap ?2 :1 ); + paddr =drm_fb_dma_get_gem_addr (fb, state, swap ?2 :1 );DRM_DEBUG_DRIVER ("Setting buffer #1 address to %pad\n" , &paddr);regmap_write (frontend->regs,SUN4I_FRONTEND_BUF_ADDR1_REG , paddr); }if (fb->format->num_planes >2 ) { - paddr =drm_fb_cma_get_gem_addr (fb, state, swap ?1 :2 ); + paddr =drm_fb_dma_get_gem_addr (fb, state, swap ?1 :2 );DRM_DEBUG_DRIVER ("Setting buffer #2 address to %pad\n" , &paddr);regmap_write (frontend->regs,SUN4I_FRONTEND_BUF_ADDR2_REG , paddr);
drivers/gpu/drm/sun4i/sun8i_mixer.c +1 -1
@@ -16,7 +16,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/sun4i/sun8i_ui_layer.c +2 -2
@@ -12,7 +12,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -199,7 +199,7 @@ static int sun8i_ui_layer_update_buffer(struct sun8i_mixer *mixer, int channel, ch_base =sun8i_channel_base (mixer, channel);/* Get the physical address of the buffer in memory */ - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 );DRM_DEBUG_DRIVER ("Using GEM @ %pad\n" , &gem->paddr);
drivers/gpu/drm/sun4i/sun8i_vi_layer.c +2 -2
@@ -6,7 +6,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h>
@@ -321,7 +321,7 @@ static int sun8i_vi_layer_update_buffer(struct sun8i_mixer *mixer, int channel,for (i =0 ; i < format->num_planes; i++) {/* Get the physical address of the buffer in memory */ - gem =drm_fb_cma_get_gem_obj (fb, i); + gem =drm_fb_dma_get_gem_obj (fb, i);DRM_DEBUG_DRIVER ("Using GEM @ %pad\n" , &gem->paddr);
drivers/gpu/drm/tegra/fb.c +1 -1
@@ -3,7 +3,7 @@* Copyright (C) 2012-2013 Avionic Design GmbH * Copyright (C) 2012 NVIDIA CORPORATION. All rights reserved. * -* Based on the KMS/FB CMA helpers +* Based on the KMS/FB DMA helpers * Copyright (C) 2012 Analog Devices Inc. */
drivers/gpu/drm/tidss/tidss_crtc.c +1 -1
@@ -8,7 +8,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/tidss/tidss_dispc.c +3 -3
@@ -22,7 +22,7 @@#include <linux/sys_soc.h> #include <drm/drm_fourcc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_panel.h>
@@ -1958,7 +1958,7 @@ dma_addr_t dispc_plane_state_paddr(const struct drm_plane_state *state)u32 x = state->src_x >>16 ;u32 y = state->src_y >>16 ; - gem =drm_fb_cma_get_gem_obj (state->fb,0 ); + gem =drm_fb_dma_get_gem_obj (state->fb,0 );return gem->paddr + fb->offsets[0 ] + x * fb->format->cpp[0 ] + y * fb->pitches[0 ];
@@ -1975,7 +1975,7 @@ dma_addr_t dispc_plane_state_p_uv_addr(const struct drm_plane_state *state)if (WARN_ON (state->fb->format->num_planes !=2 ))return 0 ; - gem =drm_fb_cma_get_gem_obj (fb,1 ); + gem =drm_fb_dma_get_gem_obj (fb,1 );return gem->paddr + fb->offsets[1 ] + (x * fb->format->cpp[1] / fb->format->hsub) +
drivers/gpu/drm/tidss/tidss_kms.c +1 -1
@@ -10,7 +10,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_crtc_helper.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h>
drivers/gpu/drm/tidss/tidss_plane.c +1 -1
@@ -9,7 +9,7 @@#include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_atomic_helper.h> #include "tidss_crtc.h"
drivers/gpu/drm/tilcdc/tilcdc_crtc.c +2 -2
@@ -12,7 +12,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_modeset_helper_vtables.h>
@@ -67,7 +67,7 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb)dma_addr_t start, end;u64 dma_base_and_ceiling; - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 ); start = gem->paddr + fb->offsets[0 ] + crtc->y * fb->pitches[0] +
drivers/gpu/drm/tiny/arcpgu.c +2 -2
@@ -10,7 +10,7 @@#include <drm/drm_debugfs.h> #include <drm/drm_device.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_cma_helper.h>
@@ -224,7 +224,7 @@ static void arc_pgu_update(struct drm_simple_display_pipe *pipe,return ; arcpgu =pipe_to_arcpgu_priv (pipe); - gem =drm_fb_cma_get_gem_obj (pipe->plane.state->fb,0 ); + gem =drm_fb_dma_get_gem_obj (pipe->plane.state->fb,0 );arc_pgu_write (arcpgu,ARCPGU_REG_BUF0_ADDR , gem->paddr); }
drivers/gpu/drm/tiny/ili9225.c +2 -2
@@ -19,7 +19,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_damage_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h>
@@ -77,7 +77,7 @@ static inline int ili9225_command(struct mipi_dbi *dbi, u8 cmd, u16 data)static void ili9225_fb_dirty (struct drm_framebuffer *fb,struct drm_rect *rect) { -struct drm_gem_cma_object *cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 );struct mipi_dbi_dev *dbidev =drm_to_mipi_dbi_dev (fb->dev);unsigned int height = rect->y2 - rect->y1;unsigned int width = rect->x2 - rect->x1;
drivers/gpu/drm/tiny/repaper.c +2 -2
@@ -25,7 +25,7 @@#include <drm/drm_connector.h> #include <drm/drm_damage_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_format_helper.h> #include <drm/drm_gem_atomic_helper.h>
@@ -510,7 +510,7 @@ static void repaper_get_temperature(struct repaper_epd *epd)static int repaper_fb_dirty (struct drm_framebuffer *fb) { -struct drm_gem_cma_object *cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 );struct repaper_epd *epd =drm_to_epd (fb->dev);struct drm_rect clip;int idx, ret =0 ;
drivers/gpu/drm/tiny/st7586.c +2 -2
@@ -15,7 +15,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_damage_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_format_helper.h> #include <drm/drm_gem_atomic_helper.h>
@@ -91,7 +91,7 @@ static void st7586_xrgb8888_to_gray332(u8 *dst, void *vaddr,static int st7586_buf_copy (void *dst,struct drm_framebuffer *fb,struct drm_rect *clip) { -struct drm_gem_cma_object *cma_obj =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 );void *src = cma_obj->vaddr;int ret =0 ;
drivers/gpu/drm/tve200/tve200_display.c +5 -5
@@ -15,7 +15,7 @@#include <linux/of_graph.h> #include <linux/delay.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_cma_helper.h>
@@ -89,7 +89,7 @@ static int tve200_display_check(struct drm_simple_display_pipe *pipe, }if (fb) { -u32 offset =drm_fb_cma_get_gem_addr (fb, pstate,0 ); +u32 offset =drm_fb_dma_get_gem_addr (fb, pstate,0 );/* FB base address must be dword aligned. */ if (offset &3 ) {
@@ -266,14 +266,14 @@ static void tve200_display_update(struct drm_simple_display_pipe *pipe,if (fb) {/* For RGB, the Y component is used as base address */ -writel (drm_fb_cma_get_gem_addr (fb, pstate,0 ), +writel (drm_fb_dma_get_gem_addr (fb, pstate,0 ), priv->regs +TVE200_Y_FRAME_BASE_ADDR );/* For three plane YUV we need two more addresses */ if (fb->format->format ==DRM_FORMAT_YUV420 ) { -writel (drm_fb_cma_get_gem_addr (fb, pstate,1 ), +writel (drm_fb_dma_get_gem_addr (fb, pstate,1 ), priv->regs +TVE200_U_FRAME_BASE_ADDR ); -writel (drm_fb_cma_get_gem_addr (fb, pstate,2 ), +writel (drm_fb_dma_get_gem_addr (fb, pstate,2 ), priv->regs +TVE200_V_FRAME_BASE_ADDR ); } }
drivers/gpu/drm/tve200/tve200_drv.c +1 -1
@@ -39,7 +39,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_bridge.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_cma_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
drivers/gpu/drm/v3d/v3d_drv.c +1 -1
@@ -23,7 +23,7 @@#include <linux/reset.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_managed.h> #include <uapi/drm/v3d_drm.h>
drivers/gpu/drm/vc4/vc4_crtc.c +4 -4
@@ -37,7 +37,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_uapi.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h>
@@ -817,7 +817,7 @@ static void vc4_async_page_flip_seqno_complete(struct vc4_seqno_cb *cb)if (flip_state->old_fb) {struct drm_gem_cma_object *cma_bo = -drm_fb_cma_get_gem_obj (flip_state->old_fb,0 ); +drm_fb_dma_get_gem_obj (flip_state->old_fb,0 ); bo =to_vc4_bo (&cma_bo->base); }
@@ -850,7 +850,7 @@ static int vc4_async_set_fence_cb(struct drm_device *dev, struct vc4_async_flip_state *flip_state) {struct drm_framebuffer *fb = flip_state->fb; -struct drm_gem_cma_object *cma_bo =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *cma_bo =drm_fb_dma_get_gem_obj (fb,0 );struct vc4_dev *vc4 =to_vc4_dev (dev);struct dma_fence *fence;int ret;
@@ -938,7 +938,7 @@ static int vc4_async_page_flip(struct drm_crtc *crtc, {struct drm_device *dev = crtc->dev;struct vc4_dev *vc4 =to_vc4_dev (dev); -struct drm_gem_cma_object *cma_bo =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *cma_bo =drm_fb_dma_get_gem_obj (fb,0 );struct vc4_bo *bo =to_vc4_bo (&cma_bo->base);int ret;
drivers/gpu/drm/vc4/vc4_drv.c +1 -1
@@ -33,7 +33,7 @@#include <drm/drm_aperture.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/vc4/vc4_plane.c +5 -5
@@ -18,7 +18,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_uapi.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> #include <drm/drm_plane_helper.h>
@@ -338,7 +338,7 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state) {struct vc4_plane_state *vc4_state =to_vc4_plane_state (state);struct drm_framebuffer *fb = state->fb; -struct drm_gem_cma_object *bo =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *bo =drm_fb_dma_get_gem_obj (fb,0 );u32 subpixel_src_mask = (1 <<16 ) -1 ;int num_planes = fb->format->num_planes;struct drm_crtc_state *crtc_state;
@@ -1214,7 +1214,7 @@ u32 vc4_plane_dlist_size(const struct drm_plane_state *state)void vc4_plane_async_set_fb (struct drm_plane *plane,struct drm_framebuffer *fb) {struct vc4_plane_state *vc4_state =to_vc4_plane_state (plane->state); -struct drm_gem_cma_object *bo =drm_fb_cma_get_gem_obj (fb,0 ); +struct drm_gem_cma_object *bo =drm_fb_dma_get_gem_obj (fb,0 );uint32_t addr;/* We're skipping the address adjustment for negative origin,
@@ -1358,7 +1358,7 @@ static int vc4_prepare_fb(struct drm_plane *plane,if (!state->fb)return 0 ; - bo =to_vc4_bo (&drm_fb_cma_get_gem_obj (state->fb,0 )->base); + bo =to_vc4_bo (&drm_fb_dma_get_gem_obj (state->fb,0 )->base);drm_gem_plane_helper_prepare_fb (plane, state);
@@ -1376,7 +1376,7 @@ static void vc4_cleanup_fb(struct drm_plane *plane,if (plane->state->fb == state->fb || !state->fb)return ; - bo =to_vc4_bo (&drm_fb_cma_get_gem_obj (state->fb,0 )->base); + bo =to_vc4_bo (&drm_fb_dma_get_gem_obj (state->fb,0 )->base);vc4_bo_dec_usecnt (bo); }
drivers/gpu/drm/vc4/vc4_txp.c +2 -2
@@ -16,7 +16,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_edid.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_panel.h> #include <drm/drm_probe_helper.h>
@@ -311,7 +311,7 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn,*/ ctrl |=TXP_ALPHA_INVERT ; - gem =drm_fb_cma_get_gem_obj (fb,0 ); + gem =drm_fb_dma_get_gem_obj (fb,0 );TXP_WRITE (TXP_DST_PTR , gem->paddr + fb->offsets[0 ]);TXP_WRITE (TXP_DST_PITCH , fb->pitches[0 ]); TXP_WRITE(TXP_DIM,
drivers/gpu/drm/xlnx/zynqmp_disp.c +2 -2
@@ -14,7 +14,7 @@#include <drm/drm_atomic_uapi.h> #include <drm/drm_crtc.h> #include <drm/drm_device.h> -#include <drm/drm_fb_cma_helper.h> +#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> #include <drm/drm_managed.h>
@@ -1100,7 +1100,7 @@ static int zynqmp_disp_layer_update(struct zynqmp_disp_layer *layer,struct dma_async_tx_descriptor *desc;dma_addr_t paddr; - paddr =drm_fb_cma_get_gem_addr (state->fb, state, i); + paddr =drm_fb_dma_get_gem_addr (state->fb, state, i); dma->xt.numf = height; dma->sgl.size = width * info->cpp[i];
include/drm/drm_fb_dma_helper.h renamed from include/drm/drm_fb_cma_helper.h +5 -5
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef __DRM_FB_CMA_HELPER_H__ -#define __DRM_FB_CMA_HELPER_H__ +#ifndef __DRM_FB_DMA_HELPER_H__ +#define __DRM_FB_DMA_HELPER_H__#include <linux/types.h>
@@ -8,14 +8,14 @@ struct drm_device;struct drm_framebuffer ;struct drm_plane_state ; -struct drm_gem_cma_object *drm_fb_cma_get_gem_obj (struct drm_framebuffer *fb, +struct drm_gem_cma_object *drm_fb_dma_get_gem_obj (struct drm_framebuffer *fb,unsigned int plane); -dma_addr_t drm_fb_cma_get_gem_addr (struct drm_framebuffer *fb, +dma_addr_t drm_fb_dma_get_gem_addr (struct drm_framebuffer *fb,struct drm_plane_state *state,unsigned int plane); -void drm_fb_cma_sync_non_coherent (struct drm_device *drm, +void drm_fb_dma_sync_non_coherent (struct drm_device *drm,struct drm_plane_state *old_state,struct drm_plane_state *state);
Signature · 1 line
2.36.1
PATCH v2 2/4 drm/gem: rename GEM CMA helpers to GEM DMA helpers
In reply to Danilo KrummrichRename "GEM CMA" helpers to "GEM DMA" helpers - considering the hierarchy of APIs (mm/cma -> dma -> gem dma) calling them "GEM DMA" seems to be more applicable.
Besides that, commit e57924d4ae80 ("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}*)(GEM)_CMA_(${REGEX_SYM_UPPER}*)"
REGEX_GREP_LOWER="(${REGEX_SYM_LOWER}*)(gem)_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
# Rename all 'cma_obj's to 'dma_obj'.
for ff in $(grep -RiHl "cma_obj" $DIRS)
do
sed -i -E "s/cma_obj/dma_obj/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 "GEM CMA", but not "FB CMA".
Also drivers/gpu/drm/Makefile was fixed up manually after renaming drm_gem_cma_helper.c to drm_gem_dma_helper.c.
This patch is compile-time tested building a x86_64 kernel with make allyesconfig && make drivers/gpu/drm.
---
Documentation/gpu/drm-mm.rst | 16 +-
drivers/gpu/drm/Kconfig | 4 +-
drivers/gpu/drm/Makefile | 6 +-
drivers/gpu/drm/arm/Kconfig | 4 +-
drivers/gpu/drm/arm/display/Kconfig | 2 +-
.../arm/display/komeda/komeda_framebuffer.c | 6 +-
.../gpu/drm/arm/display/komeda/komeda_kms.c | 10 +-
drivers/gpu/drm/arm/hdlcd_crtc.c | 2 +-
drivers/gpu/drm/arm/hdlcd_drv.c | 6 +-
drivers/gpu/drm/arm/malidp_drv.c | 8 +-
drivers/gpu/drm/arm/malidp_mw.c | 4 +-
drivers/gpu/drm/arm/malidp_planes.c | 16 +-
drivers/gpu/drm/armada/armada_gem.c | 6 +-
drivers/gpu/drm/aspeed/Kconfig | 2 +-
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 4 +-
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 6 +-
drivers/gpu/drm/atmel-hlcdc/Kconfig | 2 +-
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 6 +-
.../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 4 +-
drivers/gpu/drm/drm_fb_dma_helper.c | 20 +-
drivers/gpu/drm/drm_file.c | 2 +-
..._gem_cma_helper.c => drm_gem_dma_helper.c} | 309 +++++++++---------
drivers/gpu/drm/drm_mipi_dbi.c | 2 +-
drivers/gpu/drm/fsl-dcu/Kconfig | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 6 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 4 +-
drivers/gpu/drm/hisilicon/kirin/Kconfig | 2 +-
.../gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 8 +-
.../gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 +-
drivers/gpu/drm/imx/Kconfig | 2 +-
drivers/gpu/drm/imx/dcss/Kconfig | 2 +-
drivers/gpu/drm/imx/dcss/dcss-kms.c | 6 +-
drivers/gpu/drm/imx/dcss/dcss-plane.c | 16 +-
drivers/gpu/drm/imx/imx-drm-core.c | 8 +-
drivers/gpu/drm/imx/imx-drm.h | 2 +-
drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +-
drivers/gpu/drm/imx/ipuv3-plane.c | 26 +-
drivers/gpu/drm/ingenic/Kconfig | 2 +-
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 8 +-
drivers/gpu/drm/ingenic/ingenic-ipu.c | 2 +-
drivers/gpu/drm/kmb/Kconfig | 2 +-
drivers/gpu/drm/kmb/kmb_drv.c | 6 +-
drivers/gpu/drm/kmb/kmb_plane.c | 2 +-
drivers/gpu/drm/mcde/Kconfig | 2 +-
drivers/gpu/drm/mcde/mcde_display.c | 2 +-
drivers/gpu/drm/mcde/mcde_drv.c | 6 +-
drivers/gpu/drm/mediatek/Kconfig | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +-
drivers/gpu/drm/mediatek/mtk_drm_gem.c | 4 +-
drivers/gpu/drm/meson/Kconfig | 2 +-
drivers/gpu/drm/meson/meson_drv.c | 10 +-
drivers/gpu/drm/meson/meson_overlay.c | 4 +-
drivers/gpu/drm/meson/meson_plane.c | 4 +-
drivers/gpu/drm/msm/msm_drv.c | 2 +-
drivers/gpu/drm/mxsfb/Kconfig | 2 +-
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 6 +-
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 2 +-
drivers/gpu/drm/panel/Kconfig | 2 +-
drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 6 +-
drivers/gpu/drm/pl111/Kconfig | 2 +-
drivers/gpu/drm/pl111/pl111_display.c | 2 +-
drivers/gpu/drm/pl111/pl111_drv.c | 8 +-
drivers/gpu/drm/rcar-du/Kconfig | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 2 +-
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 4 +-
drivers/gpu/drm/rcar-du/rcar_du_kms.c | 36 +-
drivers/gpu/drm/rcar-du/rcar_du_plane.c | 4 +-
drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 +-
drivers/gpu/drm/rockchip/Kconfig | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 4 +-
drivers/gpu/drm/shmobile/Kconfig | 2 +-
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 +-
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 6 +-
drivers/gpu/drm/shmobile/shmob_drm_kms.c | 2 +-
drivers/gpu/drm/shmobile/shmob_drm_kms.h | 2 +-
drivers/gpu/drm/shmobile/shmob_drm_plane.c | 4 +-
drivers/gpu/drm/sprd/Kconfig | 2 +-
drivers/gpu/drm/sprd/sprd_dpu.c | 8 +-
drivers/gpu/drm/sprd/sprd_drm.c | 6 +-
drivers/gpu/drm/sti/Kconfig | 2 +-
drivers/gpu/drm/sti/sti_cursor.c | 10 +-
drivers/gpu/drm/sti/sti_drv.c | 6 +-
drivers/gpu/drm/sti/sti_gdp.c | 14 +-
drivers/gpu/drm/sti/sti_hqvdp.c | 14 +-
drivers/gpu/drm/sti/sti_plane.c | 2 +-
drivers/gpu/drm/stm/Kconfig | 2 +-
drivers/gpu/drm/stm/drv.c | 10 +-
drivers/gpu/drm/stm/ltdc.c | 2 +-
drivers/gpu/drm/sun4i/Kconfig | 2 +-
drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_drv.c | 8 +-
drivers/gpu/drm/sun4i/sun4i_frontend.c | 2 +-
drivers/gpu/drm/sun4i/sun8i_mixer.c | 2 +-
drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 4 +-
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 4 +-
drivers/gpu/drm/tidss/Kconfig | 2 +-
drivers/gpu/drm/tidss/tidss_crtc.c | 2 +-
drivers/gpu/drm/tidss/tidss_dispc.c | 6 +-
drivers/gpu/drm/tidss/tidss_drv.c | 6 +-
drivers/gpu/drm/tilcdc/Kconfig | 2 +-
drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 +-
drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 +-
drivers/gpu/drm/tiny/Kconfig | 22 +-
drivers/gpu/drm/tiny/arcpgu.c | 8 +-
drivers/gpu/drm/tiny/hx8357d.c | 6 +-
drivers/gpu/drm/tiny/ili9163.c | 6 +-
drivers/gpu/drm/tiny/ili9225.c | 10 +-
drivers/gpu/drm/tiny/ili9341.c | 6 +-
drivers/gpu/drm/tiny/ili9486.c | 6 +-
drivers/gpu/drm/tiny/mi0283qt.c | 6 +-
drivers/gpu/drm/tiny/panel-mipi-dbi.c | 6 +-
drivers/gpu/drm/tiny/repaper.c | 10 +-
drivers/gpu/drm/tiny/st7586.c | 10 +-
drivers/gpu/drm/tiny/st7735r.c | 6 +-
drivers/gpu/drm/tve200/Kconfig | 2 +-
drivers/gpu/drm/tve200/tve200_display.c | 2 +-
drivers/gpu/drm/tve200/tve200_drv.c | 6 +-
drivers/gpu/drm/v3d/v3d_gem.c | 4 +-
drivers/gpu/drm/vc4/Kconfig | 2 +-
drivers/gpu/drm/vc4/vc4_bo.c | 44 +--
drivers/gpu/drm/vc4/vc4_crtc.c | 6 +-
drivers/gpu/drm/vc4/vc4_drv.c | 6 +-
drivers/gpu/drm/vc4/vc4_drv.h | 18 +-
drivers/gpu/drm/vc4/vc4_gem.c | 4 +-
drivers/gpu/drm/vc4/vc4_plane.c | 4 +-
drivers/gpu/drm/vc4/vc4_render_cl.c | 26 +-
drivers/gpu/drm/vc4/vc4_txp.c | 2 +-
drivers/gpu/drm/vc4/vc4_v3d.c | 4 +-
drivers/gpu/drm/vc4/vc4_validate.c | 16 +-
drivers/gpu/drm/vc4/vc4_validate_shaders.c | 2 +-
drivers/gpu/drm/xlnx/Kconfig | 2 +-
drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 8 +-
include/drm/drm_fb_dma_helper.h | 2 +-
include/drm/drm_gem.h | 2 +-
..._gem_cma_helper.h => drm_gem_dma_helper.h} | 156 ++++-----
136 files changed, 630 insertions(+), 627 deletions(-)
rename drivers/gpu/drm/{drm_gem_cma_helper.c => drm_gem_dma_helper.c} (57%)
rename include/drm/{drm_gem_cma_helper.h => drm_gem_dma_helper.h} (53%)Documentation/gpu/drm-mm.rst +8 -8
@@ -300,12 +300,12 @@ Drivers that want to map the GEM object upfront instead of handling page faults can implement their own mmap file operation handler. For platforms without MMU the GEM core provides a helper method -drm_gem_cma_get_unmapped_area(). The mmap() routines will call this to get a +drm_gem_dma_get_unmapped_area(). The mmap() routines will call this to get a proposed address for the mapping. -To use drm_gem_cma_get_unmapped_area(), drivers must fill the struct +To use drm_gem_dma_get_unmapped_area(), drivers must fill the struct :c:type:`struct file_operations <file_operations>` get_unmapped_area field with -a pointer on drm_gem_cma_get_unmapped_area(). +a pointer on drm_gem_dma_get_unmapped_area(). More detailed information about get_unmapped_area can be found in Documentation/admin-guide/mm/nommu-mmap.rst
@@ -355,16 +355,16 @@ GEM Function Reference .. kernel-doc:: drivers/gpu/drm/drm_gem.c :export: -GEM CMA Helper Functions Reference +GEM DMA Helper Functions Reference ---------------------------------- -.. kernel-doc:: drivers/gpu/drm/drm_gem_cma_helper.c - :doc: cma helpers +.. kernel-doc:: drivers/gpu/drm/drm_gem_dma_helper.c + :doc: dma helpers -.. kernel-doc:: include/drm/drm_gem_cma_helper.h +.. kernel-doc:: include/drm/drm_gem_dma_helper.h :internal: -.. kernel-doc:: drivers/gpu/drm/drm_gem_cma_helper.c +.. kernel-doc:: drivers/gpu/drm/drm_gem_dma_helper.c :export: GEM SHMEM Helper Function Reference
drivers/gpu/drm/Kconfig +2 -2
@@ -198,11 +198,11 @@ config DRM_TTM_HELPER help Helpers for ttm-based gem objects -config DRM_GEM_CMA_HELPER +config DRM_GEM_DMA_HELPER tristate depends on DRM help - Choose this if you need the GEM CMA helper functions + Choose this if you need the GEM DMA helper functions config DRM_GEM_SHMEM_HELPER tristate
drivers/gpu/drm/Makefile +3 -3
@@ -40,9 +40,9 @@ obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o -drm_cma_helper-y := drm_gem_cma_helper.o -drm_cma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o -obj-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_cma_helper.o +drm_dma_helper-y := drm_gem_dma_helper.o +drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o +obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o drm_shmem_helper-y := drm_gem_shmem_helper.o obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o
drivers/gpu/drm/arm/Kconfig +2 -2
@@ -6,7 +6,7 @@ config DRM_HDLCD depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST) depends on COMMON_CLK select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER help Choose this option if you have an ARM High Definition Colour LCD controller.
@@ -27,7 +27,7 @@ config DRM_MALI_DISPLAY depends on DRM && OF && (ARM || ARM64 || COMPILE_TEST) depends on COMMON_CLK select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS help Choose this option if you want to compile the ARM Mali Display
drivers/gpu/drm/arm/display/Kconfig +1 -1
@@ -4,7 +4,7 @@ config DRM_KOMEDA depends on DRM && OF depends on COMMON_CLK select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS help Choose this option if you want to compile the ARM Komeda display
drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +3 -3
@@ -7,7 +7,7 @@#include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include "komeda_framebuffer.h"
@@ -137,7 +137,7 @@ komeda_fb_none_afbc_size_check(struct komeda_dev *mdev, struct komeda_fb *kfb, } min_size =komeda_fb_get_pixel_addr (kfb,0 , fb->height, i) - -to_drm_gem_cma_obj (obj)->paddr; + -to_drm_gem_dma_obj (obj)->paddr;if (obj->size < min_size) {DRM_DEBUG_KMS ("The fb->obj[%d] size: 0x%zx lower than the minimum requirement: 0x%llx.\n" , i, obj->size, min_size);
@@ -239,7 +239,7 @@ dma_addr_t komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane) { struct drm_framebuffer *fb = &kfb->base; -const struct drm_gem_cma_object *obj; +const struct drm_gem_dma_object *obj;u32 offset, plane_x, plane_y, block_w, block_sz;if (plane >= fb->format->num_planes) {
drivers/gpu/drm/arm/display/komeda/komeda_kms.c +5 -5
@@ -11,7 +11,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_managed.h> #include <drm/drm_probe_helper.h>
@@ -21,9 +21,9 @@#include "komeda_framebuffer.h" #include "komeda_kms.h" -DEFINE_DRM_GEM_CMA_FOPS (komeda_cma_fops); +DEFINE_DRM_GEM_DMA_FOPS (komeda_cma_fops); -static int komeda_gem_cma_dumb_create (struct drm_file *file, +static int komeda_gem_dma_dumb_create (struct drm_file *file,struct drm_device *dev,struct drm_mode_create_dumb *args) {
@@ -32,7 +32,7 @@ static int komeda_gem_cma_dumb_create(struct drm_file *file, args->pitch =ALIGN (pitch, mdev->chip.bus_width); -return drm_gem_cma_dumb_create_internal (file, dev, args); +return drm_gem_dma_dumb_create_internal (file, dev, args); }static irqreturn_t komeda_kms_irq_handler (int irq,void *data)
@@ -60,7 +60,7 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)static const struct drm_driver komeda_kms_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .lastclose = drm_fb_helper_lastclose, -DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE (komeda_gem_cma_dumb_create), +DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE (komeda_gem_dma_dumb_create), .fops = &komeda_cma_fops, .name ="komeda" , .desc ="Arm Komeda Display Processor driver" ,
drivers/gpu/drm/arm/hdlcd_crtc.c +1 -1
@@ -20,7 +20,7 @@#include <drm/drm_crtc.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_of.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/arm/hdlcd_drv.c +3 -3
@@ -27,7 +27,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_modeset_helper.h> #include <drm/drm_module.h>
@@ -255,11 +255,11 @@ static void hdlcd_debugfs_init(struct drm_minor *minor) }#endif -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops);static const struct drm_driver hdlcd_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , #ifdef CONFIG_DEBUG_FS .debugfs_init = hdlcd_debugfs_init, #endif
drivers/gpu/drm/arm/malidp_drv.c +4 -4
@@ -22,7 +22,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_modeset_helper.h> #include <drm/drm_module.h>
@@ -457,7 +457,7 @@ static int malidp_irq_init(struct platform_device *pdev)return 0 ; } -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops); static int malidp_dumb_create(struct drm_file *file_priv, struct drm_device *drm,
@@ -469,7 +469,7 @@ static int malidp_dumb_create(struct drm_file *file_priv, args->pitch =ALIGN (DIV_ROUND_UP (args->width * args->bpp,8 ), alignment); -return drm_gem_cma_dumb_create_internal (file_priv, drm, args); +return drm_gem_dma_dumb_create_internal (file_priv, drm, args); }#ifdef CONFIG_DEBUG_FS
@@ -566,7 +566,7 @@ static void malidp_debugfs_init(struct drm_minor *minor)static const struct drm_driver malidp_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE (malidp_dumb_create), +DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE (malidp_dumb_create), #ifdef CONFIG_DEBUG_FS .debugfs_init = malidp_debugfs_init, #endif
drivers/gpu/drm/arm/malidp_mw.c +2 -2
@@ -11,7 +11,7 @@#include <drm/drm_crtc.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_probe_helper.h> #include <drm/drm_writeback.h>
@@ -158,7 +158,7 @@ malidp_mw_encoder_atomic_check(struct drm_encoder *encoder, n_planes = fb->format->num_planes;for (i =0 ; i < n_planes; i++) { -struct drm_gem_cma_object *obj =drm_fb_dma_get_gem_obj (fb, i); +struct drm_gem_dma_object *obj =drm_fb_dma_get_gem_obj (fb, i);/* memory write buffers are never rotated */ u8 alignment =malidp_hw_get_pitch_align (malidp->dev,0 );
drivers/gpu/drm/arm/malidp_planes.c +8 -8
@@ -14,7 +14,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_print.h>
@@ -332,15 +332,15 @@ static bool malidp_check_pages_threshold(struct malidp_plane_state *ms,for (i =0 ; i < ms->n_planes; i++) {struct drm_gem_object *obj; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;struct sg_table *sgt;struct scatterlist *sgl; obj =drm_gem_fb_get_obj (ms->base.fb, i); - cma_obj =to_drm_gem_cma_obj (obj); + dma_obj =to_drm_gem_dma_obj (obj); -if (cma_obj->sgt) - sgt = cma_obj->sgt; +if (dma_obj->sgt) + sgt = dma_obj->sgt;else sgt = obj->funcs->get_sg_table (obj);
@@ -351,14 +351,14 @@ static bool malidp_check_pages_threshold(struct malidp_plane_state *ms,while (sgl) {if (sgl->length < pgsize) { -if (!cma_obj->sgt) +if (!dma_obj->sgt)kfree (sgt);return false; } sgl =sg_next (sgl); } -if (!cma_obj->sgt) +if (!dma_obj->sgt)kfree (sgt); }
@@ -731,7 +731,7 @@ static void malidp_set_plane_base_addr(struct drm_framebuffer *fb, paddr =drm_fb_dma_get_gem_addr (fb, plane->state, plane_index); }else { -struct drm_gem_cma_object *obj; +struct drm_gem_dma_object *obj; obj =drm_fb_dma_get_gem_obj (fb, plane_index);
drivers/gpu/drm/armada/armada_gem.c +3 -3
@@ -107,11 +107,11 @@ armada_gem_linear_back(struct drm_device *dev, struct armada_gem_object *obj) }/* -* We could grab something from CMA if it's enabled, but that +* We could grab something from DMA if it's enabled, but that * involves building in a problem: * -* CMA's interface uses dma_alloc_coherent(), which provides us -* with an CPU virtual address and a device address. +* GEM DMA helper interface uses dma_alloc_coherent(), which provides +* us with an CPU virtual address and a device address. * * The CPU virtual address may be either an address in the kernel * direct mapped region (for example, as it would be on x86) or
drivers/gpu/drm/aspeed/Kconfig +1 -1
@@ -5,7 +5,7 @@ config DRM_ASPEED_GFX depends on (COMPILE_TEST || ARCH_ASPEED) depends on MMU select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DMA_CMA if HAVE_DMA_CONTIGUOUS select CMA if HAVE_DMA_CONTIGUOUS select MFD_SYSCON
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c +2 -2
@@ -10,7 +10,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_panel.h> #include <drm/drm_simple_kms_helper.h> #include <drm/drm_vblank.h>
@@ -167,7 +167,7 @@ static void aspeed_gfx_pipe_update(struct drm_simple_display_pipe *pipe,struct drm_crtc *crtc = &pipe->crtc;struct drm_framebuffer *fb = pipe->plane.state->fb;struct drm_pending_vblank_event *event; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;spin_lock_irq (&crtc->dev->event_lock); event = crtc->state->event;
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +3 -3
@@ -18,7 +18,7 @@#include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_module.h> #include <drm/drm_probe_helper.h>
@@ -246,11 +246,11 @@ static void aspeed_gfx_unload(struct drm_device *drm)drm_kms_helper_poll_fini (drm); } -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops);static const struct drm_driver aspeed_gfx_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .fops = &fops, .name ="aspeed-gfx-drm" , .desc ="ASPEED GFX DRM" ,
drivers/gpu/drm/atmel-hlcdc/Kconfig +1 -1
@@ -2,7 +2,7 @@ config DRM_ATMEL_HLCDC tristate "DRM Support for ATMEL HLCDC Display Controller" depends on DRM && OF && COMMON_CLK && MFD_ATMEL_HLCDC && ARM - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_PANEL help
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +3 -3
@@ -20,7 +20,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_module.h> #include <drm/drm_probe_helper.h>
@@ -730,11 +730,11 @@ static void atmel_hlcdc_dc_unload(struct drm_device *dev)clk_disable_unprepare (dc->hlcdc->periph_clk); } -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops);static const struct drm_driver atmel_hlcdc_dc_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .fops = &fops, .name ="atmel-hlcdc" , .desc ="Atmel HLCD Controller DRM" ,
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +2 -2
@@ -13,7 +13,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include "atmel_hlcdc_dc.h"
@@ -447,7 +447,7 @@ static void atmel_hlcdc_plane_update_buffers(struct atmel_hlcdc_plane *plane, sr =atmel_hlcdc_layer_read_reg (&plane->layer,ATMEL_HLCDC_LAYER_CHSR );for (i =0 ; i < state->nplanes; i++) { -struct drm_gem_cma_object *gem =drm_fb_dma_get_gem_obj (fb, i); +struct drm_gem_dma_object *gem =drm_fb_dma_get_gem_obj (fb, i); state->dscrs[i]->addr = gem->paddr + state->offsets[i];
drivers/gpu/drm/drm_fb_dma_helper.c +10 -10
@@ -13,7 +13,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_plane.h> #include <linux/dma-mapping.h>
@@ -35,15 +35,15 @@*/ /** -* drm_fb_dma_get_gem_obj() - Get CMA GEM object for framebuffer +* drm_fb_dma_get_gem_obj() - Get DMA GEM object for framebuffer * @fb: The framebuffer * @plane: Which plane * -* Return the CMA GEM object for given framebuffer. +* Return the DMA GEM object for given framebuffer. * * This function will usually be called from the CRTC callback functions. */ -struct drm_gem_cma_object *drm_fb_dma_get_gem_obj (struct drm_framebuffer *fb, +struct drm_gem_dma_object *drm_fb_dma_get_gem_obj (struct drm_framebuffer *fb,unsigned int plane) {struct drm_gem_object *gem;
@@ -52,7 +52,7 @@ struct drm_gem_cma_object *drm_fb_dma_get_gem_obj(struct drm_framebuffer *fb,if (!gem)return NULL ; -return to_drm_gem_cma_obj (gem); +return to_drm_gem_dma_obj (gem); }EXPORT_SYMBOL_GPL (drm_fb_dma_get_gem_obj);
@@ -71,7 +71,7 @@ dma_addr_t drm_fb_dma_get_gem_addr(struct drm_framebuffer *fb, struct drm_plane_state *state, unsigned int plane) { -struct drm_gem_cma_object *obj; +struct drm_gem_dma_object *obj;dma_addr_t paddr;u8 h_div =1 , v_div =1 ;u32 block_w =drm_format_info_block_width (fb->format, plane);
@@ -113,7 +113,7 @@ EXPORT_SYMBOL_GPL(drm_fb_dma_get_gem_addr);* @state: New plane state * * This function can be used by drivers that use damage clips and have -* CMA GEM objects backed by non-coherent memory. Calling this function +* DMA GEM objects backed by non-coherent memory. Calling this function * in a plane's .atomic_update ensures that all the data in the backing * memory have been written to RAM. */
@@ -123,15 +123,15 @@ void drm_fb_dma_sync_non_coherent(struct drm_device *drm, {const struct drm_format_info *finfo = state->fb->format;struct drm_atomic_helper_damage_iter iter; -const struct drm_gem_cma_object *cma_obj; +const struct drm_gem_dma_object *dma_obj;unsigned int offset, i;struct drm_rect clip;dma_addr_t daddr;size_t nb_bytes;for (i =0 ; i < finfo->num_planes; i++) { - cma_obj =drm_fb_dma_get_gem_obj (state->fb, i); -if (!cma_obj->map_noncoherent) + dma_obj =drm_fb_dma_get_gem_obj (state->fb, i); +if (!dma_obj->map_noncoherent)continue ; daddr =drm_fb_dma_get_gem_addr (state->fb, state, i);
drivers/gpu/drm/drm_file.c +1 -1
@@ -131,7 +131,7 @@ bool drm_dev_needs_global_mutex(struct drm_device *dev)* }; * * For plain GEM based drivers there is the DEFINE_DRM_GEM_FOPS() macro, and for -* CMA based drivers there is the DEFINE_DRM_GEM_CMA_FOPS() macro to make this +* DMA based drivers there is the DEFINE_DRM_GEM_DMA_FOPS() macro to make this * simpler. * * The driver's &file_operations must be stored in &drm_driver.fops.
drivers/gpu/drm/drm_gem_dma_helper.c renamed from drivers/gpu/drm/drm_gem_cma_helper.c +156 -153
644 lines not on this page · raw message
drivers/gpu/drm/drm_mipi_dbi.c +1 -1
@@ -1134,7 +1134,7 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *dbi,/* * Even though it's not the SPI device that does DMA (the master does), * the dma mask is necessary for the dma_alloc_wc() in the GEM code -* (e.g., drm_gem_cma_create()). The dma_addr returned will be a physical +* (e.g., drm_gem_dma_create()). The dma_addr returned will be a physical * address which might be different from the bus address, but this is * not a problem since the address will not be used. * The virtual address is used in the transfer and the SPI core
drivers/gpu/drm/fsl-dcu/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_FSL_DCU tristate "DRM Support for Freescale DCU" depends on DRM && OF && ARM && COMMON_CLK select BACKLIGHT_CLASS_DEVICE - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_PANEL select REGMAP_MMIO
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +3 -3
@@ -22,7 +22,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_modeset_helper.h> #include <drm/drm_module.h> #include <drm/drm_probe_helper.h>
@@ -150,13 +150,13 @@ static void fsl_dcu_unload(struct drm_device *dev) dev->dev_private =NULL ; } -DEFINE_DRM_GEM_CMA_FOPS (fsl_dcu_drm_fops); +DEFINE_DRM_GEM_DMA_FOPS (fsl_dcu_drm_fops);static const struct drm_driver fsl_dcu_drm_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .load = fsl_dcu_load, .unload = fsl_dcu_unload, -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .fops = &fsl_dcu_drm_fops, .name ="fsl-dcu-drm" , .desc ="Freescale DCU DRM" ,
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c +2 -2
@@ -12,7 +12,7 @@#include <drm/drm_crtc.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
@@ -83,7 +83,7 @@ static void fsl_dcu_drm_plane_atomic_update(struct drm_plane *plane,struct drm_plane_state *new_state =drm_atomic_get_new_plane_state (state, plane);struct drm_framebuffer *fb = plane->state->fb; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;unsigned int alpha =DCU_LAYER_AB_NONE , bpp;int index;
drivers/gpu/drm/hisilicon/kirin/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_HISI_KIRIN tristate "DRM Support for Hisilicon Kirin series SoCs Platform" depends on DRM && OF && ARM64 select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DSI help Choose this option if you have a hisilicon Kirin chipsets(hi6220).
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +4 -4
@@ -26,7 +26,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h>
@@ -548,7 +548,7 @@ static const struct drm_crtc_funcs ade_crtc_funcs = {static void ade_rdma_set (void __iomem *base,struct drm_framebuffer *fb,u32 ch,u32 y,u32 in_h,u32 fmt) { -struct drm_gem_cma_object *obj =drm_fb_dma_get_gem_obj (fb,0 ); +struct drm_gem_dma_object *obj =drm_fb_dma_get_gem_obj (fb,0 );u32 reg_ctrl, reg_addr, reg_size, reg_stride, reg_space, reg_en;u32 stride = fb->pitches[0 ];u32 addr = (u32 )obj->paddr + y * stride;
@@ -919,12 +919,12 @@ static const struct drm_mode_config_funcs ade_mode_config_funcs = { }; -DEFINE_DRM_GEM_CMA_FOPS (ade_fops); +DEFINE_DRM_GEM_DMA_FOPS (ade_fops);static const struct drm_driver ade_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &ade_fops, -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .name ="kirin" , .desc ="Hisilicon Kirin620 SoC DRM Driver" , .date ="20150718" ,
drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +1 -1
@@ -21,7 +21,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_module.h> #include <drm/drm_of.h>
drivers/gpu/drm/imx/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_IMX tristate "DRM Support for Freescale i.MX" select DRM_KMS_HELPER select VIDEOMODE_HELPERS - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM || COMPILE_TEST) depends on IMX_IPUV3_CORE
drivers/gpu/drm/imx/dcss/Kconfig +1 -1
@@ -2,7 +2,7 @@ config DRM_IMX_DCSS tristate "i.MX8MQ DCSS" select IMX_IRQSTEER select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS depends on DRM && ARCH_MXC && ARM64 help
drivers/gpu/drm/imx/dcss/dcss-kms.c +3 -3
@@ -8,7 +8,7 @@#include <drm/drm_bridge_connector.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h>
@@ -17,7 +17,7 @@#include "dcss-dev.h" #include "dcss-kms.h" -DEFINE_DRM_GEM_CMA_FOPS (dcss_cma_fops); +DEFINE_DRM_GEM_DMA_FOPS (dcss_cma_fops);static const struct drm_mode_config_funcs dcss_drm_mode_config_funcs = { .fb_create = drm_gem_fb_create,
@@ -28,7 +28,7 @@ static const struct drm_mode_config_funcs dcss_drm_mode_config_funcs = {static const struct drm_driver dcss_kms_driver = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .fops = &dcss_cma_fops, .name ="imx-dcss" , .desc ="i.MX8MQ Display Subsystem" ,
drivers/gpu/drm/imx/dcss/dcss-plane.c +8 -8
@@ -7,7 +7,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include "dcss-dev.h" #include "dcss-kms.h"
@@ -145,7 +145,7 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,struct dcss_dev *dcss = plane->dev->dev_private;struct drm_framebuffer *fb = new_plane_state->fb;bool is_primary_plane = plane->type ==DRM_PLANE_TYPE_PRIMARY ; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;struct drm_crtc_state *crtc_state;int hdisplay, vdisplay;int min, max;
@@ -154,8 +154,8 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,if (!fb || !new_plane_state->crtc)return 0 ; - cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); -WARN_ON (!cma_obj); + dma_obj =drm_fb_dma_get_gem_obj (fb,0 ); +WARN_ON (!dma_obj); crtc_state =drm_atomic_get_existing_crtc_state (state, new_plane_state->crtc);
@@ -216,26 +216,26 @@ static void dcss_plane_atomic_set_base(struct dcss_plane *dcss_plane)struct dcss_dev *dcss = plane->dev->dev_private;struct drm_framebuffer *fb = state->fb;const struct drm_format_info *format = fb->format; -struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); +struct drm_gem_dma_object *dma_obj =drm_fb_dma_get_gem_obj (fb,0 );unsigned long p1_ba =0 , p2_ba =0 ;if (!format->is_yuv || format->format ==DRM_FORMAT_NV12 || format->format ==DRM_FORMAT_NV21 ) - p1_ba = cma_obj->paddr + fb->offsets[0 ] + + p1_ba = dma_obj->paddr + fb->offsets[0 ] + fb->pitches[0 ] * (state->src.y1 >>16 ) + format->char_per_block[0 ] * (state->src.x1 >>16 );else if (format->format ==DRM_FORMAT_UYVY || format->format ==DRM_FORMAT_VYUY || format->format ==DRM_FORMAT_YUYV || format->format ==DRM_FORMAT_YVYU ) - p1_ba = cma_obj->paddr + fb->offsets[0 ] + + p1_ba = dma_obj->paddr + fb->offsets[0 ] + fb->pitches[0 ] * (state->src.y1 >>16 ) +2 * format->char_per_block[0 ] * (state->src.x1 >>17 );if (format->format ==DRM_FORMAT_NV12 || format->format ==DRM_FORMAT_NV21 ) - p2_ba = cma_obj->paddr + fb->offsets[1 ] + + p2_ba = dma_obj->paddr + fb->offsets[1 ] + (((fb->pitches[1 ] >>1 ) * (state->src.y1 >>17 ) + (state->src.x1 >>17 )) <<1 );
drivers/gpu/drm/imx/imx-drm-core.c +4 -4
@@ -18,7 +18,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_managed.h> #include <drm/drm_of.h>
@@ -34,7 +34,7 @@static int legacyfb_depth =16 ;module_param (legacyfb_depth, int,0444 ); -DEFINE_DRM_GEM_CMA_FOPS (imx_drm_driver_fops); +DEFINE_DRM_GEM_DMA_FOPS (imx_drm_driver_fops);void imx_drm_connector_destroy (struct drm_connector *connector) {
@@ -154,7 +154,7 @@ static int imx_drm_dumb_create(struct drm_file *file_priv, args->width =ALIGN (width,8 ); - ret =drm_gem_cma_dumb_create (file_priv, drm, args); + ret =drm_gem_dma_dumb_create (file_priv, drm, args);if (ret)return ret;
@@ -164,7 +164,7 @@ static int imx_drm_dumb_create(struct drm_file *file_priv,static const struct drm_driver imx_drm_driver = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE (imx_drm_dumb_create), +DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE (imx_drm_dumb_create), .ioctls = imx_drm_ioctls, .num_ioctls =ARRAY_SIZE (imx_drm_ioctls), .fops = &imx_drm_driver_fops,
drivers/gpu/drm/imx/imx-drm.h +1 -1
@@ -32,7 +32,7 @@ extern struct platform_driver ipu_drm_driver;void imx_drm_mode_config_init (struct drm_device *drm); -struct drm_gem_cma_object *imx_drm_fb_get_obj (struct drm_framebuffer *fb); +struct drm_gem_dma_object *imx_drm_fb_get_obj (struct drm_framebuffer *fb);int imx_drm_encoder_parse_of (struct drm_device *drm,struct drm_encoder *encoder,struct device_node *np);
drivers/gpu/drm/imx/ipuv3-crtc.c +1 -1
@@ -19,7 +19,7 @@#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/imx/ipuv3-plane.c +13 -13
@@ -10,7 +10,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_plane_helper.h>
@@ -124,14 +124,14 @@ static inline unsigned long drm_plane_state_to_eba(struct drm_plane_state *state, int plane) {struct drm_framebuffer *fb = state->fb; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;int x = state->src.x1 >>16 ;int y = state->src.y1 >>16 ; - cma_obj =drm_fb_dma_get_gem_obj (fb, plane); -BUG_ON (!cma_obj); + dma_obj =drm_fb_dma_get_gem_obj (fb, plane); +BUG_ON (!dma_obj); -return cma_obj->paddr + fb->offsets[plane] + fb->pitches[plane] * y + +return dma_obj->paddr + fb->offsets[plane] + fb->pitches[plane] * y + fb->format->cpp[plane] * x; }
@@ -139,18 +139,18 @@ static inline unsigned long drm_plane_state_to_ubo(struct drm_plane_state *state) {struct drm_framebuffer *fb = state->fb; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;unsigned long eba =drm_plane_state_to_eba (state,0 );int x = state->src.x1 >>16 ;int y = state->src.y1 >>16 ; - cma_obj =drm_fb_dma_get_gem_obj (fb,1 ); -BUG_ON (!cma_obj); + dma_obj =drm_fb_dma_get_gem_obj (fb,1 ); +BUG_ON (!dma_obj); x /= fb->format->hsub; y /= fb->format->vsub; -return cma_obj->paddr + fb->offsets[1 ] + fb->pitches[1 ] * y + +return dma_obj->paddr + fb->offsets[1 ] + fb->pitches[1 ] * y + fb->format->cpp[1 ] * x - eba; }
@@ -158,18 +158,18 @@ static inline unsigned long drm_plane_state_to_vbo(struct drm_plane_state *state) {struct drm_framebuffer *fb = state->fb; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;unsigned long eba =drm_plane_state_to_eba (state,0 );int x = state->src.x1 >>16 ;int y = state->src.y1 >>16 ; - cma_obj =drm_fb_dma_get_gem_obj (fb,2 ); -BUG_ON (!cma_obj); + dma_obj =drm_fb_dma_get_gem_obj (fb,2 ); +BUG_ON (!dma_obj); x /= fb->format->hsub; y /= fb->format->vsub; -return cma_obj->paddr + fb->offsets[2 ] + fb->pitches[2 ] * y + +return dma_obj->paddr + fb->offsets[2 ] + fb->pitches[2 ] * y + fb->format->cpp[2 ] * x - eba; }
drivers/gpu/drm/ingenic/Kconfig +1 -1
@@ -8,7 +8,7 @@ config DRM_INGENIC select DRM_BRIDGE select DRM_PANEL_BRIDGE select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE help Choose this option for DRM support for the Ingenic SoCs.
drivers/gpu/drm/ingenic/ingenic-drm-drv.c +4 -4
@@ -29,7 +29,7 @@#include <drm/drm_damage_helper.h> #include <drm/drm_drv.h> #include <drm/drm_encoder.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h>
@@ -911,7 +911,7 @@ static struct drm_gem_object * ingenic_drm_gem_create_object(struct drm_device *drm, size_t size) {struct ingenic_drm *priv =drm_device_get_priv (drm); -struct drm_gem_cma_object *obj; +struct drm_gem_dma_object *obj; obj =kzalloc (sizeof (*obj),GFP_KERNEL );if (!obj)
@@ -944,7 +944,7 @@ static void ingenic_drm_destroy_state(struct drm_private_obj *obj,kfree (priv_state); } -DEFINE_DRM_GEM_CMA_FOPS (ingenic_drm_fops); +DEFINE_DRM_GEM_DMA_FOPS (ingenic_drm_fops);static const struct drm_driver ingenic_drm_driver_data = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_ATOMIC ,
@@ -957,7 +957,7 @@ static const struct drm_driver ingenic_drm_driver_data = { .fops = &ingenic_drm_fops, .gem_create_object = ingenic_drm_gem_create_object, - DRM_GEM_CMA_DRIVER_OPS, + DRM_GEM_DMA_DRIVER_OPS, };static const struct drm_plane_funcs ingenic_drm_primary_plane_funcs = {
drivers/gpu/drm/ingenic/ingenic-ipu.c +1 -1
@@ -25,7 +25,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_plane.h> #include <drm/drm_plane_helper.h>
drivers/gpu/drm/kmb/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_KMB_DISPLAY depends on DRM depends on ARCH_KEEMBAY || COMPILE_TEST select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DSI help Choose this option if you have Intel's KeemBay SOC which integrates
drivers/gpu/drm/kmb/kmb_drv.c +3 -3
@@ -16,7 +16,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_module.h> #include <drm/drm_probe_helper.h>
@@ -433,14 +433,14 @@ static void kmb_irq_uninstall(struct drm_device *drm)free_irq (kmb->irq_lcd, drm); } -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops);static const struct drm_driver kmb_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC ,/* GEM Operations */ .fops = &fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .name ="kmb-drm" , .desc ="KEEMBAY DISPLAY DRIVER" , .date =DRIVER_DATE ,
drivers/gpu/drm/kmb/kmb_plane.c +1 -1
@@ -10,7 +10,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_plane_helper.h>
drivers/gpu/drm/mcde/Kconfig +1 -1
@@ -10,7 +10,7 @@ config DRM_MCDE select DRM_BRIDGE select DRM_PANEL_BRIDGE select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE help Choose this option for DRM support for the ST-Ericsson MCDE
drivers/gpu/drm/mcde/mcde_display.c +1 -1
@@ -14,7 +14,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_mipi_dsi.h> #include <drm/drm_simple_kms_helper.h> #include <drm/drm_bridge.h>
drivers/gpu/drm/mcde/mcde_drv.c +3 -3
@@ -71,7 +71,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_managed.h> #include <drm/drm_of.h>
@@ -198,7 +198,7 @@ static int mcde_modeset_init(struct drm_device *drm)return 0 ; } -DEFINE_DRM_GEM_CMA_FOPS (drm_fops); +DEFINE_DRM_GEM_DMA_FOPS (drm_fops);static const struct drm_driver mcde_drm_driver = { .driver_features =
@@ -212,7 +212,7 @@ static const struct drm_driver mcde_drm_driver = { .major = 1, .minor = 0, .patchlevel = 0, - DRM_GEM_CMA_DRIVER_OPS, + DRM_GEM_DMA_DRIVER_OPS, };static int mcde_drm_bind (struct device *dev)
drivers/gpu/drm/mediatek/Kconfig +1 -1
@@ -7,7 +7,7 @@ config DRM_MEDIATEK depends on HAVE_ARM_SMCCC depends on OF depends on MTK_MMSYS - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_MIPI_DSI select DRM_PANEL
drivers/gpu/drm/mediatek/mtk_drm_drv.c +1 -1
@@ -18,7 +18,7 @@#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/mediatek/mtk_drm_gem.c +2 -2
@@ -8,7 +8,7 @@#include <drm/drm.h> #include <drm/drm_device.h> #include <drm/drm_gem.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_prime.h> #include "mtk_drm_drv.h"
@@ -22,7 +22,7 @@ static const struct drm_gem_object_funcs mtk_drm_gem_object_funcs = { .vmap = mtk_drm_gem_prime_vmap, .vunmap = mtk_drm_gem_prime_vunmap, .mmap = mtk_drm_gem_object_mmap, - .vm_ops = &drm_gem_cma_vm_ops, + .vm_ops = &drm_gem_dma_vm_ops, }; static struct mtk_drm_gem_obj *mtk_drm_gem_init(struct drm_device *dev,
drivers/gpu/drm/meson/Kconfig +1 -1
@@ -4,7 +4,7 @@ config DRM_MESON depends on DRM && OF && (ARM || ARM64) depends on ARCH_MESON || COMPILE_TEST select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_DISPLAY_CONNECTOR select VIDEOMODE_HELPERS select REGMAP_MMIO
drivers/gpu/drm/meson/meson_drv.c +5 -5
@@ -19,7 +19,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_module.h>
@@ -87,16 +87,16 @@ static int meson_dumb_create(struct drm_file *file, struct drm_device *dev, args->pitch =ALIGN (DIV_ROUND_UP (args->width * args->bpp,8 ),SZ_64 ); args->size =PAGE_ALIGN (args->pitch * args->height); -return drm_gem_cma_dumb_create_internal (file, dev, args); +return drm_gem_dma_dumb_create_internal (file, dev, args); } -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops);static const struct drm_driver meson_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , -/* CMA Ops */ -DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE (meson_dumb_create), +/* DMA Ops */ +DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE (meson_dumb_create),/* Misc */ .fops = &fops,
drivers/gpu/drm/meson/meson_overlay.c +2 -2
@@ -13,7 +13,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include "meson_overlay.h"
@@ -475,7 +475,7 @@ static void meson_overlay_atomic_update(struct drm_plane *plane, plane);struct drm_framebuffer *fb = new_state->fb;struct meson_drm *priv = meson_overlay->priv; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;unsigned long flags;bool interlace_mode;
drivers/gpu/drm/meson/meson_plane.c +2 -2
@@ -17,7 +17,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include "meson_plane.h"
@@ -138,7 +138,7 @@ static void meson_plane_atomic_update(struct drm_plane *plane,struct drm_rect dest =drm_plane_state_dest (new_state);struct meson_drm *priv = meson_plane->priv;struct drm_framebuffer *fb = new_state->fb; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;unsigned long flags;int vsc_ini_rcv_num, vsc_ini_rpt_p0_num;int vsc_bot_rcv_num, vsc_bot_rpt_p0_num;
drivers/gpu/drm/msm/msm_drv.c +1 -1
@@ -310,7 +310,7 @@ static int msm_init_vram(struct drm_device *dev)DRM_INFO ("using VRAM carveout: %lx@%pa\n" , size, &r.start);/* if we have no IOMMU, then we need to use carveout allocator. -* Grab the entire CMA chunk carved out in early startup in +* Grab the entire DMA chunk carved out in early startup in * mach-msm: */ }else if (!msm_use_mmu (dev)) {
drivers/gpu/drm/mxsfb/Kconfig +1 -1
@@ -10,7 +10,7 @@ config DRM_MXSFB depends on COMMON_CLK select DRM_MXS select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_PANEL select DRM_PANEL_BRIDGE help
drivers/gpu/drm/mxsfb/mxsfb_drv.c +3 -3
@@ -22,7 +22,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_mode_config.h> #include <drm/drm_module.h>
@@ -324,11 +324,11 @@ static void mxsfb_unload(struct drm_device *drm)pm_runtime_disable (drm->dev); } -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops);static const struct drm_driver mxsfb_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .fops = &fops, .name ="mxsfb-drm" , .desc ="MXSFB Controller DRM" ,
drivers/gpu/drm/mxsfb/mxsfb_kms.c +1 -1
@@ -22,7 +22,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane.h> #include <drm/drm_plane_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/panel/Kconfig +1 -1
@@ -155,7 +155,7 @@ config DRM_PANEL_ILITEK_ILI9341 tristate "Ilitek ILI9341 240x320 QVGA panels" depends on OF && SPI depends on DRM_KMS_HELPER - depends on DRM_GEM_CMA_HELPER + depends on DRM_GEM_DMA_HELPER depends on BACKLIGHT_CLASS_DEVICE select DRM_MIPI_DBI help
drivers/gpu/drm/panel/panel-ilitek-ili9341.c +3 -3
@@ -32,7 +32,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_modes.h>
@@ -586,12 +586,12 @@ static const struct drm_display_mode ili9341_dbi_mode = {DRM_SIMPLE_MODE (240 ,320 ,37 ,49 ), }; -DEFINE_DRM_GEM_CMA_FOPS (ili9341_dbi_fops); +DEFINE_DRM_GEM_DMA_FOPS (ili9341_dbi_fops);static struct drm_driver ili9341_dbi_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &ili9341_dbi_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="ili9341" , .desc = "Ilitek ILI9341",
drivers/gpu/drm/pl111/Kconfig +1 -1
@@ -6,7 +6,7 @@ config DRM_PL111 depends on VEXPRESS_CONFIG || VEXPRESS_CONFIG=n depends on COMMON_CLK select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_BRIDGE select DRM_PANEL_BRIDGE select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE
drivers/gpu/drm/pl111/pl111_display.c +1 -1
@@ -17,7 +17,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_vblank.h> #include "pl111_drm.h"
drivers/gpu/drm/pl111/pl111_drv.c +4 -4
@@ -50,7 +50,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h> #include <drm/drm_panel.h>
@@ -207,10 +207,10 @@ pl111_gem_import_sg_table(struct drm_device *dev,if (priv->use_device_memory)return ERR_PTR (-EINVAL ); -return drm_gem_cma_prime_import_sg_table (dev, attach, sgt); +return drm_gem_dma_prime_import_sg_table (dev, attach, sgt); } -DEFINE_DRM_GEM_CMA_FOPS (drm_fops); +DEFINE_DRM_GEM_DMA_FOPS (drm_fops);static const struct drm_driver pl111_drm_driver = { .driver_features =
@@ -223,7 +223,7 @@ static const struct drm_driver pl111_drm_driver = { .major = 1, .minor = 0, .patchlevel = 0, - .dumb_create = drm_gem_cma_dumb_create, + .dumb_create = drm_gem_dma_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_sg_table = pl111_gem_import_sg_table,
drivers/gpu/drm/rcar-du/Kconfig +1 -1
@@ -5,7 +5,7 @@ config DRM_RCAR_DU depends on ARM || ARM64 depends on ARCH_RENESAS || COMPILE_TEST select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select VIDEOMODE_HELPERS help Choose this option if you have an R-Car chipset.
drivers/gpu/drm/rcar-du/rcar_du_crtc.c +1 -1
@@ -18,7 +18,7 @@#include <drm/drm_crtc.h> #include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/rcar-du/rcar_du_drv.c +2 -2
@@ -22,7 +22,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_probe_helper.h>
@@ -562,7 +562,7 @@ const char *rcar_du_output_name(enum rcar_du_output output)* DRM operations */ -DEFINE_DRM_GEM_CMA_FOPS (rcar_du_fops); +DEFINE_DRM_GEM_DMA_FOPS (rcar_du_fops);static const struct drm_driver rcar_du_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC ,
drivers/gpu/drm/rcar-du/rcar_du_kms.c +18 -18
@@ -12,7 +12,7 @@#include <drm/drm_crtc.h> #include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_managed.h> #include <drm/drm_probe_helper.h>
@@ -327,12 +327,12 @@ const struct rcar_du_format_info *rcar_du_format_info(u32 fourcc)*/ static const struct drm_gem_object_funcs rcar_du_gem_funcs = { - .free = drm_gem_cma_object_free, - .print_info = drm_gem_cma_object_print_info, - .get_sg_table = drm_gem_cma_object_get_sg_table, - .vmap = drm_gem_cma_object_vmap, - .mmap = drm_gem_cma_object_mmap, - .vm_ops = &drm_gem_cma_vm_ops, + .free = drm_gem_dma_object_free, + .print_info = drm_gem_dma_object_print_info, + .get_sg_table = drm_gem_dma_object_get_sg_table, + .vmap = drm_gem_dma_object_vmap, + .mmap = drm_gem_dma_object_mmap, + .vm_ops = &drm_gem_dma_vm_ops, }; struct drm_gem_object *rcar_du_gem_prime_import_sg_table(struct drm_device *dev,
@@ -340,33 +340,33 @@ struct drm_gem_object *rcar_du_gem_prime_import_sg_table(struct drm_device *dev, struct sg_table *sgt) {struct rcar_du_device *rcdu =to_rcar_du_device (dev); -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;struct drm_gem_object *gem_obj;int ret;if (!rcar_du_has (rcdu,RCAR_DU_FEATURE_VSP1_SOURCE )) -return drm_gem_cma_prime_import_sg_table (dev, attach, sgt); +return drm_gem_dma_prime_import_sg_table (dev, attach, sgt); -/* Create a CMA GEM buffer. */ - cma_obj =kzalloc (sizeof (*cma_obj),GFP_KERNEL ); -if (!cma_obj) +/* Create a DMA GEM buffer. */ + dma_obj =kzalloc (sizeof (*dma_obj),GFP_KERNEL ); +if (!dma_obj)return ERR_PTR (-ENOMEM ); - gem_obj = &cma_obj->base; + gem_obj = &dma_obj->base; gem_obj->funcs = &rcar_du_gem_funcs;drm_gem_private_object_init (dev, gem_obj, attach->dmabuf->size); - cma_obj->map_noncoherent = false; + dma_obj->map_noncoherent = false; ret =drm_gem_create_mmap_offset (gem_obj);if (ret) {drm_gem_object_release (gem_obj); -kfree (cma_obj); +kfree (dma_obj);return ERR_PTR (ret); } - cma_obj->paddr =0 ; - cma_obj->sgt = sgt; + dma_obj->paddr =0 ; + dma_obj->sgt = sgt;return gem_obj; }
@@ -389,7 +389,7 @@ int rcar_du_dumb_create(struct drm_file *file, struct drm_device *dev, args->pitch =roundup (min_pitch, align); -return drm_gem_cma_dumb_create_internal (file, dev, args); +return drm_gem_dma_dumb_create_internal (file, dev, args); } static struct drm_framebuffer *
drivers/gpu/drm/rcar-du/rcar_du_plane.c +2 -2
@@ -13,7 +13,7 @@#include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include "rcar_du_drv.h"
@@ -340,7 +340,7 @@ static void rcar_du_plane_setup_scanout(struct rcar_du_group *rgrp,if (state->source ==RCAR_DU_PLANE_MEMORY ) {struct drm_framebuffer *fb = state->state.fb; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;unsigned int i;if (state->format->planes ==2 )
drivers/gpu/drm/rcar-du/rcar_du_vsp.c +2 -2
@@ -13,7 +13,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_plane_helper.h> #include <drm/drm_vblank.h>
@@ -182,7 +182,7 @@ int rcar_du_vsp_map_fb(struct rcar_du_vsp *vsp, struct drm_framebuffer *fb,int ret;for (i =0 ; i < fb->format->num_planes; ++i) { -struct drm_gem_cma_object *gem =drm_fb_dma_get_gem_obj (fb, i); +struct drm_gem_dma_object *gem =drm_fb_dma_get_gem_obj (fb, i);struct sg_table *sgt = &sg_tables[i];if (gem->sgt) {
drivers/gpu/drm/rockchip/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_ROCKCHIP tristate "DRM Support for Rockchip" depends on DRM && ROCKCHIP_IOMMU select DRM_DISPLAY_HELPER if ROCKCHIP_ANALOGIX_DP - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_PANEL select VIDEOMODE_HELPERS
drivers/gpu/drm/rockchip/rockchip_drm_drv.c +1 -1
@@ -18,7 +18,7 @@#include <drm/drm_aperture.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/rockchip/rockchip_drm_gem.c +2 -2
@@ -10,7 +10,7 @@#include <drm/drm.h> #include <drm/drm_gem.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_prime.h> #include <drm/drm_vma_manager.h>
@@ -279,7 +279,7 @@ static const struct drm_gem_object_funcs rockchip_gem_object_funcs = { .vmap = rockchip_gem_prime_vmap, .vunmap = rockchip_gem_prime_vunmap, .mmap = rockchip_drm_gem_object_mmap, - .vm_ops = &drm_gem_cma_vm_ops, + .vm_ops = &drm_gem_dma_vm_ops, }; static struct rockchip_gem_object *
drivers/gpu/drm/shmobile/Kconfig +1 -1
@@ -5,7 +5,7 @@ config DRM_SHMOBILE depends on ARCH_SHMOBILE || COMPILE_TEST select BACKLIGHT_CLASS_DEVICE select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER help Choose this option if you have an SH Mobile chipset. If M is selected the module will be called shmob-drm.
drivers/gpu/drm/shmobile/shmob_drm_crtc.c +2 -2
@@ -14,7 +14,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h>
@@ -288,7 +288,7 @@ static void shmob_drm_crtc_compute_base(struct shmob_drm_crtc *scrtc, {struct drm_crtc *crtc = &scrtc->crtc;struct drm_framebuffer *fb = crtc->primary->fb; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;unsigned int bpp; bpp = scrtc->format->yuv ?8 : scrtc->format->bpp;
drivers/gpu/drm/shmobile/shmob_drm_drv.c +3 -3
@@ -17,7 +17,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_module.h> #include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h>
@@ -126,11 +126,11 @@ static irqreturn_t shmob_drm_irq(int irq, void *arg)return IRQ_HANDLED ; } -DEFINE_DRM_GEM_CMA_FOPS (shmob_drm_fops); +DEFINE_DRM_GEM_DMA_FOPS (shmob_drm_fops);static const struct drm_driver shmob_drm_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET , -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .fops = &shmob_drm_fops, .name ="shmob-drm" , .desc ="Renesas SH Mobile DRM" ,
drivers/gpu/drm/shmobile/shmob_drm_kms.c +1 -1
@@ -10,7 +10,7 @@#include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/shmobile/shmob_drm_kms.h +1 -1
@@ -12,7 +12,7 @@#include <linux/types.h> -struct drm_gem_cma_object ; +struct drm_gem_dma_object ;struct shmob_drm_device ;struct shmob_drm_format_info {
drivers/gpu/drm/shmobile/shmob_drm_plane.c +2 -2
@@ -11,7 +11,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include "shmob_drm_drv.h" #include "shmob_drm_kms.h"
@@ -40,7 +40,7 @@ static void shmob_drm_plane_compute_base(struct shmob_drm_plane *splane,struct drm_framebuffer *fb, int x, int y) { - struct drm_gem_cma_object *gem; + struct drm_gem_dma_object *gem;unsigned int bpp; bpp = splane->format->yuv ?8 : splane->format->bpp;
drivers/gpu/drm/sprd/Kconfig +1 -1
@@ -2,7 +2,7 @@ config DRM_SPRD tristate "DRM Support for Unisoc SoCs Platform" depends on ARCH_SPRD || COMPILE_TEST depends on DRM && OF - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_MIPI_DSI select VIDEOMODE_HELPERS
drivers/gpu/drm/sprd/sprd_dpu.c +4 -4
@@ -19,7 +19,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_plane_helper.h>
@@ -322,7 +322,7 @@ static u32 drm_blend_to_dpu(struct drm_plane_state *state)static void sprd_dpu_layer (struct sprd_dpu *dpu,struct drm_plane_state *state) {struct dpu_context *ctx = &dpu->ctx; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;struct drm_framebuffer *fb = state->fb;u32 addr, size, offset, pitch, blend, format, rotation;u32 src_x = state->src_x >>16 ;
@@ -339,8 +339,8 @@ static void sprd_dpu_layer(struct sprd_dpu *dpu, struct drm_plane_state *state) size = (src_w &0xffff ) | (src_h <<16 );for (i =0 ; i < fb->format->num_planes; i++) { - cma_obj =drm_fb_dma_get_gem_obj (fb, i); - addr = cma_obj->paddr + fb->offsets[i]; + dma_obj =drm_fb_dma_get_gem_obj (fb, i); + addr = dma_obj->paddr + fb->offsets[i];if (i ==0 )layer_reg_wr (ctx,REG_LAY_BASE_ADDR0 , addr, index);
drivers/gpu/drm/sprd/sprd_drm.c +3 -3
@@ -13,7 +13,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_drv.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h>
@@ -48,14 +48,14 @@ static void sprd_drm_mode_config_init(struct drm_device *drm) drm->mode_config.helper_private = &sprd_drm_mode_config_helper; } -DEFINE_DRM_GEM_CMA_FOPS (sprd_drm_fops); +DEFINE_DRM_GEM_DMA_FOPS (sprd_drm_fops);static struct drm_driver sprd_drm_drv = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &sprd_drm_fops,/* GEM Operations */ -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .name =DRIVER_NAME , .desc =DRIVER_DESC ,
drivers/gpu/drm/sti/Kconfig +1 -1
@@ -4,7 +4,7 @@ config DRM_STI depends on OF && DRM && (ARCH_STI || ARCH_MULTIPLATFORM) select RESET_CONTROLLER select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_PANEL select FW_LOADER select SND_SOC_HDMI_CODEC if SND_SOC
drivers/gpu/drm/sti/sti_cursor.c +5 -5
@@ -12,7 +12,7 @@#include <drm/drm_atomic.h> #include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include "sti_compositor.h" #include "sti_cursor.h"
@@ -243,7 +243,7 @@ static int sti_cursor_atomic_check(struct drm_plane *drm_plane, }if (!drm_fb_dma_get_gem_obj (fb,0 )) { -DRM_ERROR ("Can't get CMA GEM object for fb\n" ); +DRM_ERROR ("Can't get DMA GEM object for fb\n" );return -EINVAL ; }
@@ -266,7 +266,7 @@ static void sti_cursor_atomic_update(struct drm_plane *drm_plane,struct drm_framebuffer *fb = newstate->fb;struct drm_display_mode *mode;int dst_x, dst_y; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;u32 y, x;u32 val;
@@ -277,10 +277,10 @@ static void sti_cursor_atomic_update(struct drm_plane *drm_plane, dst_x = newstate->crtc_x; dst_y = newstate->crtc_y; - cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); + dma_obj =drm_fb_dma_get_gem_obj (fb,0 );/* Convert ARGB8888 to CLUT8 */ -sti_cursor_argb8888_to_clut8 (cursor, (u32 *)cma_obj->vaddr); +sti_cursor_argb8888_to_clut8 (cursor, (u32 *)dma_obj->vaddr);/* AWS and AWE depend on the mode */ y =sti_vtg_get_line_number (*mode,0 );
drivers/gpu/drm/sti/sti_drv.c +3 -3
@@ -16,7 +16,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h>
@@ -128,12 +128,12 @@ static void sti_mode_config_init(struct drm_device *dev) dev->mode_config.normalize_zpos = true; } -DEFINE_DRM_GEM_CMA_FOPS (sti_driver_fops); +DEFINE_DRM_GEM_DMA_FOPS (sti_driver_fops);static const struct drm_driver sti_driver = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_ATOMIC , .fops = &sti_driver_fops, -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , .debugfs_init = sti_drm_dbg_init,
drivers/gpu/drm/sti/sti_gdp.c +7 -7
@@ -13,7 +13,7 @@#include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include "sti_compositor.h" #include "sti_gdp.h"
@@ -657,7 +657,7 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane, }if (!drm_fb_dma_get_gem_obj (fb,0 )) { -DRM_ERROR ("Can't get CMA GEM object for fb\n" ); +DRM_ERROR ("Can't get DMA GEM object for fb\n" );return -EINVAL ; }
@@ -712,7 +712,7 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane,struct drm_display_mode *mode;int dst_x, dst_y, dst_w, dst_h;int src_x, src_y, src_w, src_h; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;struct sti_gdp_node_list *list;struct sti_gdp_node_list *curr_list;struct sti_gdp_node *top_field, *btm_field;
@@ -776,15 +776,15 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane, top_field->gam_gdp_ctl |=sti_gdp_get_alpharange (format); top_field->gam_gdp_ppt &= ~GAM_GDP_PPT_IGNORE ; - cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); + dma_obj =drm_fb_dma_get_gem_obj (fb,0 );DRM_DEBUG_DRIVER ("drm FB:%d format:%.4s phys@:0x%lx\n" , fb->base.id, (char *)&fb->format->format, - (unsigned long )cma_obj->paddr); + (unsigned long )dma_obj->paddr);/* pixel memory location */ bpp = fb->format->cpp[0 ]; - top_field->gam_gdp_pml = (u32 )cma_obj->paddr + fb->offsets[0 ]; + top_field->gam_gdp_pml = (u32 )dma_obj->paddr + fb->offsets[0 ]; top_field->gam_gdp_pml += src_x * bpp; top_field->gam_gdp_pml += src_y * fb->pitches[0 ];
@@ -829,7 +829,7 @@ static void sti_gdp_atomic_update(struct drm_plane *drm_plane,dev_dbg (gdp->dev,"Current NVN:0x%X\n" ,readl (gdp->regs +GAM_GDP_NVN_OFFSET ));dev_dbg (gdp->dev,"Posted buff: %lx current buff: %x\n" , - (unsigned long )cma_obj->paddr, + (unsigned long )dma_obj->paddr,readl (gdp->regs +GAM_GDP_PML_OFFSET ));if (!curr_list) {
drivers/gpu/drm/sti/sti_hqvdp.c +7 -7
@@ -17,7 +17,7 @@#include <drm/drm_device.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include "sti_compositor.h" #include "sti_drv.h"
@@ -1054,7 +1054,7 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane, }if (!drm_fb_dma_get_gem_obj (fb,0 )) { -DRM_ERROR ("Can't get CMA GEM object for fb\n" ); +DRM_ERROR ("Can't get DMA GEM object for fb\n" );return -EINVAL ; }
@@ -1122,7 +1122,7 @@ static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane,struct drm_display_mode *mode;int dst_x, dst_y, dst_w, dst_h;int src_x, src_y, src_w, src_h; -struct drm_gem_cma_object *cma_obj; +struct drm_gem_dma_object *dma_obj;struct sti_hqvdp_cmd *cmd;int scale_h, scale_v;int cmd_offset;
@@ -1176,15 +1176,15 @@ static void sti_hqvdp_atomic_update(struct drm_plane *drm_plane, cmd->iqi.sat_gain =IQI_SAT_GAIN_DFLT ; cmd->iqi.pxf_conf =IQI_PXF_CONF_DFLT ; - cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); + dma_obj =drm_fb_dma_get_gem_obj (fb,0 );DRM_DEBUG_DRIVER ("drm FB:%d format:%.4s phys@:0x%lx\n" , fb->base.id, (char *)&fb->format->format, - (unsigned long )cma_obj->paddr); + (unsigned long )dma_obj->paddr);/* Buffer planes address */ - cmd->top.current_luma = (u32 )cma_obj->paddr + fb->offsets[0 ]; - cmd->top.current_chroma = (u32 )cma_obj->paddr + fb->offsets[1 ]; + cmd->top.current_luma = (u32 )dma_obj->paddr + fb->offsets[0 ]; + cmd->top.current_chroma = (u32 )dma_obj->paddr + fb->offsets[1 ];/* Pitches */ cmd->top.luma_processed_pitch = fb->pitches[0 ];
drivers/gpu/drm/sti/sti_plane.c +1 -1
@@ -10,7 +10,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include "sti_compositor.h" #include "sti_drv.h"
drivers/gpu/drm/stm/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_STM tristate "DRM Support for STMicroelectronics SoC Series" depends on DRM && (ARCH_STM32 || ARCH_MULTIPLATFORM) select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_PANEL_BRIDGE select VIDEOMODE_HELPERS select FB_PROVIDE_GET_FB_UNMAPPED_AREA if FB
drivers/gpu/drm/stm/drv.c +5 -5
@@ -20,7 +20,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_module.h> #include <drm/drm_probe_helper.h>
@@ -37,7 +37,7 @@ static const struct drm_mode_config_funcs drv_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static int stm_gem_cma_dumb_create (struct drm_file *file, +static int stm_gem_dma_dumb_create (struct drm_file *file,struct drm_device *dev,struct drm_mode_create_dumb *args) {
@@ -50,10 +50,10 @@ static int stm_gem_cma_dumb_create(struct drm_file *file, args->pitch =roundup (min_pitch,128 ); args->height =roundup (args->height,4 ); -return drm_gem_cma_dumb_create_internal (file, dev, args); +return drm_gem_dma_dumb_create_internal (file, dev, args); } -DEFINE_DRM_GEM_CMA_FOPS (drv_driver_fops); +DEFINE_DRM_GEM_DMA_FOPS (drv_driver_fops);static const struct drm_driver drv_driver = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_ATOMIC ,
@@ -64,7 +64,7 @@ static const struct drm_driver drv_driver = { .minor = 0, .patchlevel = 0, .fops = &drv_driver_fops, - DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(stm_gem_cma_dumb_create), + DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE(stm_gem_dma_dumb_create), };static int drv_load (struct drm_device *ddev)
drivers/gpu/drm/stm/ltdc.c +1 -1
@@ -28,7 +28,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_of.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/sun4i/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_SUN4I tristate "DRM Support for Allwinner A10 Display Engine" depends on DRM && COMMON_CLK depends on ARCH_SUNXI || COMPILE_TEST - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_PANEL select REGMAP_MMIO
drivers/gpu/drm/sun4i/sun4i_backend.c +1 -1
@@ -20,7 +20,7 @@#include <drm/drm_crtc.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/sun4i/sun4i_drv.c +4 -4
@@ -19,7 +19,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_module.h> #include <drm/drm_of.h> #include <drm/drm_probe_helper.h>
@@ -38,10 +38,10 @@ static int drm_sun4i_gem_dumb_create(struct drm_file *file_priv,/* The hardware only allows even pitches for YUV buffers. */ args->pitch =ALIGN (DIV_ROUND_UP (args->width * args->bpp,8 ),2 ); -return drm_gem_cma_dumb_create_internal (file_priv, drm, args); +return drm_gem_dma_dumb_create_internal (file_priv, drm, args); } -DEFINE_DRM_GEM_CMA_FOPS (sun4i_drv_fops); +DEFINE_DRM_GEM_DMA_FOPS (sun4i_drv_fops);static const struct drm_driver sun4i_drv_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC ,
@@ -55,7 +55,7 @@ static const struct drm_driver sun4i_drv_driver = { .minor = 0,/* GEM Operations */ - DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(drm_sun4i_gem_dumb_create), + DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE(drm_sun4i_gem_dumb_create), };static int sun4i_drv_bind (struct device *dev)
drivers/gpu/drm/sun4i/sun4i_frontend.c +1 -1
@@ -17,7 +17,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_framebuffer.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane.h> #include "sun4i_drv.h"
drivers/gpu/drm/sun4i/sun8i_mixer.c +1 -1
@@ -17,7 +17,7 @@#include <drm/drm_atomic_helper.h> #include <drm/drm_crtc.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
drivers/gpu/drm/sun4i/sun8i_ui_layer.c +2 -2
@@ -15,7 +15,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
@@ -191,7 +191,7 @@ static int sun8i_ui_layer_update_buffer(struct sun8i_mixer *mixer, int channel, {struct drm_plane_state *state = plane->state;struct drm_framebuffer *fb = state->fb; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;dma_addr_t paddr;u32 ch_base;int bpp;
drivers/gpu/drm/sun4i/sun8i_vi_layer.c +2 -2
@@ -8,7 +8,7 @@#include <drm/drm_crtc.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_probe_helper.h>
@@ -307,7 +307,7 @@ static int sun8i_vi_layer_update_buffer(struct sun8i_mixer *mixer, int channel,struct drm_plane_state *state = plane->state;struct drm_framebuffer *fb = state->fb;const struct drm_format_info *format = fb->format; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;u32 dx, dy, src_x, src_y;dma_addr_t paddr;u32 ch_base;
drivers/gpu/drm/tidss/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_TIDSS depends on DRM && OF depends on ARM || ARM64 || COMPILE_TEST select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER help The TI Keystone family SoCs introduced a new generation of Display SubSystem. There is currently three Keystone family
drivers/gpu/drm/tidss/tidss_crtc.c +1 -1
@@ -9,7 +9,7 @@#include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_plane_helper.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/tidss/tidss_dispc.c +3 -3
@@ -23,7 +23,7 @@#include <drm/drm_fourcc.h> #include <drm/drm_fb_dma_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_panel.h> #include "tidss_crtc.h"
@@ -1954,7 +1954,7 @@ staticdma_addr_t dispc_plane_state_paddr (const struct drm_plane_state *state) {struct drm_framebuffer *fb = state->fb; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;u32 x = state->src_x >>16 ;u32 y = state->src_y >>16 ;
@@ -1968,7 +1968,7 @@ staticdma_addr_t dispc_plane_state_p_uv_addr (const struct drm_plane_state *state) {struct drm_framebuffer *fb = state->fb; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;u32 x = state->src_x >>16 ;u32 y = state->src_y >>16 ;
drivers/gpu/drm/tidss/tidss_drv.c +3 -3
@@ -15,7 +15,7 @@#include <drm/drm_crtc_helper.h> #include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_module.h> #include <drm/drm_probe_helper.h>
@@ -101,13 +101,13 @@ static void tidss_release(struct drm_device *ddev)drm_kms_helper_poll_fini (ddev); } -DEFINE_DRM_GEM_CMA_FOPS (tidss_fops); +DEFINE_DRM_GEM_DMA_FOPS (tidss_fops);static const struct drm_driver tidss_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &tidss_fops, .release = tidss_release, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .name ="tidss" , .desc ="TI Keystone DSS" , .date ="20180215" ,
drivers/gpu/drm/tilcdc/Kconfig +1 -1
@@ -3,7 +3,7 @@ config DRM_TILCDC tristate "DRM Support for TI LCDC Display Controller" depends on DRM && OF && ARM select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_BRIDGE select DRM_PANEL_BRIDGE select VIDEOMODE_HELPERS
drivers/gpu/drm/tilcdc/tilcdc_crtc.c +2 -2
@@ -14,7 +14,7 @@#include <drm/drm_crtc.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_modeset_helper_vtables.h> #include <drm/drm_print.h> #include <drm/drm_vblank.h>
@@ -63,7 +63,7 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb) {struct drm_device *dev = crtc->dev;struct tilcdc_drm_private *priv = dev->dev_private; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;dma_addr_t start, end;u64 dma_base_and_ceiling;
drivers/gpu/drm/tilcdc/tilcdc_drv.c +3 -3
@@ -18,7 +18,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_mm.h> #include <drm/drm_probe_helper.h>
@@ -476,11 +476,11 @@ static void tilcdc_debugfs_init(struct drm_minor *minor) }#endif -DEFINE_DRM_GEM_CMA_FOPS (fops); +DEFINE_DRM_GEM_DMA_FOPS (fops);static const struct drm_driver tilcdc_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , #ifdef CONFIG_DEBUG_FS .debugfs_init = tilcdc_debugfs_init, #endif
drivers/gpu/drm/tiny/Kconfig +11 -11
@@ -3,7 +3,7 @@ config DRM_ARCPGU tristate "ARC PGU" depends on DRM && OF - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER help Choose this option if you have an ARC PGU controller.
@@ -55,7 +55,7 @@ config DRM_PANEL_MIPI_DBI tristate "DRM support for MIPI DBI compatible panels" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI select BACKLIGHT_CLASS_DEVICE select VIDEOMODE_HELPERS
@@ -86,7 +86,7 @@ config TINYDRM_HX8357D tristate "DRM support for HX8357D display panels" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI select BACKLIGHT_CLASS_DEVICE help
@@ -99,7 +99,7 @@ config TINYDRM_ILI9163 tristate "DRM support for ILI9163 display panels" depends on DRM && SPI select BACKLIGHT_CLASS_DEVICE - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_KMS_HELPER select DRM_MIPI_DBI help
@@ -112,7 +112,7 @@ config TINYDRM_ILI9225 tristate "DRM support for ILI9225 display panels" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI help DRM driver for the following Ilitek ILI9225 panels:
@@ -124,7 +124,7 @@ config TINYDRM_ILI9341 tristate "DRM support for ILI9341 display panels" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI select BACKLIGHT_CLASS_DEVICE help
@@ -137,7 +137,7 @@ config TINYDRM_ILI9486 tristate "DRM support for ILI9486 display panels" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI select BACKLIGHT_CLASS_DEVICE help
@@ -151,7 +151,7 @@ config TINYDRM_MI0283QT tristate "DRM support for MI0283QT" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI select BACKLIGHT_CLASS_DEVICE help
@@ -162,7 +162,7 @@ config TINYDRM_REPAPER tristate "DRM support for Pervasive Displays RePaper panels (V231)" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER help DRM driver for the following Pervasive Displays panels: 1.44" TFT EPD Panel (E1144CS021)
@@ -176,7 +176,7 @@ config TINYDRM_ST7586 tristate "DRM support for Sitronix ST7586 display panels" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI help DRM driver for the following Sitronix ST7586 panels:
@@ -188,7 +188,7 @@ config TINYDRM_ST7735R tristate "DRM support for Sitronix ST7715R/ST7735R display panels" depends on DRM && SPI select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_MIPI_DBI select BACKLIGHT_CLASS_DEVICE help
drivers/gpu/drm/tiny/arcpgu.c +4 -4
@@ -13,7 +13,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_module.h> #include <drm/drm_of.h>
@@ -218,7 +218,7 @@ static void arc_pgu_update(struct drm_simple_display_pipe *pipe, struct drm_plane_state *state) {struct arcpgu_drm_private *arcpgu; -struct drm_gem_cma_object *gem; +struct drm_gem_dma_object *gem;if (!pipe->plane.state->fb)return ;
@@ -241,7 +241,7 @@ static const struct drm_mode_config_funcs arcpgu_drm_modecfg_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -DEFINE_DRM_GEM_CMA_FOPS (arcpgu_drm_ops); +DEFINE_DRM_GEM_DMA_FOPS (arcpgu_drm_ops);static int arcpgu_load (struct arcpgu_drm_private *arcpgu) {
@@ -368,7 +368,7 @@ static const struct drm_driver arcpgu_drm_driver = { .minor = 0, .patchlevel = 0, .fops = &arcpgu_drm_ops, -DRM_GEM_CMA_DRIVER_OPS , +DRM_GEM_DMA_DRIVER_OPS , #ifdef CONFIG_DEBUG_FS .debugfs_init = arcpgu_debugfs_init, #endif
drivers/gpu/drm/tiny/hx8357d.c +3 -3
@@ -20,7 +20,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_modeset_helper.h>
@@ -190,12 +190,12 @@ static const struct drm_display_mode yx350hv15_mode = {DRM_SIMPLE_MODE (320 ,480 ,60 ,75 ), }; -DEFINE_DRM_GEM_CMA_FOPS (hx8357d_fops); +DEFINE_DRM_GEM_DMA_FOPS (hx8357d_fops);static const struct drm_driver hx8357d_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &hx8357d_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="hx8357d" , .desc = "HX8357D",
drivers/gpu/drm/tiny/ili9163.c +3 -3
@@ -11,7 +11,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_modeset_helper.h>
@@ -110,12 +110,12 @@ static const struct drm_display_mode yx240qv29_mode = {DRM_SIMPLE_MODE (128 ,160 ,28 ,35 ), }; -DEFINE_DRM_GEM_CMA_FOPS (ili9163_fops); +DEFINE_DRM_GEM_DMA_FOPS (ili9163_fops);static struct drm_driver ili9163_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &ili9163_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="ili9163" , .desc = "Ilitek ILI9163",
drivers/gpu/drm/tiny/ili9225.c +5 -5
@@ -23,7 +23,7 @@#include <drm/drm_fb_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_rect.h>
@@ -77,7 +77,7 @@ static inline int ili9225_command(struct mipi_dbi *dbi, u8 cmd, u16 data)static void ili9225_fb_dirty (struct drm_framebuffer *fb,struct drm_rect *rect) { -struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); +struct drm_gem_dma_object *dma_obj =drm_fb_dma_get_gem_obj (fb,0 );struct mipi_dbi_dev *dbidev =drm_to_mipi_dbi_dev (fb->dev);unsigned int height = rect->y2 - rect->y1;unsigned int width = rect->x2 - rect->x1;
@@ -103,7 +103,7 @@ static void ili9225_fb_dirty(struct drm_framebuffer *fb, struct drm_rect *rect)if (ret) goto err_msg; }else { - tr = cma_obj->vaddr; + tr = dma_obj->vaddr; }switch (dbidev->rotation) {
@@ -334,12 +334,12 @@ static const struct drm_display_mode ili9225_mode = {DRM_SIMPLE_MODE (176 ,220 ,35 ,44 ), }; -DEFINE_DRM_GEM_CMA_FOPS (ili9225_fops); +DEFINE_DRM_GEM_DMA_FOPS (ili9225_fops);static const struct drm_driver ili9225_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &ili9225_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .name ="ili9225" , .desc ="Ilitek ILI9225" , .date = "20171106",
drivers/gpu/drm/tiny/ili9341.c +3 -3
@@ -19,7 +19,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_modeset_helper.h>
@@ -146,12 +146,12 @@ static const struct drm_display_mode yx240qv29_mode = {DRM_SIMPLE_MODE (240 ,320 ,37 ,49 ), }; -DEFINE_DRM_GEM_CMA_FOPS (ili9341_fops); +DEFINE_DRM_GEM_DMA_FOPS (ili9341_fops);static const struct drm_driver ili9341_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &ili9341_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="ili9341" , .desc = "Ilitek ILI9341",
drivers/gpu/drm/tiny/ili9486.c +3 -3
@@ -18,7 +18,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_modeset_helper.h>
@@ -159,12 +159,12 @@ static const struct drm_display_mode waveshare_mode = {DRM_SIMPLE_MODE (480 ,320 ,73 ,49 ), }; -DEFINE_DRM_GEM_CMA_FOPS (ili9486_fops); +DEFINE_DRM_GEM_DMA_FOPS (ili9486_fops);static const struct drm_driver ili9486_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &ili9486_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="ili9486" , .desc = "Ilitek ILI9486",
drivers/gpu/drm/tiny/mi0283qt.c +3 -3
@@ -17,7 +17,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_modeset_helper.h>
@@ -150,12 +150,12 @@ static const struct drm_display_mode mi0283qt_mode = {DRM_SIMPLE_MODE (320 ,240 ,58 ,43 ), }; -DEFINE_DRM_GEM_CMA_FOPS (mi0283qt_fops); +DEFINE_DRM_GEM_DMA_FOPS (mi0283qt_fops);static const struct drm_driver mi0283qt_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &mi0283qt_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="mi0283qt" , .desc = "Multi-Inno MI0283QT",
drivers/gpu/drm/tiny/panel-mipi-dbi.c +3 -3
@@ -18,7 +18,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h> #include <drm/drm_modes.h>
@@ -217,12 +217,12 @@ static const struct drm_simple_display_pipe_funcs panel_mipi_dbi_pipe_funcs = { .update = mipi_dbi_pipe_update, }; -DEFINE_DRM_GEM_CMA_FOPS (panel_mipi_dbi_fops); +DEFINE_DRM_GEM_DMA_FOPS (panel_mipi_dbi_fops);static const struct drm_driver panel_mipi_dbi_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &panel_mipi_dbi_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="panel-mipi-dbi" , .desc ="MIPI DBI compatible display panel" ,
drivers/gpu/drm/tiny/repaper.c +5 -5
@@ -29,7 +29,7 @@#include <drm/drm_fb_helper.h> #include <drm/drm_format_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_managed.h> #include <drm/drm_modes.h>
@@ -510,7 +510,7 @@ static void repaper_get_temperature(struct repaper_epd *epd)static int repaper_fb_dirty (struct drm_framebuffer *fb) { -struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); +struct drm_gem_dma_object *dma_obj =drm_fb_dma_get_gem_obj (fb,0 );struct repaper_epd *epd =drm_to_epd (fb->dev);struct drm_rect clip;int idx, ret =0 ;
@@ -540,7 +540,7 @@ static int repaper_fb_dirty(struct drm_framebuffer *fb)if (ret) goto out_free; -drm_fb_xrgb8888_to_mono (buf,0 , cma_obj->vaddr, fb, &clip); +drm_fb_xrgb8888_to_mono (buf,0 , dma_obj->vaddr, fb, &clip);drm_gem_fb_end_cpu_access (fb,DMA_FROM_DEVICE );
@@ -902,12 +902,12 @@ static const struct drm_display_mode repaper_e2271cs021_mode = {static const u8 repaper_e2271cs021_cs[] = {0x00 ,0x00 ,0x00 ,0x7f ,0xff ,0xfe ,0x00 ,0x00 }; -DEFINE_DRM_GEM_CMA_FOPS (repaper_fops); +DEFINE_DRM_GEM_DMA_FOPS (repaper_fops);static const struct drm_driver repaper_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &repaper_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .name ="repaper" , .desc ="Pervasive Displays RePaper e-ink panels" , .date ="20170405" ,
drivers/gpu/drm/tiny/st7586.c +5 -5
@@ -19,7 +19,7 @@#include <drm/drm_fb_helper.h> #include <drm/drm_format_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h>
@@ -91,8 +91,8 @@ static void st7586_xrgb8888_to_gray332(u8 *dst, void *vaddr,static int st7586_buf_copy (void *dst,struct drm_framebuffer *fb,struct drm_rect *clip) { -struct drm_gem_cma_object *cma_obj =drm_fb_dma_get_gem_obj (fb,0 ); -void *src = cma_obj->vaddr; +struct drm_gem_dma_object *dma_obj =drm_fb_dma_get_gem_obj (fb,0 ); +void *src = dma_obj->vaddr;int ret =0 ; ret =drm_gem_fb_begin_cpu_access (fb,DMA_FROM_DEVICE );
@@ -268,12 +268,12 @@ static const struct drm_display_mode st7586_mode = {DRM_SIMPLE_MODE (178 ,128 ,37 ,27 ), }; -DEFINE_DRM_GEM_CMA_FOPS (st7586_fops); +DEFINE_DRM_GEM_DMA_FOPS (st7586_fops);static const struct drm_driver st7586_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &st7586_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="st7586" , .desc = "Sitronix ST7586",
drivers/gpu/drm/tiny/st7735r.c +3 -3
@@ -20,7 +20,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_managed.h> #include <drm/drm_mipi_dbi.h>
@@ -151,12 +151,12 @@ static const struct st7735r_cfg rh128128t_cfg = { .rgb = true, }; -DEFINE_DRM_GEM_CMA_FOPS (st7735r_fops); +DEFINE_DRM_GEM_DMA_FOPS (st7735r_fops);static const struct drm_driver st7735r_driver = { .driver_features =DRIVER_GEM |DRIVER_MODESET |DRIVER_ATOMIC , .fops = &st7735r_fops, -DRM_GEM_CMA_DRIVER_OPS_VMAP , +DRM_GEM_DMA_DRIVER_OPS_VMAP , .debugfs_init = mipi_dbi_debugfs_init, .name ="st7735r" , .desc ="Sitronix ST7735R" ,
drivers/gpu/drm/tve200/Kconfig +1 -1
@@ -8,7 +8,7 @@ config DRM_TVE200 select DRM_BRIDGE select DRM_PANEL_BRIDGE select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE help Choose this option for DRM support for the Faraday TV Encoder
drivers/gpu/drm/tve200/tve200_display.c +1 -1
@@ -18,7 +18,7 @@#include <drm/drm_fb_dma_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_gem_atomic_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_panel.h> #include <drm/drm_vblank.h>
drivers/gpu/drm/tve200/tve200_drv.c +3 -3
@@ -41,7 +41,7 @@#include <drm/drm_drv.h> #include <drm/drm_fb_dma_helper.h> #include <drm/drm_fb_helper.h> -#include <drm/drm_gem_cma_helper.h> +#include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_module.h> #include <drm/drm_of.h>
@@ -135,7 +135,7 @@ static int tve200_modeset_init(struct drm_device *dev)return ret; } -DEFINE_DRM_GEM_CMA_FOPS (drm_fops); +DEFINE_DRM_GEM_DMA_FOPS (drm_fops);static const struct drm_driver tve200_drm_driver = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_ATOMIC ,
@@ -147,7 +147,7 @@ static const struct drm_driver tve200_drm_driver = { .major = 1, .minor = 0, .patchlevel = 0, - DRM_GEM_CMA_DRIVER_OPS, + DRM_GEM_DMA_DRIVER_OPS, };static int tve200_probe (struct platform_device *pdev)
drivers/gpu/drm/v3d/v3d_gem.c +2 -2
@@ -314,7 +314,7 @@ v3d_lookup_bos(struct drm_device *dev, } job->bo =kvmalloc_array (job->bo_count, -sizeof (struct drm_gem_cma_object *), +sizeof (struct drm_gem_dma_object *),GFP_KERNEL | __GFP_ZERO);if (!job->bo) {DRM_DEBUG ("Failed to allocate validated BO pointers\n" );
@@ -1102,7 +1102,7 @@ v3d_gem_init(struct drm_device *dev)if (!v3d->pt) {drm_mm_takedown (&v3d->mm);dev_err (v3d->drm.dev, -"Failed to allocate page tables. Please ensure you have CMA enabled.\n" ); +"Failed to allocate page tables. Please ensure you have DMA enabled.\n" );return -ENOMEM ; }
drivers/gpu/drm/vc4/Kconfig +1 -1
@@ -11,7 +11,7 @@ config DRM_VC4 select DRM_DISPLAY_HDMI_HELPER select DRM_DISPLAY_HELPER select DRM_KMS_HELPER - select DRM_GEM_CMA_HELPER + select DRM_GEM_DMA_HELPER select DRM_PANEL_BRIDGE select SND_PCM select SND_PCM_ELD
drivers/gpu/drm/vc4/vc4_bo.c +22 -22
69 lines not on this page · raw message
drivers/gpu/drm/vc4/vc4_validate_shaders.c +1 -1
Lines of this file are not shown. View the raw message.
include/drm/drm_gem_dma_helper.h renamed from include/drm/drm_gem_cma_helper.h +78 -78
156 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.36.1
Part of the diff is not shown here. View the raw message.
PATCH v2 3/4 drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr}
In reply to Danilo KrummrichThe field paddr of struct drm_gem_dma_object holds a DMA address, which might actually be a physical address. However, depending on the platform, it can also be a bus address or a virtual address managed by an IOMMU.
Hence, rename the field to dma_addr, which is more applicable.
Since 'paddr' is a very commonly used term and symbol name a simple regex does not do the trick. Instead, users of the struct were fixed up iteratively with a trial and error approach building with make allyesconfig && make drivers/gpu/drm.
--- .../arm/display/komeda/komeda_framebuffer.c | 4 ++-- drivers/gpu/drm/arm/malidp_mw.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 12 +++++----- drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 2 +- drivers/gpu/drm/drm_fb_dma_helper.c | 10 ++++---- drivers/gpu/drm/drm_gem_dma_helper.c | 23 +++++++++++-------- drivers/gpu/drm/imx/ipuv3-plane.c | 6 ++--- drivers/gpu/drm/sprd/sprd_dpu.c | 2 +- drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 14 +++++------ drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 14 +++++------ drivers/gpu/drm/tidss/tidss_dispc.c | 16 ++++++------- drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/vc4/vc4_bo.c | 2 +- drivers/gpu/drm/vc4/vc4_gem.c | 8 +++---- drivers/gpu/drm/vc4/vc4_irq.c | 2 +- drivers/gpu/drm/vc4/vc4_plane.c | 4 ++-- drivers/gpu/drm/vc4/vc4_render_cl.c | 14 +++++------ drivers/gpu/drm/vc4/vc4_txp.c | 2 +- drivers/gpu/drm/vc4/vc4_v3d.c | 4 ++-- drivers/gpu/drm/vc4/vc4_validate.c | 12 +++++----- include/drm/drm_gem_dma_helper.h | 4 ++-- 21 files changed, 81 insertions(+), 78 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c +2 -2
@@ -137,7 +137,7 @@ komeda_fb_none_afbc_size_check(struct komeda_dev *mdev, struct komeda_fb *kfb, } min_size =komeda_fb_get_pixel_addr (kfb,0 , fb->height, i) - -to_drm_gem_dma_obj (obj)->paddr; + -to_drm_gem_dma_obj (obj)->dma_addr;if (obj->size < min_size) {DRM_DEBUG_KMS ("The fb->obj[%d] size: 0x%zx lower than the minimum requirement: 0x%llx.\n" , i, obj->size, min_size);
@@ -260,7 +260,7 @@ komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane) + plane_y * fb->pitches[plane]; } -return obj->paddr + offset; +return obj->dma_addr + offset; }/* if the fb can be supported by a specific layer */
drivers/gpu/drm/arm/malidp_mw.c +1 -1
@@ -168,7 +168,7 @@ malidp_mw_encoder_atomic_check(struct drm_encoder *encoder,return -EINVAL ; } mw_state->pitches[i] = fb->pitches[i]; - mw_state->addrs[i] = obj->paddr + fb->offsets[i]; + mw_state->addrs[i] = obj->dma_addr + fb->offsets[i]; } mw_state->n_planes = n_planes;
drivers/gpu/drm/arm/malidp_planes.c +6 -6
@@ -713,7 +713,7 @@ static void malidp_set_plane_base_addr(struct drm_framebuffer *fb, struct malidp_plane *mp, int plane_index) { -dma_addr_t paddr; +dma_addr_t dma_addr;u16 ptr;struct drm_plane *plane = &mp->base;bool afbc = fb->modifier ? true : false;
@@ -728,8 +728,8 @@ static void malidp_set_plane_base_addr(struct drm_framebuffer *fb,* and _AD_CROP_V registers. */ if (!afbc) { - paddr =drm_fb_dma_get_gem_addr (fb, plane->state, - plane_index); + dma_addr =drm_fb_dma_get_gem_addr (fb, plane->state, + plane_index); }else {struct drm_gem_dma_object *obj;
@@ -737,11 +737,11 @@ static void malidp_set_plane_base_addr(struct drm_framebuffer *fb,if (WARN_ON (!obj))return ; - paddr = obj->paddr; + dma_addr = obj->dma_addr; } -malidp_hw_write (mp->hwdev,lower_32_bits (paddr), ptr); -malidp_hw_write (mp->hwdev,upper_32_bits (paddr), ptr +4 ); +malidp_hw_write (mp->hwdev,lower_32_bits (dma_addr), ptr); +malidp_hw_write (mp->hwdev,upper_32_bits (dma_addr), ptr +4 ); }static void malidp_de_set_plane_afbc (struct drm_plane *plane)
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c +1 -1
@@ -187,7 +187,7 @@ static void aspeed_gfx_pipe_update(struct drm_simple_display_pipe *pipe, gem =drm_fb_dma_get_gem_obj (fb,0 );if (!gem)return ; -writel (gem->paddr, priv->base +CRT_ADDR ); +writel (gem->dma_addr, priv->base +CRT_ADDR ); }static int aspeed_gfx_enable_vblank (struct drm_simple_display_pipe *pipe)
drivers/gpu/drm/drm_fb_dma_helper.c +5 -5
@@ -72,7 +72,7 @@ dma_addr_t drm_fb_dma_get_gem_addr(struct drm_framebuffer *fb, unsigned int plane) {struct drm_gem_dma_object *obj; -dma_addr_t paddr; +dma_addr_t dma_addr;u8 h_div =1 , v_div =1 ;u32 block_w =drm_format_info_block_width (fb->format, plane);u32 block_h =drm_format_info_block_height (fb->format, plane);
@@ -86,7 +86,7 @@ dma_addr_t drm_fb_dma_get_gem_addr(struct drm_framebuffer *fb,if (!obj)return 0 ; - paddr = obj->paddr + fb->offsets[plane]; + dma_addr = obj->dma_addr + fb->offsets[plane];if (plane >0 ) { h_div = fb->format->hsub;
@@ -98,10 +98,10 @@ dma_addr_t drm_fb_dma_get_gem_addr(struct drm_framebuffer *fb, block_start_y = (sample_y / block_h) * block_h; num_hblocks = sample_x / block_w; - paddr += fb->pitches[plane] * block_start_y; - paddr += block_size * num_hblocks; + dma_addr += fb->pitches[plane] * block_start_y; + dma_addr += block_size * num_hblocks; -return paddr; +return dma_addr; }EXPORT_SYMBOL_GPL (drm_fb_dma_get_gem_addr);
drivers/gpu/drm/drm_gem_dma_helper.c +13 -10
@@ -135,11 +135,12 @@ struct drm_gem_dma_object *drm_gem_dma_create(struct drm_device *drm,if (dma_obj->map_noncoherent) { dma_obj->vaddr =dma_alloc_noncoherent (drm->dev, size, - &dma_obj->paddr, + &dma_obj->dma_addr,DMA_TO_DEVICE ,GFP_KERNEL | __GFP_NOWARN); }else { - dma_obj->vaddr =dma_alloc_wc (drm->dev, size, &dma_obj->paddr, + dma_obj->vaddr =dma_alloc_wc (drm->dev, size, + &dma_obj->dma_addr,GFP_KERNEL | __GFP_NOWARN); }if (!dma_obj->vaddr) {
@@ -221,11 +222,11 @@ void drm_gem_dma_free(struct drm_gem_dma_object *dma_obj) }else if (dma_obj->vaddr) {if (dma_obj->map_noncoherent)dma_free_noncoherent (gem_obj->dev->dev, dma_obj->base.size, - dma_obj->vaddr, dma_obj->paddr, + dma_obj->vaddr, dma_obj->dma_addr,DMA_TO_DEVICE );else dma_free_wc (gem_obj->dev->dev, dma_obj->base.size, - dma_obj->vaddr, dma_obj->paddr); + dma_obj->vaddr, dma_obj->dma_addr); }drm_gem_object_release (gem_obj);
@@ -383,12 +384,12 @@ EXPORT_SYMBOL_GPL(drm_gem_dma_get_unmapped_area);* @p: DRM printer * @indent: Tab indentation level * -* This function prints paddr and vaddr for use in e.g. debugfs output. +* This function prints dma_addr and vaddr for use in e.g. debugfs output. */ void drm_gem_dma_print_info (const struct drm_gem_dma_object *dma_obj,struct drm_printer *p,unsigned int indent) { -drm_printf_indent (p, indent,"paddr=%pad\n" , &dma_obj->paddr); +drm_printf_indent (p, indent,"dma_addr=%pad\n" , &dma_obj->dma_addr);drm_printf_indent (p, indent,"vaddr=%p\n" , dma_obj->vaddr); }EXPORT_SYMBOL (drm_gem_dma_print_info);
@@ -415,7 +416,7 @@ struct sg_table *drm_gem_dma_get_sg_table(struct drm_gem_dma_object *dma_obj)return ERR_PTR (-ENOMEM ); ret =dma_get_sgtable (obj->dev->dev, sgt, dma_obj->vaddr, - dma_obj->paddr, obj->size); + dma_obj->dma_addr, obj->size);if (ret <0 ) goto out;
@@ -460,10 +461,11 @@ drm_gem_dma_prime_import_sg_table(struct drm_device *dev,if (IS_ERR (dma_obj))return ERR_CAST (dma_obj); - dma_obj->paddr =sg_dma_address (sgt->sgl); + dma_obj->dma_addr =sg_dma_address (sgt->sgl); dma_obj->sgt = sgt; -DRM_DEBUG_PRIME ("dma_addr = %pad, size = %zu\n" , &dma_obj->paddr, attach->dmabuf->size); +DRM_DEBUG_PRIME ("dma_addr = %pad, size = %zu\n" , &dma_obj->dma_addr, + attach->dmabuf->size);return &dma_obj->base; }
@@ -526,7 +528,8 @@ int drm_gem_dma_mmap(struct drm_gem_dma_object *dma_obj, struct vm_area_struct * virt_to_page(dma_obj->vaddr)); }else { ret =dma_mmap_wc (dma_obj->base.dev->dev, vma, dma_obj->vaddr, - dma_obj->paddr, vma->vm_end - vma->vm_start); + dma_obj->dma_addr, + vma->vm_end - vma->vm_start); }if (ret)drm_gem_vm_close (vma);
drivers/gpu/drm/imx/ipuv3-plane.c +3 -3
@@ -131,7 +131,7 @@ drm_plane_state_to_eba(struct drm_plane_state *state, int plane) dma_obj =drm_fb_dma_get_gem_obj (fb, plane);BUG_ON (!dma_obj); -return dma_obj->paddr + fb->offsets[plane] + fb->pitches[plane] * y + +return dma_obj->dma_addr + fb->offsets[plane] + fb->pitches[plane] * y + fb->format->cpp[plane] * x; }
@@ -150,7 +150,7 @@ drm_plane_state_to_ubo(struct drm_plane_state *state) x /= fb->format->hsub; y /= fb->format->vsub; -return dma_obj->paddr + fb->offsets[1 ] + fb->pitches[1 ] * y + +return dma_obj->dma_addr + fb->offsets[1 ] + fb->pitches[1 ] * y + fb->format->cpp[1 ] * x - eba; }
@@ -169,7 +169,7 @@ drm_plane_state_to_vbo(struct drm_plane_state *state) x /= fb->format->hsub; y /= fb->format->vsub; -return dma_obj->paddr + fb->offsets[2 ] + fb->pitches[2 ] * y + +return dma_obj->dma_addr + fb->offsets[2 ] + fb->pitches[2 ] * y + fb->format->cpp[2 ] * x - eba; }
drivers/gpu/drm/sprd/sprd_dpu.c +1 -1
@@ -340,7 +340,7 @@ static void sprd_dpu_layer(struct sprd_dpu *dpu, struct drm_plane_state *state)for (i =0 ; i < fb->format->num_planes; i++) { dma_obj =drm_fb_dma_get_gem_obj (fb, i); - addr = dma_obj->paddr + fb->offsets[i]; + addr = dma_obj->dma_addr + fb->offsets[i];if (i ==0 )layer_reg_wr (ctx,REG_LAY_BASE_ADDR0 , addr, index);
drivers/gpu/drm/sun4i/sun8i_ui_layer.c +7 -7
@@ -192,7 +192,7 @@ static int sun8i_ui_layer_update_buffer(struct sun8i_mixer *mixer, int channel,struct drm_plane_state *state = plane->state;struct drm_framebuffer *fb = state->fb;struct drm_gem_dma_object *gem; -dma_addr_t paddr; +dma_addr_t dma_addr;u32 ch_base;int bpp;
@@ -201,15 +201,15 @@ static int sun8i_ui_layer_update_buffer(struct sun8i_mixer *mixer, int channel,/* Get the physical address of the buffer in memory */ gem =drm_fb_dma_get_gem_obj (fb,0 ); -DRM_DEBUG_DRIVER ("Using GEM @ %pad\n" , &gem->paddr); +DRM_DEBUG_DRIVER ("Using GEM @ %pad\n" , &gem->dma_addr);/* Compute the start of the displayed memory */ bpp = fb->format->cpp[0 ]; - paddr = gem->paddr + fb->offsets[0 ]; + dma_addr = gem->dma_addr + fb->offsets[0 ];/* Fixup framebuffer address for src coordinates */ - paddr += (state->src.x1 >>16 ) * bpp; - paddr += (state->src.y1 >>16 ) * fb->pitches[0 ]; + dma_addr += (state->src.x1 >>16 ) * bpp; + dma_addr += (state->src.y1 >>16 ) * fb->pitches[0 ];/* Set the line width */ DRM_DEBUG_DRIVER ("Layer line width: %d bytes\n" , fb->pitches[0 ]);
@@ -217,11 +217,11 @@ static int sun8i_ui_layer_update_buffer(struct sun8i_mixer *mixer, int channel,SUN8I_MIXER_CHAN_UI_LAYER_PITCH (ch_base, overlay), fb->pitches[0]); -DRM_DEBUG_DRIVER ("Setting buffer address to %pad\n" , &paddr); +DRM_DEBUG_DRIVER ("Setting buffer address to %pad\n" , &dma_addr);regmap_write (mixer->engine.regs,SUN8I_MIXER_CHAN_UI_LAYER_TOP_LADDR (ch_base, overlay), -lower_32_bits (paddr)); +lower_32_bits (dma_addr));return 0 ; }
drivers/gpu/drm/sun4i/sun8i_vi_layer.c +7 -7
@@ -309,7 +309,7 @@ static int sun8i_vi_layer_update_buffer(struct sun8i_mixer *mixer, int channel,const struct drm_format_info *format = fb->format;struct drm_gem_dma_object *gem;u32 dx, dy, src_x, src_y; -dma_addr_t paddr; +dma_addr_t dma_addr;u32 ch_base;int i;
@@ -323,10 +323,10 @@ static int sun8i_vi_layer_update_buffer(struct sun8i_mixer *mixer, int channel,/* Get the physical address of the buffer in memory */ gem =drm_fb_dma_get_gem_obj (fb, i); -DRM_DEBUG_DRIVER ("Using GEM @ %pad\n" , &gem->paddr); +DRM_DEBUG_DRIVER ("Using GEM @ %pad\n" , &gem->dma_addr);/* Compute the start of the displayed memory */ - paddr = gem->paddr + fb->offsets[i]; + dma_addr = gem->dma_addr + fb->offsets[i]; dx = src_x; dy = src_y;
@@ -337,8 +337,8 @@ static int sun8i_vi_layer_update_buffer(struct sun8i_mixer *mixer, int channel, }/* Fixup framebuffer address for src coordinates */ - paddr += dx * format->cpp[i]; - paddr += dy * fb->pitches[i]; + dma_addr += dx * format->cpp[i]; + dma_addr += dy * fb->pitches[i];/* Set the line width */ DRM_DEBUG_DRIVER("Layer %d. line width: %d bytes\n",
@@ -349,12 +349,12 @@ static int sun8i_vi_layer_update_buffer(struct sun8i_mixer *mixer, int channel, fb->pitches[i]);DRM_DEBUG_DRIVER ("Setting %d. buffer address to %pad\n" , - i +1 , &paddr); + i +1 , &dma_addr);regmap_write (mixer->engine.regs,SUN8I_MIXER_CHAN_VI_LAYER_TOP_LADDR (ch_base, overlay, i), -lower_32_bits (paddr)); +lower_32_bits (dma_addr)); }return 0 ;
drivers/gpu/drm/tidss/tidss_dispc.c +8 -8
@@ -1951,7 +1951,7 @@ int dispc_plane_check(struct dispc_device *dispc, u32 hw_plane, }static -dma_addr_t dispc_plane_state_paddr (const struct drm_plane_state *state) +dma_addr_t dispc_plane_state_dma_addr (const struct drm_plane_state *state) {struct drm_framebuffer *fb = state->fb;struct drm_gem_dma_object *gem;
@@ -1960,7 +1960,7 @@ dma_addr_t dispc_plane_state_paddr(const struct drm_plane_state *state) gem =drm_fb_dma_get_gem_obj (state->fb,0 ); -return gem->paddr + fb->offsets[0 ] + x * fb->format->cpp[0 ] + +return gem->dma_addr + fb->offsets[0 ] + x * fb->format->cpp[0 ] + y * fb->pitches[0 ]; }
@@ -1977,7 +1977,7 @@ dma_addr_t dispc_plane_state_p_uv_addr(const struct drm_plane_state *state) gem =drm_fb_dma_get_gem_obj (fb,1 ); -return gem->paddr + fb->offsets[1 ] + +return gem->dma_addr + fb->offsets[1 ] + (x * fb->format->cpp[1 ] / fb->format->hsub) + (y * fb->pitches[1 ] / fb->format->vsub); }
@@ -1990,17 +1990,17 @@ int dispc_plane_setup(struct dispc_device *dispc, u32 hw_plane,u32 fourcc = state->fb->format->format;u16 cpp = state->fb->format->cpp[0 ];u32 fb_width = state->fb->pitches[0 ] / cpp; -dma_addr_t paddr =dispc_plane_state_paddr (state); +dma_addr_t dma_addr =dispc_plane_state_dma_addr (state);struct dispc_scaling_params scale;dispc_vid_calc_scaling (dispc, state, &scale, lite);dispc_plane_set_pixel_format (dispc, hw_plane, fourcc); -dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_0 , paddr &0xffffffff ); -dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_EXT_0 , (u64 )paddr >>32 ); -dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_1 , paddr &0xffffffff ); -dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_EXT_1 , (u64 )paddr >>32 ); +dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_0 , dma_addr &0xffffffff ); +dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_EXT_0 , (u64 )dma_addr >>32 ); +dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_1 , dma_addr &0xffffffff ); +dispc_vid_write (dispc, hw_plane,DISPC_VID_BA_EXT_1 , (u64 )dma_addr >>32 );dispc_vid_write (dispc, hw_plane,DISPC_VID_PICTURE_SIZE , (scale.in_w -1 ) | ((scale.in_h -1 ) <<16 ));
drivers/gpu/drm/tiny/arcpgu.c +1 -1
@@ -225,7 +225,7 @@ static void arc_pgu_update(struct drm_simple_display_pipe *pipe, arcpgu =pipe_to_arcpgu_priv (pipe); gem =drm_fb_dma_get_gem_obj (pipe->plane.state->fb,0 ); -arc_pgu_write (arcpgu,ARCPGU_REG_BUF0_ADDR , gem->paddr); +arc_pgu_write (arcpgu,ARCPGU_REG_BUF0_ADDR , gem->dma_addr); }static const struct drm_simple_display_pipe_funcs arc_pgu_pipe_funcs = {
drivers/gpu/drm/vc4/vc4_bo.c +1 -1
@@ -301,7 +301,7 @@ static void vc4_bo_purge(struct drm_gem_object *obj)drm_vma_node_unmap (&obj->vma_node, dev->anon_inode->i_mapping); -dma_free_wc (dev->dev, obj->size, bo->base.vaddr, bo->base.paddr); +dma_free_wc (dev->dev, obj->size, bo->base.vaddr, bo->base.dma_addr); bo->base.vaddr =NULL ; bo->madv = __VC4_MADV_PURGED; }
drivers/gpu/drm/vc4/vc4_gem.c +4 -4
@@ -126,7 +126,7 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, goto err_delete_handle; } bo_state[i].handle = handle; - bo_state[i].paddr = vc4_bo->base.paddr; + bo_state[i].paddr = vc4_bo->base.dma_addr; bo_state[i].size = vc4_bo->base.base.size; }
@@ -917,16 +917,16 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec)list_add_tail (&to_vc4_bo (&exec->exec_bo->base)->unref_head, &exec->unref_list); - exec->ct0ca = exec->exec_bo->paddr + bin_offset; + exec->ct0ca = exec->exec_bo->dma_addr + bin_offset; exec->bin_u = bin; exec->shader_rec_v = exec->exec_bo->vaddr + shader_rec_offset; - exec->shader_rec_p = exec->exec_bo->paddr + shader_rec_offset; + exec->shader_rec_p = exec->exec_bo->dma_addr + shader_rec_offset; exec->shader_rec_size = args->shader_rec_size; exec->uniforms_v = exec->exec_bo->vaddr + uniforms_offset; - exec->uniforms_p = exec->exec_bo->paddr + uniforms_offset; + exec->uniforms_p = exec->exec_bo->dma_addr + uniforms_offset; exec->uniforms_size = args->uniforms_size; ret = vc4_validate_bin_cl(dev,
drivers/gpu/drm/vc4/vc4_irq.c +1 -1
@@ -105,7 +105,7 @@ vc4_overflow_mem_work(struct work_struct *work) } vc4->bin_alloc_overflow =BIT (bin_bo_slot); -V3D_WRITE (V3D_BPOA , bo->base.paddr + bin_bo_slot * vc4->bin_alloc_size); +V3D_WRITE (V3D_BPOA , bo->base.dma_addr + bin_bo_slot * vc4->bin_alloc_size);V3D_WRITE (V3D_BPOS , bo->base.base.size);V3D_WRITE (V3D_INTCTL ,V3D_INT_OUTOMEM );V3D_WRITE (V3D_INTENA ,V3D_INT_OUTOMEM );
drivers/gpu/drm/vc4/vc4_plane.c +2 -2
@@ -359,7 +359,7 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)return ret;for (i =0 ; i < num_planes; i++) - vc4_state->offsets[i] = bo->paddr + fb->offsets[i]; + vc4_state->offsets[i] = bo->dma_addr + fb->offsets[i];/* We don't support subpixel source positioning for scaling. */ if ((state->src.x1 & subpixel_src_mask) ||
@@ -1221,7 +1221,7 @@ void vc4_plane_async_set_fb(struct drm_plane *plane, struct drm_framebuffer *fb)* because this is only called on the primary plane. */ WARN_ON_ONCE (plane->state->crtc_x <0 || plane->state->crtc_y <0 ); - addr = bo->paddr + fb->offsets[0 ]; + addr = bo->dma_addr + fb->offsets[0 ];/* Write the new address into the hardware immediately. The * scanout will start from this address as soon as the FIFO
drivers/gpu/drm/vc4/vc4_render_cl.c +7 -7
@@ -101,7 +101,7 @@ static uint32_t vc4_full_res_offset(struct vc4_exec_info *exec,struct drm_vc4_submit_rcl_surface *surf, uint8_t x, uint8_t y) { - return bo->paddr + surf->offset + VC4_TILE_BUFFER_SIZE * + return bo->dma_addr + surf->offset + VC4_TILE_BUFFER_SIZE * (DIV_ROUND_UP(exec->args->width, 32) * y + x); }
@@ -142,7 +142,7 @@ static void emit_tile(struct vc4_exec_info *exec, }else {rcl_u8 (setup,VC4_PACKET_LOAD_TILE_BUFFER_GENERAL );rcl_u16 (setup, args->color_read.bits); -rcl_u32 (setup, setup->color_read->paddr + +rcl_u32 (setup, setup->color_read->dma_addr + args->color_read.offset); } }
@@ -164,7 +164,7 @@ static void emit_tile(struct vc4_exec_info *exec, }else {rcl_u8 (setup,VC4_PACKET_LOAD_TILE_BUFFER_GENERAL );rcl_u16 (setup, args->zs_read.bits); -rcl_u32 (setup, setup->zs_read->paddr + +rcl_u32 (setup, setup->zs_read->dma_addr + args->zs_read.offset); } }
@@ -232,7 +232,7 @@ static void emit_tile(struct vc4_exec_info *exec, (last_tile_write ? 0 : VC4_STORE_TILE_BUFFER_DISABLE_COLOR_CLEAR));rcl_u32 (setup, - (setup->zs_write->paddr + args->zs_write.offset) | + (setup->zs_write->dma_addr + args->zs_write.offset) | ((last && last_tile_write) ?VC4_LOADSTORE_TILE_BUFFER_EOF :0 )); }
@@ -355,7 +355,7 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec,rcl_u8 (setup,VC4_PACKET_TILE_RENDERING_MODE_CONFIG );rcl_u32 (setup, - (setup->color_write ? (setup->color_write->paddr + + (setup->color_write ? (setup->color_write->dma_addr + args->color_write.offset) :0 ));rcl_u16 (setup, args->width);
@@ -374,8 +374,8 @@ static int vc4_create_rcl_bo(struct drm_device *dev, struct vc4_exec_info *exec, }BUG_ON (setup->next_offset != size); - exec->ct1ca = setup->rcl->paddr; - exec->ct1ea = setup->rcl->paddr + setup->next_offset; + exec->ct1ca = setup->rcl->dma_addr; + exec->ct1ea = setup->rcl->dma_addr + setup->next_offset;return 0 ; }
drivers/gpu/drm/vc4/vc4_txp.c +1 -1
@@ -312,7 +312,7 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn, ctrl |=TXP_ALPHA_INVERT ; gem =drm_fb_dma_get_gem_obj (fb,0 ); -TXP_WRITE (TXP_DST_PTR , gem->paddr + fb->offsets[0 ]); +TXP_WRITE (TXP_DST_PTR , gem->dma_addr + fb->offsets[0 ]);TXP_WRITE (TXP_DST_PITCH , fb->pitches[0 ]); TXP_WRITE(TXP_DIM, VC4_SET_FIELD(mode->hdisplay, TXP_WIDTH) |
drivers/gpu/drm/vc4/vc4_v3d.c +2 -2
@@ -268,8 +268,8 @@ static int bin_bo_alloc(struct vc4_dev *vc4) }/* Check if this BO won't trigger the addressing bug. */ -if ((bo->base.paddr &0xf0000000 ) == - ((bo->base.paddr + bo->base.base.size -1 ) &0xf0000000 )) { +if ((bo->base.dma_addr &0xf0000000 ) == + ((bo->base.dma_addr + bo->base.base.size -1 ) &0xf0000000 )) { vc4->bin_bo = bo;/* Set up for allocating 512KB chunks of
drivers/gpu/drm/vc4/vc4_validate.c +6 -6
@@ -294,7 +294,7 @@ validate_indexed_prim_list(VALIDATE_ARGS)return -EINVAL ; } - *(uint32_t *)(validated +5 ) = ib->paddr + offset; + *(uint32_t *)(validated +5 ) = ib->dma_addr + offset;return 0 ; }
@@ -400,7 +400,7 @@ validate_tile_binning_config(VALIDATE_ARGS)* free when the job completes rendering. */ exec->bin_slots |=BIT (bin_slot); - bin_addr = vc4->bin_bo->base.paddr + bin_slot * vc4->bin_alloc_size; + bin_addr = vc4->bin_bo->base.dma_addr + bin_slot * vc4->bin_alloc_size;/* The tile state data array is 48 bytes per tile, and we put it at * the start of a BO containing both it and the tile alloc.
@@ -608,7 +608,7 @@ reloc_tex(struct vc4_exec_info *exec, "outside of UBO\n"); goto fail; } - *validated_p0 = tex->paddr + p0; + *validated_p0 = tex->dma_addr + p0;return true; }
@@ -736,7 +736,7 @@ reloc_tex(struct vc4_exec_info *exec, offset -= level_size; } - *validated_p0 = tex->paddr + p0; + *validated_p0 = tex->dma_addr + p0;if (is_cs) { exec->bin_dep_seqno = max(exec->bin_dep_seqno,
@@ -840,7 +840,7 @@ validate_gl_shader_rec(struct drm_device *dev,void *uniform_data_u;uint32_t tex, uni; - *(uint32_t *)(pkt_v + o) = bo[i]->paddr + src_offset; + *(uint32_t *)(pkt_v + o) = bo[i]->dma_addr + src_offset;if (src_offset !=0 ) { DRM_DEBUG("Shaders must be at offset 0 of "
@@ -928,7 +928,7 @@ validate_gl_shader_rec(struct drm_device *dev, } } - *(uint32_t *)(pkt_v + o) = vbo->paddr + offset; + *(uint32_t *)(pkt_v + o) = vbo->dma_addr + offset; }return 0 ;
include/drm/drm_gem_dma_helper.h +2 -2
@@ -11,7 +11,7 @@ struct drm_mode_create_dumb;/** * struct drm_gem_dma_object - GEM object backed by DMA memory allocations * @base: base GEM object -* @paddr: DMA address of the backing memory +* @dma_addr: DMA address of the backing memory * @sgt: scatter/gather table for imported PRIME buffers. The table can have * more than one entry but they are guaranteed to have contiguous * DMA addresses.
@@ -20,7 +20,7 @@ struct drm_mode_create_dumb;*/ struct drm_gem_dma_object {struct drm_gem_object base; -dma_addr_t paddr; +dma_addr_t dma_addr;struct sg_table *sgt;/* For objects with DMA memory allocated by GEM DMA */
Signature · 1 line
2.36.1
Re: [PATCH v2 3/4] drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr}
Hi Danilo,
Thank you for the patch.
Quoted 10 lines · Danilo Krummrich
The field paddr of struct
drm_gem_dma_objectholds a DMA address, which might actually be a physical address. However, depending on the platform, it can also be a bus address or a virtual address managed by an IOMMU.Hence, rename the field to
dma_addr, which is more applicable.Since 'paddr' is a very commonly used term and symbol name a simple regex does not do the trick. Instead, users of the struct were fixed up iteratively with a trial and error approach building with
make allyesconfig && make drivers/gpu/drm.
Not for this patch as you've already done the work manually, but can I recommend the excellent coccinelle tool ? Its semantic patches can very easily rename structure members.
Quoted 24 lines
Signed-off-by Danilo Krummrich <[email protected]>--- .../arm/display/komeda/komeda_framebuffer.c | 4 ++-- drivers/gpu/drm/arm/malidp_mw.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 12 +++++----- drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 2 +- drivers/gpu/drm/drm_fb_dma_helper.c | 10 ++++---- drivers/gpu/drm/drm_gem_dma_helper.c | 23 +++++++++++-------- drivers/gpu/drm/imx/ipuv3-plane.c | 6 ++--- drivers/gpu/drm/sprd/sprd_dpu.c | 2 +- drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 14 +++++------ drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 14 +++++------ drivers/gpu/drm/tidss/tidss_dispc.c | 16 ++++++------- drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/vc4/vc4_bo.c | 2 +- drivers/gpu/drm/vc4/vc4_gem.c | 8 +++---- drivers/gpu/drm/vc4/vc4_irq.c | 2 +- drivers/gpu/drm/vc4/vc4_plane.c | 4 ++-- drivers/gpu/drm/vc4/vc4_render_cl.c | 14 +++++------ drivers/gpu/drm/vc4/vc4_txp.c | 2 +- drivers/gpu/drm/vc4/vc4_v3d.c | 4 ++-- drivers/gpu/drm/vc4/vc4_validate.c | 12 +++++----- include/drm/drm_gem_dma_helper.h | 4 ++-- 21 files changed, 81 insertions(+), 78 deletions(-)
[snip]
Quoted 4 lines
drivers/gpu/drm/drm_gem_dma_helper.c +0
-0
[snip]
drivers/gpu/drm/drm_gem_dma_helper.c drm_gem_dma_prime_import_sg_table(struct drm_device *dev, · line 468
Quoted 11 lines
drivers/gpu/drm/drm_gem_dma_helper.c +3
-2@@ -460,10 +461,11 @@ drm_gem_dma_prime_import_sg_table(struct drm_device *dev,if (IS_ERR (dma_obj))return ERR_CAST (dma_obj); - dma_obj->paddr =sg_dma_address (sgt->sgl); + dma_obj->dma_addr =sg_dma_address (sgt->sgl); dma_obj->sgt = sgt; -DRM_DEBUG_PRIME ("dma_addr = %pad, size = %zu\n" , &dma_obj->paddr, attach->dmabuf->size); +DRM_DEBUG_PRIME ("dma_addr = %pad, size = %zu\n" , &dma_obj->dma_addr, + attach->dmabuf->size);
The second line should be aligned left, just right of the opening parenthesis.
Quoted 3 lines
drivers/gpu/drm/drm_gem_dma_helper.c +0
-0return &dma_obj->base; }
[snip]
Signature · 3 lines
Regards, Laurent Pinchart
Re: [PATCH v2 3/4] drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr}
Hi Laurent,
Quoted 11 lines · Laurent Pinchart
Hi Danilo,
Thank you for the patch.
Quoted 6 lines · Danilo Krummrich
The field paddr of struct
drm_gem_dma_objectholds a DMA address, which might actually be a physical address. However, depending on the platform, it can also be a bus address or a virtual address managed by an IOMMU.Hence, rename the field to
dma_addr, which is more applicable.
Quoted 8 lines
Quoted 4 lines
Since 'paddr' is a very commonly used term and symbol name a simple regex does not do the trick. Instead, users of the struct were fixed up iteratively with a trial and error approach building with
make allyesconfig && make drivers/gpu/drm.Not for this patch as you've already done the work manually, but can I recommend the excellent coccinelle tool ? Its semantic patches can very easily rename structure members.
Actually, I should have and I will. It seems like there are a few drivers I missed with that - the ones not using CONFIG_COMPILE_TEST.
Additionally, I will also test cross-compiling for ARM and ARM64.
- Danilo
Quoted 58 lines
Quoted 25 lines
Signed-off-by Danilo Krummrich <[email protected]>--- .../arm/display/komeda/komeda_framebuffer.c | 4 ++-- drivers/gpu/drm/arm/malidp_mw.c | 2 +- drivers/gpu/drm/arm/malidp_planes.c | 12 +++++----- drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 2 +- drivers/gpu/drm/drm_fb_dma_helper.c | 10 ++++---- drivers/gpu/drm/drm_gem_dma_helper.c | 23 +++++++++++-------- drivers/gpu/drm/imx/ipuv3-plane.c | 6 ++--- drivers/gpu/drm/sprd/sprd_dpu.c | 2 +- drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 14 +++++------ drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 14 +++++------ drivers/gpu/drm/tidss/tidss_dispc.c | 16 ++++++------- drivers/gpu/drm/tiny/arcpgu.c | 2 +- drivers/gpu/drm/vc4/vc4_bo.c | 2 +- drivers/gpu/drm/vc4/vc4_gem.c | 8 +++---- drivers/gpu/drm/vc4/vc4_irq.c | 2 +- drivers/gpu/drm/vc4/vc4_plane.c | 4 ++-- drivers/gpu/drm/vc4/vc4_render_cl.c | 14 +++++------ drivers/gpu/drm/vc4/vc4_txp.c | 2 +- drivers/gpu/drm/vc4/vc4_v3d.c | 4 ++-- drivers/gpu/drm/vc4/vc4_validate.c | 12 +++++----- include/drm/drm_gem_dma_helper.h | 4 ++-- 21 files changed, 81 insertions(+), 78 deletions(-)[snip]
Quoted 4 lines
drivers/gpu/drm/drm_gem_dma_helper.c +0
-0[snip]
drivers/gpu/drm/drm_gem_dma_helper.c drm_gem_dma_prime_import_sg_table(struct drm_device *dev, · line 468
Quoted 11 lines
drivers/gpu/drm/drm_gem_dma_helper.c +3
-2@@ -460,10 +461,11 @@ drm_gem_dma_prime_import_sg_table(struct drm_device *dev,if (IS_ERR (dma_obj))return ERR_CAST (dma_obj); - dma_obj->paddr =sg_dma_address (sgt->sgl); + dma_obj->dma_addr =sg_dma_address (sgt->sgl); dma_obj->sgt = sgt; -DRM_DEBUG_PRIME ("dma_addr = %pad, size = %zu\n" , &dma_obj->paddr, attach->dmabuf->size); +DRM_DEBUG_PRIME ("dma_addr = %pad, size = %zu\n" , &dma_obj->dma_addr, + attach->dmabuf->size);The second line should be aligned left, just right of the opening parenthesis.
Reviewed-by Laurent Pinchart <[email protected]>Quoted 3 lines
drivers/gpu/drm/drm_gem_dma_helper.c +0
-0return &dma_obj->base; }[snip]
PATCH v2 4/4 drm/todo: remove task to rename CMA helpers
In reply to Danilo KrummrichBoth, GEM and FB, CMA helpers were renamed to "GEM DMA" and "FB DMA", hence the task can be removed.
--- Documentation/gpu/todo.rst | 13 ------------- 1 file changed, 13 deletions(-)
Documentation/gpu/todo.rst +0 -13
@@ -343,19 +343,6 @@ converted, except for struct drm_driver.gem_prime_mmap. Level: Intermediate -Rename CMA helpers to DMA helpers ---------------------------------- - -CMA (standing for contiguous memory allocator) is really a bit an accident of -what these were used for first, a much better name would be DMA helpers. In the -text these should even be called coherent DMA memory helpers (so maybe CDM, but -no one knows what that means) since underneath they just use dma_alloc_coherent. - -Contact: Laurent Pinchart, Daniel Vetter - -Level: Intermediate (mostly because it is a huge tasks without good partial -milestones, not technically itself that challenging) - connector register/unregister fixes -----------------------------------
Signature · 1 line
2.36.1