mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
media: common: videobuf2: fix cma sg alloc depends on CONFIG_CMA
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Change-Id: I1370bc264f2a673a14562f088cb2abdb13a01b30
This commit is contained in:
@@ -102,7 +102,7 @@ static int vb2_cma_sg_alloc_contiguous(struct vb2_cma_sg_buf *buf)
|
||||
int i;
|
||||
bool cma_en = false;
|
||||
|
||||
if (IS_ENABLED(CONFIG_DMA_CMA)) {
|
||||
if (IS_ENABLED(CONFIG_CMA)) {
|
||||
struct rk_dma_heap *heap = rk_dma_heap_find("rk-dma-heap-cma");
|
||||
|
||||
cma_en = true;
|
||||
@@ -114,7 +114,7 @@ static int vb2_cma_sg_alloc_contiguous(struct vb2_cma_sg_buf *buf)
|
||||
get_order(buf->size), GFP_KERNEL);
|
||||
}
|
||||
if (!page) {
|
||||
pr_err("CONFIG_DMA_CMA en:%d alloc pages fail\n", cma_en);
|
||||
pr_err("%s: cma_en:%d alloc pages fail\n", __func__, cma_en);
|
||||
return -ENOMEM;
|
||||
}
|
||||
for (i = 0; i < buf->num_pages; i++)
|
||||
@@ -125,7 +125,7 @@ static int vb2_cma_sg_alloc_contiguous(struct vb2_cma_sg_buf *buf)
|
||||
|
||||
static void vb2_cma_sg_free_contiguous(struct vb2_cma_sg_buf *buf)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_DMA_CMA)) {
|
||||
if (IS_ENABLED(CONFIG_CMA)) {
|
||||
struct rk_dma_heap *heap = rk_dma_heap_find("rk-dma-heap-cma");
|
||||
|
||||
if (heap)
|
||||
|
||||
Reference in New Issue
Block a user