media: rockchip: vicap allocation buffer determined by Thunderboot's reserved memory

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2d91085c4f4984d3c64d2d8f77120fa88b83248f
This commit is contained in:
Zefa Chen
2022-08-30 15:11:13 +08:00
committed by Tao Huang
parent 4c455b1887
commit 50a172856e
2 changed files with 5 additions and 2 deletions

View File

@@ -3660,7 +3660,7 @@ int rkcif_init_rx_buf(struct rkcif_stream *stream, int buf_num)
else
return -EINVAL;
}
for (i = 0; i < buf_num; i++) {
while (true) {
buf = &stream->rx_buf[i];
memset(buf, 0, sizeof(*buf));
dummy = &buf->dummy;
@@ -3697,6 +3697,9 @@ int rkcif_init_rx_buf(struct rkcif_stream *stream, int buf_num)
rkcif_s_rx_buffer(dev, &buf->dbufs);
stream->buf_num_toisp--;
}
i++;
if (!dev->is_thunderboot && i >= buf_num)
break;
v4l2_dbg(3, rkcif_debug, &dev->v4l2_dev,
"init rx_buf,dma_addr 0x%llx size: 0x%x\n",
(u64)dummy->dma_addr, pixm->plane_fmt[0].sizeimage);

View File

@@ -29,7 +29,7 @@ static inline struct sditf_priv *to_sditf_priv(struct v4l2_subdev *subdev)
return container_of(subdev, struct sditf_priv, sd);
}
void sditf_buffree_work(struct work_struct *work)
static void sditf_buffree_work(struct work_struct *work)
{
struct sditf_work_struct *buffree_work = container_of(work,
struct sditf_work_struct,