media: rockchip: ispp: dma buf alloc limit to DMA32

Change-Id: Id0a8cda55bce267ba3a6fd51599b17d7d10dc26e
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
Cai YiWei
2021-04-14 18:37:26 +08:00
committed by Tao Huang
parent 4e6e6bb26a
commit 7889a362bf
3 changed files with 4 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ int rkispp_allow_buffer(struct rkispp_device *dev,
attrs |= DMA_ATTR_FORCE_CONTIGUOUS;
buf->size = PAGE_ALIGN(buf->size);
mem_priv = g_ops->alloc(dev->hw_dev->dev, attrs, buf->size,
DMA_BIDIRECTIONAL, GFP_KERNEL);
DMA_BIDIRECTIONAL, GFP_KERNEL | GFP_DMA32);
if (IS_ERR_OR_NULL(mem_priv)) {
ret = -ENOMEM;
goto err;
@@ -411,7 +411,7 @@ static int rkispp_alloc_page_dummy_buf(struct rkispp_device *dev, u32 size)
struct sg_table *sg = NULL;
int ret = -ENOMEM;
page = alloc_pages(GFP_KERNEL, 0);
page = alloc_pages(GFP_KERNEL | GFP_DMA32, 0);
if (!page)
goto err;

View File

@@ -308,7 +308,7 @@ static int rkispp_stats_init_vb2_queue(struct vb2_queue *q,
q->dev = stats_vdev->dev->hw_dev->dev;
if (stats_vdev->dev->hw_dev->is_dma_contig)
q->dma_attrs = DMA_ATTR_FORCE_CONTIGUOUS;
q->gfp_flags = GFP_DMA32;
return vb2_queue_init(q);
}

View File

@@ -1843,6 +1843,7 @@ static int rkispp_init_vb2_queue(struct vb2_queue *q,
q->allow_cache_hints = 1;
if (stream->isppdev->hw_dev->is_dma_contig)
q->dma_attrs = DMA_ATTR_FORCE_CONTIGUOUS;
q->gfp_flags = GFP_DMA32;
return vb2_queue_init(q);
}