summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2020-03-25 13:15:06 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-14 12:50:44 +0200
commitcd1a746b9b244e39570eb67f9de52c5ae06a136f (patch)
treee1c948e439084672be2e858cbe083d301f975539
parentmedia: ti-vpe: cal: program number of lines properly (diff)
downloadlinux-cd1a746b9b244e39570eb67f9de52c5ae06a136f.tar.xz
linux-cd1a746b9b244e39570eb67f9de52c5ae06a136f.zip
media: ti-vpe: cal: set DMA max seg size
Set DMA max seg size correctly to get rid of warnings on 64 bit platforms: DMA-API: cal 6f03000.cal: mapping sg segment longer than device claims to support [len=720896] [max=65536] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--drivers/media/platform/ti-vpe/cal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index c124f28435d1..67954754ffff 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -2315,6 +2315,8 @@ static int cal_probe(struct platform_device *pdev)
return -ENODEV;
}
+ vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
+
pm_runtime_enable(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
@@ -2329,6 +2331,8 @@ static int cal_probe(struct platform_device *pdev)
return 0;
runtime_disable:
+ vb2_dma_contig_clear_max_seg_size(&pdev->dev);
+
pm_runtime_disable(&pdev->dev);
for (i = 0; i < CAL_NUM_CONTEXT; i++) {
ctx = dev->ctx[i];
@@ -2371,6 +2375,8 @@ static int cal_remove(struct platform_device *pdev)
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
+ vb2_dma_contig_clear_max_seg_size(&pdev->dev);
+
return 0;
}