drm: Support CMA per allocation kernel mappings
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | drm/kirin: Use DRM_GEM_CMA_VMAP_DRIVER_OPSdrivers/ | +1 | 0 replies | |
| 2/6 | drm: Introduce DRM_MODE_DUMB_KERNEL_MAP flagdrivers/ drivers/ include/ | +7 | 4 replies | |
| 3/6 | drm/cma-helper: Use the dma_*_attr API variantdrivers/ include/ | +13 | 1 reply | |
| 4/6 | drm/cma-helper: Support DRM_MODE_DUMB_KERNEL_MAP flagdrivers/ drivers/ drivers/ +5 more | +36 | 7 replies | |
| 5/6 | drm/mediatek: Convert to use CMA helpersdrivers/ drivers/ drivers/ +4 more | +15 | 6 replies | |
| 6/6 | drm/rockchip: Convert to use generic fbdev emulationdrivers/ drivers/ drivers/ +6 more | +6 | 0 replies |
Reviews trailers per patch
2 of 6 patches have a Reviewed-by or Acked-by.
| Patch | James Qian Wang (Arm Technology China) | Neil Armstrong | Laurent Pinchart |
|---|---|---|---|
| 1/6 | |||
| 2/6 | |||
| 3/6 | R-b | ||
| 4/6 | R-b | R-b | R-b |
| 5/6 | |||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/6] drm: Support CMA per allocation kernel mappings
This series adds support for CMA/DMA users to skip kernel mappings for GEM allocations. The DMA API only guarantees a kernel mapping at allocation time. Creating mappings with vmap() after allocation may or may not work as not all allocations have a struct page. As virtual memory space is limited on 32-bit systems some drivers will skip kernel mappings when possible. This prevents those drivers from using CMA helpers and the generic fbdev emulation which results in a lot of duplicated code.
In order to distinguish between kernel and userspace allocations, a new flag, DRM_MODE_DUMB_KERNEL_MAP, for drm_mode_create_dumb() is introduced. This allows drivers to override the default behavior for CMA helpers of always creating a kernel mapping.
Mediatek is converted to CMA helpers and Rockchip is converted to generic fbdev support. I also have patches to convert Rockchip to CMA and shmem helpers, but they need a bit more work. Exynos can also probably be converted to use CMA helpers.
Compile tested only. I did test fbdev on Rockchip, but the h/w I have has an IOMMU, so the CMA code path doesn't get tested.
Rob
Rob Herring (6):
drm/kirin: Use DRM_GEM_CMA_VMAP_DRIVER_OPS
drm: Introduce DRM_MODE_DUMB_KERNEL_MAP flag drm/cma-helper: Use the dma_*_attr API variant drm/cma-helper: Support DRM_MODE_DUMB_KERNEL_MAP flag drm/mediatek: Convert to use CMA helpers drm/rockchip: Convert to use generic fbdev emulation
.../gpu/drm/arm/display/komeda/komeda_kms.c | 1 + drivers/gpu/drm/arm/malidp_drv.c | 1 + drivers/gpu/drm/drm_client.c | 1 + drivers/gpu/drm/drm_dumb_buffers.c | 5 +- drivers/gpu/drm/drm_gem_cma_helper.c | 68 +++-- .../gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 11 +- drivers/gpu/drm/mediatek/Makefile | 1 - drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 28 +- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 1 - drivers/gpu/drm/mediatek/mtk_drm_gem.c | 289 ------------------ drivers/gpu/drm/mediatek/mtk_drm_gem.h | 51 ---- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 7 +- drivers/gpu/drm/meson/meson_drv.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_kms.c | 1 + drivers/gpu/drm/rockchip/Makefile | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 10 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 2 - drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 14 - drivers/gpu/drm/rockchip/rockchip_drm_fb.h | 6 - drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 170 ----------- drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h | 24 -- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 6 +- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 4 - drivers/gpu/drm/stm/drv.c | 1 + drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + include/drm/drm_gem_cma_helper.h | 1 + include/uapi/drm/drm_mode.h | 2 + 28 files changed, 78 insertions(+), 632 deletions(-) delete mode 100644 drivers/gpu/drm/mediatek/mtk_drm_gem.c delete mode 100644 drivers/gpu/drm/mediatek/mtk_drm_gem.h delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c delete mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h
--
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel