aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2018-05-15 03:37:07 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-25 15:35:41 -0400
commit72c7caa4864255d1f927fd1ab52122a8dbd30f38 (patch)
tree927ce8d70984413a11320312072ab4722e322910
parentmedia: bdisp: don't use GFP_DMA (diff)
downloadlinux-dev-72c7caa4864255d1f927fd1ab52122a8dbd30f38.tar.xz
linux-dev-72c7caa4864255d1f927fd1ab52122a8dbd30f38.zip
media: st-hva: don't use GFP_DMA
Set the DMA_MASK and stop using the GFP_DMA flag Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--drivers/media/platform/sti/hva/hva-mem.c2
-rw-r--r--drivers/media/platform/sti/hva/hva-v4l2.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/sti/hva/hva-mem.c b/drivers/media/platform/sti/hva/hva-mem.c
index caf50cd4bb77..68047b60b66c 100644
--- a/drivers/media/platform/sti/hva/hva-mem.c
+++ b/drivers/media/platform/sti/hva/hva-mem.c
@@ -22,7 +22,7 @@ int hva_mem_alloc(struct hva_ctx *ctx, u32 size, const char *name,
return -ENOMEM;
}
- base = dma_alloc_attrs(dev, size, &paddr, GFP_KERNEL | GFP_DMA,
+ base = dma_alloc_attrs(dev, size, &paddr, GFP_KERNEL,
DMA_ATTR_WRITE_COMBINE);
if (!base) {
dev_err(dev, "%s %s : dma_alloc_attrs failed for %s (size=%d)\n",
diff --git a/drivers/media/platform/sti/hva/hva-v4l2.c b/drivers/media/platform/sti/hva/hva-v4l2.c
index 2ab0b5cc5c22..15080cb00fa7 100644
--- a/drivers/media/platform/sti/hva/hva-v4l2.c
+++ b/drivers/media/platform/sti/hva/hva-v4l2.c
@@ -1355,6 +1355,10 @@ static int hva_probe(struct platform_device *pdev)
goto err;
}
+ ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
+ if (ret)
+ return ret;
+
hva->dev = dev;
hva->pdev = pdev;
platform_set_drvdata(pdev, hva);