mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
media: rockchip: isp: dma buf alloc limit to DMA32
Change-Id: Ibc1f4afc45a031714ee4cabfc70b38f930706d46 Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -853,6 +853,7 @@ static int rkisp_init_vb2_queue(struct vb2_queue *q,
|
||||
q->allow_cache_hints = 1;
|
||||
if (stream->ispdev->hw_dev->is_dma_contig)
|
||||
q->dma_attrs = DMA_ATTR_FORCE_CONTIGUOUS;
|
||||
q->gfp_flags = GFP_DMA32;
|
||||
return vb2_queue_init(q);
|
||||
}
|
||||
|
||||
|
||||
@@ -1972,6 +1972,7 @@ static int rkisp_init_vb2_queue(struct vb2_queue *q,
|
||||
q->bidirectional = 1;
|
||||
if (stream->ispdev->hw_dev->is_dma_contig)
|
||||
q->dma_attrs = DMA_ATTR_FORCE_CONTIGUOUS;
|
||||
q->gfp_flags = GFP_DMA32;
|
||||
return vb2_queue_init(q);
|
||||
}
|
||||
|
||||
|
||||
@@ -1264,6 +1264,7 @@ static int rkisp_init_vb2_queue(struct vb2_queue *q,
|
||||
q->bidirectional = 1;
|
||||
if (stream->ispdev->hw_dev->is_dma_contig)
|
||||
q->dma_attrs = DMA_ATTR_FORCE_CONTIGUOUS;
|
||||
q->gfp_flags = GFP_DMA32;
|
||||
return vb2_queue_init(q);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ int rkisp_alloc_buffer(struct rkisp_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;
|
||||
@@ -209,7 +209,7 @@ static int rkisp_alloc_page_dummy_buf(struct rkisp_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;
|
||||
|
||||
|
||||
@@ -616,7 +616,7 @@ static int rkisp_init_vb2_queue(struct vb2_queue *q,
|
||||
q->dev = stream->ispdev->hw_dev->dev;
|
||||
q->allow_cache_hints = 1;
|
||||
q->bidirectional = 1;
|
||||
|
||||
q->gfp_flags = GFP_DMA32;
|
||||
return vb2_queue_init(q);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user