summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorFrancois Buergisser <fbuergisser@chromium.org>2019-07-25 10:17:50 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-07-25 11:58:41 -0400
commitc3c3509b86810293df5c524ef61421d8affc8bf0 (patch)
treeadfe157f6ce1111cedacedcf2db5e7b2760da8ab /drivers/staging
parentaa0e9e72733b069a655a3fe9167f69de103830cc (diff)
downloadlinux-c3c3509b86810293df5c524ef61421d8affc8bf0.tar.bz2
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: 775fec69008d3 ("media: add Rockchip VPU JPEG encoder driver") Signed-off-by: Francois Buergisser <fbuergisser@chromium.org> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/hantro/hantro_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
index b71a06e9159e..4eae1dbb1ac8 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -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;