[PATCH] drm/rockchip: Set DMA max segment size

Sven Püschel s.pueschel at pengutronix.de
Fri May 24 02:23:59 PDT 2024


From: Michael Tretter <m.tretter at pengutronix.de>

There is no reason to limit the DMA max segment size for the Rockchip
VOP and VOP2. Set it to the maximum.

This prevents the following warning when DMA API debugging is enabled
with CONFIG_DMA_API_DEBUG_SG=y:

	DMA-API: rockchip-drm display-subsystem: mapping sg segment longer than device claims to support [len=208896] [max=65536]

Signed-off-by: Michael Tretter <m.tretter at pengutronix.de>
Signed-off-by: Sven Püschel <s.pueschel at pengutronix.de>
---
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index ab55d7132550..0f93efd1a8fa 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -67,6 +67,8 @@ int rockchip_drm_dma_attach_device(struct drm_device *drm_dev,
 		}
 	}
 
+	dma_set_max_seg_size(drm_dev->dev, UINT_MAX);
+
 	ret = iommu_attach_device(private->domain, dev);
 	if (ret) {
 		DRM_DEV_ERROR(dev, "Failed to attach iommu device\n");

base-commit: 39bc27bd688066a63e56f7f64ad34fae03fbe3b8
-- 
2.39.2




More information about the linux-arm-kernel mailing list