summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2024-11-04 09:47:54 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2024-11-07 09:05:58 +0100
commitbe7de823847bd136ff5db095cb9a4283b9630bba (patch)
tree9ff0716febe3298bc009b7a499e8aebcf5c7c3ee
parent1429826883bb18847092b2e04c6598ef34bae1d4 (diff)
media: raspberrypi: cfe: Fix mapping of dmabuf buffers
When using buffers from DRM, DMA-API gives a warning about: "mapping sg segment longer than device claims to support [len=307200] [max=65536]" Add a call to vb2_dma_contig_set_max_seg_size() to tell the DMA-API about the supported segment size (which is UINT_MAX). Fixes: 6edb685abb2a ("media: raspberrypi: Add support for RP1-CFE") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--drivers/media/platform/raspberrypi/rp1-cfe/cfe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c b/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
index 4800d9a2668a..12660087b12f 100644
--- a/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
+++ b/drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
@@ -2340,6 +2340,10 @@ static int cfe_probe(struct platform_device *pdev)
goto err_cfe_put;
}
+ ret = vb2_dma_contig_set_max_seg_size(&pdev->dev, UINT_MAX);
+ if (ret)
+ goto err_cfe_put;
+
/* TODO: Enable clock only when running. */
cfe->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(cfe->clk)) {