Skip to content

Commit 5bcfb6e

Browse files
tomba6by9
authored andcommitted
media: raspberrypi: cfe: Fix mapping of dmabuf buffers
Commit be7de82 upstream 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: 6edb685 ("media: raspberrypi: Add support for RP1-CFE") Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent b08905e commit 5bcfb6e

File tree

1 file changed

+4
-0
lines changed
  • drivers/media/platform/raspberrypi/rp1-cfe

1 file changed

+4
-0
lines changed

drivers/media/platform/raspberrypi/rp1-cfe/cfe.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,6 +2340,10 @@ static int cfe_probe(struct platform_device *pdev)
23402340
goto err_cfe_put;
23412341
}
23422342

2343+
ret = vb2_dma_contig_set_max_seg_size(&pdev->dev, UINT_MAX);
2344+
if (ret)
2345+
goto err_cfe_put;
2346+
23432347
/* TODO: Enable clock only when running. */
23442348
cfe->clk = devm_clk_get(&pdev->dev, NULL);
23452349
if (IS_ERR(cfe->clk)) {

0 commit comments

Comments
 (0)