[PATCH v10 32/54] media: mediatek: vcodec: Stop direct calls to queue num_buffers field
Benjamin Gaignard
benjamin.gaignard at collabora.com
Tue Oct 3 01:06:41 PDT 2023
se vb2_get_num_buffers() to avoid using queue num_buffers field directly.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
---
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c
index 04948d3eb011..8c580956b905 100644
--- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c
+++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc.c
@@ -923,7 +923,7 @@ static int vb2ops_venc_start_streaming(struct vb2_queue *q, unsigned int count)
mtk_v4l2_venc_err(ctx, "pm_runtime_put fail %d", pm_ret);
err_start_stream:
- for (i = 0; i < q->num_buffers; ++i) {
+ for (i = 0; i < q->max_num_buffers; ++i) {
struct vb2_buffer *buf = vb2_get_buffer(q, i);
/*
--
2.39.2
More information about the Linux-rockchip
mailing list