Commit c3c3509b authored by Francois Buergisser's avatar Francois Buergisser Committed by Mauro Carvalho Chehab
Browse files

media: hantro: Set DMA max segment size



The Hantro codec is typically used in platforms with an IOMMU,
so we need to set a proper DMA segment size. Devices without an
IOMMU will still fallback to default 64KiB segments.

Cc: stable@vger.kernel.org
Fixes: 775fec69 ("media: add Rockchip VPU JPEG encoder driver")
Signed-off-by: default avatarFrancois Buergisser <fbuergisser@chromium.org>
Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent aa0e9e72
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -731,6 +731,7 @@ static int hantro_probe(struct platform_device *pdev)
		dev_err(vpu->dev, "Could not set DMA coherent mask.\n");
		return ret;
	}
	vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));

	for (i = 0; i < vpu->variant->num_irqs; i++) {
		const char *irq_name = vpu->variant->irqs[i].name;