]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm: xlnx: zynqmp: Fix max dma segment size
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 15 Jan 2025 09:03:39 +0000 (11:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:13 +0000 (14:39 +0200)
[ Upstream commit 28b529a98525123acd37372a04d21e87ec2edcf7 ]

Fix "mapping sg segment longer than device claims to support" warning by
setting the max segment size.

Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
Tested-by: Sean Anderson <sean.anderson@linux.dev>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250115-xilinx-formats-v2-10-160327ca652a@ideasonboard.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xlnx/zynqmp_dpsub.c

index f5781939de9c357778b36b2592b88df5c91ca38f..a25b22238e3d2f29277b74bc4306e261a58b72d4 100644 (file)
@@ -231,6 +231,8 @@ static int zynqmp_dpsub_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
+       dma_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
+
        /* Try the reserved memory. Proceed if there's none. */
        of_reserved_mem_device_init(&pdev->dev);