diff mbox series

drm/rockchip: Set DMA max segment size

Message ID 20240524092400.2019587-1-s.pueschel@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series drm/rockchip: Set DMA max segment size | expand

Commit Message

Sven Püschel May 24, 2024, 9:23 a.m. UTC
From: Michael Tretter <m.tretter@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@pengutronix.de>
Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 39bc27bd688066a63e56f7f64ad34fae03fbe3b8
diff mbox series

Patch

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");