diff mbox series

[2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT

Message ID 20220712122347.6781-2-quic_vboma@quicinc.com
State New
Headers show
Series [1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY | expand

Commit Message

Viswanath Boma July 12, 2022, 12:23 p.m. UTC
V4l2 encoder compliance expecting minimum buffers support for the application to allocate
  buffers as per the control support values.

Change-Id: Idb41ff7dce8b8138f28df01d045eae6facf7e93d
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc_ctrls.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Stanimir Varbanov July 25, 2022, 10:37 a.m. UTC | #1
On 7/12/22 15:23, Viswanath Boma wrote:
>   V4l2 encoder compliance expecting minimum buffers support for the application to allocate
>   buffers as per the control support values.

Please start the sentence from the beginning.

> 
> Change-Id: Idb41ff7dce8b8138f28df01d045eae6facf7e93d

No Change-Ids, please.

> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index 37ba7d97f99b2..95fdad160732b 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -355,7 +355,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>  	struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
>  	{ 16000, 34500, 3000 }, 15635,	16450, 10000000, 500 };
>  
> -	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
> +	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 59);
>  	if (ret)
>  		return ret;
>  
> @@ -435,6 +435,9 @@ int venc_ctrl_init(struct venus_inst *inst)
>  		V4L2_MPEG_VIDEO_VP8_PROFILE_3,
>  		0, V4L2_MPEG_VIDEO_VP8_PROFILE_0);
>  
> +	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,

You did not provide a g_ctrl handler for this ?

> +		V4L2_CID_MIN_BUFFERS_FOR_OUTPUT, 4, 11, 1, 4);
> +
>  	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>  		V4L2_CID_MPEG_VIDEO_BITRATE, BITRATE_MIN, BITRATE_MAX,
>  		BITRATE_STEP, BITRATE_DEFAULT);
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index 37ba7d97f99b2..95fdad160732b 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -355,7 +355,7 @@  int venc_ctrl_init(struct venus_inst *inst)
 	struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
 	{ 16000, 34500, 3000 }, 15635,	16450, 10000000, 500 };
 
-	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
+	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 59);
 	if (ret)
 		return ret;
 
@@ -435,6 +435,9 @@  int venc_ctrl_init(struct venus_inst *inst)
 		V4L2_MPEG_VIDEO_VP8_PROFILE_3,
 		0, V4L2_MPEG_VIDEO_VP8_PROFILE_0);
 
+	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
+		V4L2_CID_MIN_BUFFERS_FOR_OUTPUT, 4, 11, 1, 4);
+
 	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
 		V4L2_CID_MPEG_VIDEO_BITRATE, BITRATE_MIN, BITRATE_MAX,
 		BITRATE_STEP, BITRATE_DEFAULT);