media: rockchip: fec: Fix incorrect buffer size configuration

Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
Change-Id: Id32343f59b34606ca8c1719d11d77a25f9a97c2a
This commit is contained in:
Xu Hongfei
2025-04-22 11:57:46 +08:00
committed by Tao Huang
parent ab08ebea9b
commit e855636bd4

View File

@@ -102,7 +102,7 @@ static int buf_alloc(struct file *file, struct rkfec_buf *info)
return -ENOMEM;
#if IS_LINUX_VERSION_AT_LEAST_6_1
init_vb2(ofl, buf);
mem = ops->alloc(&buf->vb, hw->dev, info->size);
mem = ops->alloc(&buf->vb, hw->dev, size);
#else
mem = ops->alloc(hw->dev, DMA_ATTR_NO_KERNEL_MAPPING, size,
DMA_BIDIRECTIONAL, GFP_KERNEL | GFP_DMA32);
@@ -141,7 +141,7 @@ static int buf_alloc(struct file *file, struct rkfec_buf *info)
list_add_tail(&buf->list, &ofl->list);
mutex_unlock(&hw->dev_lock);
v4l2_dbg(1, rkfec_debug, &ofl->v4l2_dev, "%s file:%p, fd:%d dbuf:%p size %d\n",
__func__, file, fd, dbuf, info->size);
__func__, file, fd, dbuf, size);
return 0;
err_dmabuf_fd: