Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tomi Valkeinen and committed by
Hans Verkuil
be7de823 14298268

+4
+4
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c
··· 2340 2340 goto err_cfe_put; 2341 2341 } 2342 2342 2343 + ret = vb2_dma_contig_set_max_seg_size(&pdev->dev, UINT_MAX); 2344 + if (ret) 2345 + goto err_cfe_put; 2346 + 2343 2347 /* TODO: Enable clock only when running. */ 2344 2348 cfe->clk = devm_clk_get(&pdev->dev, NULL); 2345 2349 if (IS_ERR(cfe->clk)) {