mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user