lkml.org 
[lkml]   [2023]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 15/55] media: amphion: Stop abusing of min_buffers_needed field
    Date
    'min_buffers_needed' is suppose to be used to indicate the number
    of buffers needed by DMA engine to start streaming.
    amphion driver doesn't use DMA engine and just want to specify
    the minimum number of buffers to allocate when calling VIDIOC_REQBUFS.
    That 'min_reqbufs_allocation' field purpose so use it.

    Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
    CC: Ming Qian <ming.qian@nxp.com>
    CC: Zhou Peng <eagle.zhou@nxp.com>
    ---
    drivers/media/platform/amphion/vpu_v4l2.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/media/platform/amphion/vpu_v4l2.c b/drivers/media/platform/amphion/vpu_v4l2.c
    index 87afb4a18d5d..1e4c76032d2b 100644
    --- a/drivers/media/platform/amphion/vpu_v4l2.c
    +++ b/drivers/media/platform/amphion/vpu_v4l2.c
    @@ -649,7 +649,7 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q
    src_vq->mem_ops = &vb2_vmalloc_memops;
    src_vq->drv_priv = inst;
    src_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer);
    - src_vq->min_buffers_needed = 1;
    + src_vq->min_reqbufs_allocation = 1;
    src_vq->dev = inst->vpu->dev;
    src_vq->lock = &inst->lock;
    ret = vb2_queue_init(src_vq);
    @@ -666,7 +666,7 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q
    dst_vq->mem_ops = &vb2_vmalloc_memops;
    dst_vq->drv_priv = inst;
    dst_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer);
    - dst_vq->min_buffers_needed = 1;
    + dst_vq->min_reqbufs_allocation = 1;
    dst_vq->dev = inst->vpu->dev;
    dst_vq->lock = &inst->lock;
    ret = vb2_queue_init(dst_vq);
    --
    2.39.2
    \
     
     \ /
      Last update: 2023-11-27 17:57    [W:4.126 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site