All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
@ 2022-07-12 12:23 Viswanath Boma
  2022-07-12 12:23 ` [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT Viswanath Boma
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: Viswanath Boma @ 2022-07-12 12:23 UTC (permalink / raw)
  To: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Viswanath Boma

From: Stanimir Varbanov <stanimir.varbanov@linaro.org>

 V4l2 encoder compliance expecting default values of colormetry for the control.

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

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index ea5805e71c143..37ba7d97f99b2 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
 int venc_ctrl_init(struct venus_inst *inst)
 {
 	int ret;
+	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);
 	if (ret)
@@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
 
 	v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
 				   V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
-				   v4l2_ctrl_ptr_create(NULL));
+				   v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
 
 	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
 			  V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
@ 2022-07-12 12:23 ` Viswanath Boma
  2022-07-25 10:37   ` Stanimir Varbanov
  2022-07-12 12:23 ` [PATCH 3/7] venus : CAPTURE Plane width/height alignment with OUT plane Viswanath Boma
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Viswanath Boma @ 2022-07-12 12:23 UTC (permalink / raw)
  To: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Viswanath Boma

  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(-)

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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 3/7] venus : CAPTURE Plane width/height alignment with OUT plane.
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
  2022-07-12 12:23 ` [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT Viswanath Boma
@ 2022-07-12 12:23 ` Viswanath Boma
  2022-07-12 12:23 ` [PATCH 4/7] venus : Addition of EOS Event support for Encoder Viswanath Boma
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Viswanath Boma @ 2022-07-12 12:23 UTC (permalink / raw)
  To: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Viswanath Boma

From: Stanimir Varbanov <stanimir.varbanov@linaro.org>

 V4l2 encoder compliance set-format test cases failing as Capture plane width/height not aligned to OUT plane .

Change-Id: I7318a8a750f720e81b7b51520823b68ff13a2697
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 21bff25e3f814..b56960d7f6c89 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -192,10 +192,8 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
 	pixmp->height = clamp(pixmp->height, frame_height_min(inst),
 			      frame_height_max(inst));
 
-	if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
-		pixmp->width = ALIGN(pixmp->width, 128);
-		pixmp->height = ALIGN(pixmp->height, 32);
-	}
+	pixmp->width = ALIGN(pixmp->width, 128);
+	pixmp->height = ALIGN(pixmp->height, 32);
 
 	pixmp->width = ALIGN(pixmp->width, 2);
 	pixmp->height = ALIGN(pixmp->height, 2);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 4/7] venus : Addition of EOS Event support for Encoder
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
  2022-07-12 12:23 ` [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT Viswanath Boma
  2022-07-12 12:23 ` [PATCH 3/7] venus : CAPTURE Plane width/height alignment with OUT plane Viswanath Boma
@ 2022-07-12 12:23 ` Viswanath Boma
  2022-07-25 10:44   ` Stanimir Varbanov
  2022-07-12 12:23 ` [PATCH 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD Viswanath Boma
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Viswanath Boma @ 2022-07-12 12:23 UTC (permalink / raw)
  To: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Viswanath Boma

 V4l2 encoder compliance expecting End of sream  Event registration  support for Encoder.

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

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index b56960d7f6c89..30ddb84c24997 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -507,6 +507,20 @@ static int venc_enum_frameintervals(struct file *file, void *fh,
 	return 0;
 }
 
+static int venc_subscribe_event(struct v4l2_fh *fh,
+				const struct v4l2_event_subscription *sub)
+{
+
+	switch (sub->type) {
+	case V4L2_EVENT_EOS:
+		return v4l2_event_subscribe(fh, sub, 2, NULL);
+	case V4L2_EVENT_CTRL:
+		return v4l2_ctrl_subscribe_event(fh, sub);
+	default:
+		return -EINVAL;
+	}
+}
+
 static int
 venc_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *cmd)
 {
@@ -572,7 +586,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
 	.vidioc_g_parm = venc_g_parm,
 	.vidioc_enum_framesizes = venc_enum_framesizes,
 	.vidioc_enum_frameintervals = venc_enum_frameintervals,
-	.vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
+	.vidioc_subscribe_event = venc_subscribe_event,
 	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 	.vidioc_encoder_cmd = venc_encoder_cmd,
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
                   ` (2 preceding siblings ...)
  2022-07-12 12:23 ` [PATCH 4/7] venus : Addition of EOS Event support for Encoder Viswanath Boma
@ 2022-07-12 12:23 ` Viswanath Boma
  2022-07-26 10:05   ` Stanimir Varbanov
  2022-07-12 12:23 ` [PATCH 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm Viswanath Boma
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Viswanath Boma @ 2022-07-12 12:23 UTC (permalink / raw)
  To: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Dikshita Agarwal, Viswanath Boma

From: Dikshita Agarwal <dikshita@codeaurora.org>

  v4l2 compliance expecting support for vidioc_try_encoder_cmd
  error details : test VIDIOC_(TRY_)ENCODER_CMD: FAIL

Change-Id: I87a655dc506f3e713e2c86ab5203ca9c45cc5e1b
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 30ddb84c24997..4f10f5de7e3e6 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -589,6 +589,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
 	.vidioc_subscribe_event = venc_subscribe_event,
 	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 	.vidioc_encoder_cmd = venc_encoder_cmd,
+	.vidioc_try_encoder_cmd = v4l2_m2m_ioctl_try_encoder_cmd,
 };
 
 static int venc_pm_get(struct venus_inst *inst)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
                   ` (3 preceding siblings ...)
  2022-07-12 12:23 ` [PATCH 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD Viswanath Boma
@ 2022-07-12 12:23 ` Viswanath Boma
  2022-07-12 12:23 ` [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range Viswanath Boma
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Viswanath Boma @ 2022-07-12 12:23 UTC (permalink / raw)
  To: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Viswanath Boma

 v4l2 compliance expecting settings for out buffer only and the same
 values will be propagated to capture buffer setting by h/w encoder .
 settings on cpature plane are optional , required only if
 offline-encoding supports.

 error details : fail: v4l2-test-formats.cpp(1350): !ret

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

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 4f10f5de7e3e6..420691f71121e 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -390,7 +390,7 @@ static int venc_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
 	struct v4l2_fract *timeperframe = &out->timeperframe;
 	u64 us_per_frame, fps;
 
-	if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
+	if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT &&
 	    a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
 		return -EINVAL;
 
@@ -422,7 +422,7 @@ static int venc_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
 {
 	struct venus_inst *inst = to_inst(file);
 
-	if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
+	if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT &&
 	    a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
 		return -EINVAL;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range  .
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
                   ` (4 preceding siblings ...)
  2022-07-12 12:23 ` [PATCH 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm Viswanath Boma
@ 2022-07-12 12:23 ` Viswanath Boma
  2022-07-25 10:41   ` Stanimir Varbanov
  2022-07-12 12:35 ` [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Manivannan Sadhasivam
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Viswanath Boma @ 2022-07-12 12:23 UTC (permalink / raw)
  To: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Vikash Garodia, Viswanath Boma

From: Vikash Garodia <quic_vgarodia@quicinc.com>

 Control MIN/MAX range defined as 0 to 1 ,as MIN value setting enabled
 for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM .

 error details: fail: v4l2-test-controls.cpp(516): invalid maximum range check

Change-Id: I8db2585d35a72bf238cec4cd8f49661170e98a85
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc_ctrls.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index 95fdad160732b..6dcbd3baa9c86 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -323,19 +323,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
 		if (ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_HIGH &&
 		    ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH)
 			return -EINVAL;
-
-		/*
-		 * In video firmware, 8x8 transform is supported only for
-		 * high profile(HP) and constrained high profile(CHP).
-		 * If client wants to disable 8x8 transform for HP/CHP,
-		 * it is better to set profile as main profile(MP).
-		 * Because there is no difference between HP and MP
-		 * if we disable 8x8 transform for HP.
-		 */
-
-		if (ctrl->val == 0)
-			return -EINVAL;
-
 		ctr->h264_8x8_transform = ctrl->val;
 		break;
 	default:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
                   ` (5 preceding siblings ...)
  2022-07-12 12:23 ` [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range Viswanath Boma
@ 2022-07-12 12:35 ` Manivannan Sadhasivam
  2022-07-18 10:31   ` Viswanath Boma (Temp)
  2022-07-12 13:34 ` Nicolas Dufresne
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Manivannan Sadhasivam @ 2022-07-12 12:35 UTC (permalink / raw)
  To: Viswanath Boma
  Cc: video.upstream.external, Stanimir Varbanov, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel

On Tue, Jul 12, 2022 at 05:53:41PM +0530, Viswanath Boma wrote:
> From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> 
>  V4l2 encoder compliance expecting default values of colormetry for the control.
> 
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58

What does this represent here? I'm pretty sure it is meaningless to the
upstream kernel, so please get rid of it.

> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>

Since Stan is the original author of this and following patches, there
should be a s-o-b tag from him. After that you should add yours
indicating that you are carrying the patches from Stan.

Also, please add a cover letter stating the purpose of this series, how
it is tested, and with any other relevant information.

Thanks,
Mani

> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
>  int venc_ctrl_init(struct venus_inst *inst)
>  {
>  	int ret;
> +	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);
>  	if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>  
>  	v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
>  				   V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> -				   v4l2_ctrl_ptr_create(NULL));
> +				   v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
>  
>  	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>  			  V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
                   ` (6 preceding siblings ...)
  2022-07-12 12:35 ` [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Manivannan Sadhasivam
@ 2022-07-12 13:34 ` Nicolas Dufresne
  2022-07-18 10:35   ` Viswanath Boma (Temp)
  2022-07-25  9:01   ` Stanimir Varbanov
  2022-07-25  9:07 ` Stanimir Varbanov
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
  9 siblings, 2 replies; 26+ messages in thread
From: Nicolas Dufresne @ 2022-07-12 13:34 UTC (permalink / raw)
  To: Viswanath Boma, video.upstream.external, Stanimir Varbanov,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel

Le mardi 12 juillet 2022 à 17:53 +0530, Viswanath Boma a écrit :
> From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> 
>  V4l2 encoder compliance expecting default values of colormetry for the control.

nit: colormetry -> colorimetry

> 
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58
> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
>  int venc_ctrl_init(struct venus_inst *inst)
>  {
>  	int ret;
> +	struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> +	{ 16000, 34500, 3000 }, 15635,	16450, 10000000, 500 };

What is the origin of these values ? Should this be done in the control
framework instead ?

>  
>  	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
>  	if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>  
>  	v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
>  				   V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> -				   v4l2_ctrl_ptr_create(NULL));
> +				   v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
>  
>  	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>  			  V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,


^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
  2022-07-12 12:35 ` [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Manivannan Sadhasivam
@ 2022-07-18 10:31   ` Viswanath Boma (Temp)
  0 siblings, 0 replies; 26+ messages in thread
From: Viswanath Boma (Temp) @ 2022-07-18 10:31 UTC (permalink / raw)
  To: manivannan.sadhasivam, Viswanath Boma (Temp) (QUIC)
  Cc: stanimir.varbanov, Andy Gross, bjorn.andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel



-----Original Message-----
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 
Sent: Tuesday, July 12, 2022 6:05 PM
To: Viswanath Boma (Temp) (QUIC) <quic_vboma@quicinc.com>
Cc: video.upstream.external <video.upstream.external@qti.qualcomm.com>; stanimir.varbanov@linaro.org; Andy Gross <agross@kernel.org>; bjorn.andersson@linaro.org; Mauro Carvalho Chehab <mchehab@kernel.org>; linux-media@vger.kernel.org; linux-arm-msm@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

On Tue, Jul 12, 2022 at 05:53:41PM +0530, Viswanath Boma wrote:
> From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>
>  V4l2 encoder compliance expecting default values of colormetry for the control.
>
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58

What does this represent here? I'm pretty sure it is meaningless to the upstream kernel, so please get rid of it.
[vboma]
Will ensure with next patch set

> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>

Since Stan is the original author of this and following patches, there should be a s-o-b tag from him. After that you should add yours indicating that you are carrying the patches from Stan.

Also, please add a cover letter stating the purpose of this series, how it is tested, and with any other relevant information.

Thanks,
Mani
[vboma]
Will ensure with next patch set
> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c 
> b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = 
> {  int venc_ctrl_init(struct venus_inst *inst)  {
>       int ret;
> +     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);
>       if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>
>       v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
>                                  V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> -                                v4l2_ctrl_ptr_create(NULL));
> +                                v4l2_ctrl_ptr_create((void 
> + *)&p_hdr10_mastering));
>
>       v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>                         V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* RE: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
  2022-07-12 13:34 ` Nicolas Dufresne
@ 2022-07-18 10:35   ` Viswanath Boma (Temp)
  2022-07-25  9:01   ` Stanimir Varbanov
  1 sibling, 0 replies; 26+ messages in thread
From: Viswanath Boma (Temp) @ 2022-07-18 10:35 UTC (permalink / raw)
  To: Nicolas Dufresne, Viswanath Boma (Temp) (QUIC),
	stanimir.varbanov, Andy Gross, bjorn.andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel,
	Stanimir Varbanov (Consultant)



-----Original Message-----
From: Nicolas Dufresne <nicolas@ndufresne.ca> 
Sent: Tuesday, July 12, 2022 7:04 PM
To: Viswanath Boma (Temp) (QUIC) <quic_vboma@quicinc.com>; video.upstream.external <video.upstream.external@qti.qualcomm.com>; stanimir.varbanov@linaro.org; Andy Gross <agross@kernel.org>; bjorn.andersson@linaro.org; Mauro Carvalho Chehab <mchehab@kernel.org>; linux-media@vger.kernel.org; linux-arm-msm@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

Le mardi 12 juillet 2022 à 17:53 +0530, Viswanath Boma a écrit :
> From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>
>  V4l2 encoder compliance expecting default values of colormetry for the control.

nit: colormetry -> colorimetry
[vboma]
Will ensure with next patch set .
>
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58
> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c 
> b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = 
> {  int venc_ctrl_init(struct venus_inst *inst)  {
>       int ret;
> +     struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> +     { 16000, 34500, 3000 }, 15635,  16450, 10000000, 500 };

What is the origin of these values ? Should this be done in the control framework instead ?
[vboma]
Control frame work handling the min/max value that required with the default control object.
As per @Stanimir Varbanov (Consultant)  inputs ,added these values for the default .
HI , @Stanimir Varbanov (Consultant) , could you please share more info as required .

>
>       ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
>       if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>
>       v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
>                                  V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> -                                v4l2_ctrl_ptr_create(NULL));
> +                                v4l2_ctrl_ptr_create((void 
> + *)&p_hdr10_mastering));
>
>       v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>                         V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
  2022-07-12 13:34 ` Nicolas Dufresne
  2022-07-18 10:35   ` Viswanath Boma (Temp)
@ 2022-07-25  9:01   ` Stanimir Varbanov
  1 sibling, 0 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2022-07-25  9:01 UTC (permalink / raw)
  To: Nicolas Dufresne, Viswanath Boma, Stanimir Varbanov,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel,
	Hans Verkuil



On 7/12/22 16:34, Nicolas Dufresne wrote:
> Le mardi 12 juillet 2022 à 17:53 +0530, Viswanath Boma a écrit :
>> From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>>
>>  V4l2 encoder compliance expecting default values of colormetry for the control.
> 
> nit: colormetry -> colorimetry
> 
>>
>> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58
>> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
>> ---
>>  drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
>> index ea5805e71c143..37ba7d97f99b2 100644
>> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
>> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
>> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
>>  int venc_ctrl_init(struct venus_inst *inst)
>>  {
>>  	int ret;
>> +	struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
>> +	{ 16000, 34500, 3000 }, 15635,	16450, 10000000, 500 };
> 
> What is the origin of these values ? Should this be done in the control
> framework instead ?

We needed some safe default values to satisfy v4l2 control. I took the
values from here [1].

I'm not sure do we need them in v4l2 control core (most probably it is a
good to have it), Hans ?

> 
>>  
>>  	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
>>  	if (ret)
>> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>>  
>>  	v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
>>  				   V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
>> -				   v4l2_ctrl_ptr_create(NULL));
>> +				   v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
>>  
>>  	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>>  			  V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
> 

-- 
regards,
Stan

[1] https://www.elecard.com/page/article_hdr


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
                   ` (7 preceding siblings ...)
  2022-07-12 13:34 ` Nicolas Dufresne
@ 2022-07-25  9:07 ` Stanimir Varbanov
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
  9 siblings, 0 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2022-07-25  9:07 UTC (permalink / raw)
  To: Viswanath Boma, video.upstream.external, Stanimir Varbanov,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel

Hi Viswanath,

On 7/12/22 15:23, Viswanath Boma wrote:
> From: Stanimir Varbanov <stanimir.varbanov@linaro.org>

In fact this comes from you, please drop 'From'.

> 
>  V4l2 encoder compliance expecting default values of colormetry for the control.
> 
> Change-Id: I1db0d4940b54e033d646ce39d60dc488afba8d58

Drop this.

> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index ea5805e71c143..37ba7d97f99b2 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -352,6 +352,8 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
>  int venc_ctrl_init(struct venus_inst *inst)
>  {
>  	int ret;
> +	struct v4l2_ctrl_hdr10_mastering_display p_hdr10_mastering = { {34000, 13250, 7500 },
> +	{ 16000, 34500, 3000 }, 15635,	16450, 10000000, 500 };

Please do this with proper indentation.

>  
>  	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 58);
>  	if (ret)
> @@ -580,7 +582,7 @@ int venc_ctrl_init(struct venus_inst *inst)
>  
>  	v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
>  				   V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
> -				   v4l2_ctrl_ptr_create(NULL));
> +				   v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));

I think you do not need to cast to (void *).

>  
>  	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
>  			  V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT
  2022-07-12 12:23 ` [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT Viswanath Boma
@ 2022-07-25 10:37   ` Stanimir Varbanov
  0 siblings, 0 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2022-07-25 10:37 UTC (permalink / raw)
  To: Viswanath Boma, video.upstream.external, Stanimir Varbanov,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel



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);

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range .
  2022-07-12 12:23 ` [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range Viswanath Boma
@ 2022-07-25 10:41   ` Stanimir Varbanov
  0 siblings, 0 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2022-07-25 10:41 UTC (permalink / raw)
  To: Viswanath Boma, video.upstream.external, Stanimir Varbanov,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Vikash Garodia



On 7/12/22 15:23, Viswanath Boma wrote:
> From: Vikash Garodia <quic_vgarodia@quicinc.com>
> 
>  Control MIN/MAX range defined as 0 to 1 ,as MIN value setting enabled
>  for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM .
> 
>  error details: fail: v4l2-test-controls.cpp(516): invalid maximum range check
> 
> Change-Id: I8db2585d35a72bf238cec4cd8f49661170e98a85
> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc_ctrls.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
> index 95fdad160732b..6dcbd3baa9c86 100644
> --- a/drivers/media/platform/qcom/venus/venc_ctrls.c
> +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
> @@ -323,19 +323,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
>  		if (ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_HIGH &&
>  		    ctr->profile.h264 != V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH)
>  			return -EINVAL;
> -
> -		/*
> -		 * In video firmware, 8x8 transform is supported only for
> -		 * high profile(HP) and constrained high profile(CHP).
> -		 * If client wants to disable 8x8 transform for HP/CHP,
> -		 * it is better to set profile as main profile(MP).
> -		 * Because there is no difference between HP and MP
> -		 * if we disable 8x8 transform for HP.
> -		 */
> -

Please keep the comment.

> -		if (ctrl->val == 0)
> -			return -EINVAL;
> -
>  		ctr->h264_8x8_transform = ctrl->val;
>  		break;
>  	default:

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 4/7] venus : Addition of EOS Event support for Encoder
  2022-07-12 12:23 ` [PATCH 4/7] venus : Addition of EOS Event support for Encoder Viswanath Boma
@ 2022-07-25 10:44   ` Stanimir Varbanov
  0 siblings, 0 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2022-07-25 10:44 UTC (permalink / raw)
  To: Viswanath Boma, video.upstream.external, Stanimir Varbanov,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel



On 7/12/22 15:23, Viswanath Boma wrote:
>  V4l2 encoder compliance expecting End of sream  Event registration  support for Encoder.

Start sentence from the begging of the line.

> 
> Change-Id: I85f7732a2ec08eba47c0d37181f739e90a7ab63a

No Change-Ids

> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)

With the comments addressed:

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

> 
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index b56960d7f6c89..30ddb84c24997 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -507,6 +507,20 @@ static int venc_enum_frameintervals(struct file *file, void *fh,
>  	return 0;
>  }
>  
> +static int venc_subscribe_event(struct v4l2_fh *fh,
> +				const struct v4l2_event_subscription *sub)
> +{
> +
> +	switch (sub->type) {
> +	case V4L2_EVENT_EOS:
> +		return v4l2_event_subscribe(fh, sub, 2, NULL);
> +	case V4L2_EVENT_CTRL:
> +		return v4l2_ctrl_subscribe_event(fh, sub);
> +	default:
> +		return -EINVAL;
> +	}
> +}
> +
>  static int
>  venc_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *cmd)
>  {
> @@ -572,7 +586,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
>  	.vidioc_g_parm = venc_g_parm,
>  	.vidioc_enum_framesizes = venc_enum_framesizes,
>  	.vidioc_enum_frameintervals = venc_enum_frameintervals,
> -	.vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
> +	.vidioc_subscribe_event = venc_subscribe_event,
>  	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
>  	.vidioc_encoder_cmd = venc_encoder_cmd,
>  };

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD
  2022-07-12 12:23 ` [PATCH 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD Viswanath Boma
@ 2022-07-26 10:05   ` Stanimir Varbanov
  0 siblings, 0 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2022-07-26 10:05 UTC (permalink / raw)
  To: Viswanath Boma, video.upstream.external, Stanimir Varbanov,
	Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab, linux-media,
	linux-arm-msm, linux-kernel
  Cc: Dikshita Agarwal



On 7/12/22 15:23, Viswanath Boma wrote:
> From: Dikshita Agarwal <dikshita@codeaurora.org>
> 
>   v4l2 compliance expecting support for vidioc_try_encoder_cmd
>   error details : test VIDIOC_(TRY_)ENCODER_CMD: FAIL
> 
> Change-Id: I87a655dc506f3e713e2c86ab5203ca9c45cc5e1b

Drop Change-Id and add Dikshita's Signed-off tag.

> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc.c | 1 +
>  1 file changed, 1 insertion(+)

With above comments fixed you can add my:

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

> 
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index 30ddb84c24997..4f10f5de7e3e6 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -589,6 +589,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
>  	.vidioc_subscribe_event = venc_subscribe_event,
>  	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
>  	.vidioc_encoder_cmd = venc_encoder_cmd,
> +	.vidioc_try_encoder_cmd = v4l2_m2m_ioctl_try_encoder_cmd,
>  };
>  
>  static int venc_pm_get(struct venus_inst *inst)

-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH V2 0/7] Fixes for Encoder Compliance issues.
  2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
                   ` (8 preceding siblings ...)
  2022-07-25  9:07 ` Stanimir Varbanov
@ 2022-08-08  9:28 ` quic_vboma
  2022-08-08  9:28   ` [PATCH V2 1/7] venus : Add default values for the control quic_vboma
                     ` (6 more replies)
  9 siblings, 7 replies; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Viswanath Boma

From: Viswanath Boma <quic_vboma@quicinc.com>

Fixes for Video Encoder complaince issues .
Tested on v5.15 kernel and the chrome/client binary details -
				 v4l2-compliance 1.22.1



Dikshita Agarwal (1):
  venus : Addition of support for VIDIOC_TRY_ENCODER_CMD

Stanimir Varbanov (2):
  venus : Add default values for the control
    V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY
  venus : CAPTURE Plane width/height alignment with OUT plane.

Vikash Garodia (1):
  venus : Allow MIN/MAX settings for the v4l2 encoder controls defined
    range.

Viswanath Boma (3):
  venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT
  venus : Addition of EOS Event support for Encoder
  venus : Remove the capture plane settings for venc_g_parm/venc_s_parm

 drivers/media/platform/qcom/venus/venc.c      | 26 ++++++++++----
 .../media/platform/qcom/venus/venc_ctrls.c    | 35 ++++++++++++++++---
 2 files changed, 50 insertions(+), 11 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH V2 1/7] venus : Add default values for the control
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
@ 2022-08-08  9:28   ` quic_vboma
  2022-08-08  9:28   ` [PATCH V2 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT quic_vboma
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Vikash Garodia, Viswanath Boma

From: Stanimir Varbanov <stanimir.varbanov@linaro.org>

V4l2 encoder compliance expecting default values of colorimetry 
for the control.

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc_ctrls.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index ea5805e71c143..aa44c0b3ceb57 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -352,6 +352,10 @@ static const struct v4l2_ctrl_ops venc_ctrl_ops = {
 int venc_ctrl_init(struct venus_inst *inst)
 {
 	int ret;
+	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);
 	if (ret)
@@ -580,7 +584,7 @@ int venc_ctrl_init(struct venus_inst *inst)
 
 	v4l2_ctrl_new_std_compound(&inst->ctrl_handler, &venc_ctrl_ops,
 				   V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY,
-				   v4l2_ctrl_ptr_create(NULL));
+				   v4l2_ctrl_ptr_create((void *)&p_hdr10_mastering));
 
 	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
 			  V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD, 0,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V2 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
  2022-08-08  9:28   ` [PATCH V2 1/7] venus : Add default values for the control quic_vboma
@ 2022-08-08  9:28   ` quic_vboma
  2022-08-08  9:28   ` [PATCH V2 3/7] venus : CAPTURE Plane width/height alignment with OUT plane quic_vboma
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Viswanath Boma, Vikash Garodia

From: Viswanath Boma <quic_vboma@quicinc.com>

V4l2 encoder compliance expecting minimum buffers support for 
the application to allocate buffers as per the control support values.

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
---
 .../media/platform/qcom/venus/venc_ctrls.c    | 27 ++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index aa44c0b3ceb57..b4437cf598ff1 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -8,6 +8,7 @@
 
 #include "core.h"
 #include "venc.h"
+#include "helpers.h"
 
 #define BITRATE_MIN		32000
 #define BITRATE_MAX		160000000
@@ -345,8 +346,29 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
 	return 0;
 }
 
+static int venc_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
+{
+	struct venus_inst *inst = ctrl_to_inst(ctrl);
+	struct hfi_buffer_requirements bufreq;
+	enum hfi_version ver = inst->core->res->hfi_version;
+	int ret;
+
+	switch (ctrl->id) {
+	case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT:
+		ret = venus_helper_get_bufreq(inst, HFI_BUFFER_INPUT, &bufreq);
+		if (!ret)
+			ctrl->val = HFI_BUFREQ_COUNT_MIN(&bufreq, ver);
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
 static const struct v4l2_ctrl_ops venc_ctrl_ops = {
 	.s_ctrl = venc_op_s_ctrl,
+	.g_volatile_ctrl = venc_op_g_volatile_ctrl,
 };
 
 int venc_ctrl_init(struct venus_inst *inst)
@@ -357,7 +379,7 @@ int venc_ctrl_init(struct venus_inst *inst)
 		{ 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;
 
@@ -437,6 +459,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);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V2 3/7] venus : CAPTURE Plane width/height alignment with OUT plane.
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
  2022-08-08  9:28   ` [PATCH V2 1/7] venus : Add default values for the control quic_vboma
  2022-08-08  9:28   ` [PATCH V2 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT quic_vboma
@ 2022-08-08  9:28   ` quic_vboma
  2022-08-08  9:28   ` [PATCH V2 4/7] venus : Addition of EOS Event support for Encoder quic_vboma
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Viswanath Boma, Vikash Garodia, Dikshita Agarwal

From: Stanimir Varbanov <stanimir.varbanov@linaro.org>

V4l2 encoder compliance set-format test cases failing as Capture plane
width/height not aligned to OUT plane .

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 21bff25e3f814..b56960d7f6c89 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -192,10 +192,8 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
 	pixmp->height = clamp(pixmp->height, frame_height_min(inst),
 			      frame_height_max(inst));
 
-	if (f->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
-		pixmp->width = ALIGN(pixmp->width, 128);
-		pixmp->height = ALIGN(pixmp->height, 32);
-	}
+	pixmp->width = ALIGN(pixmp->width, 128);
+	pixmp->height = ALIGN(pixmp->height, 32);
 
 	pixmp->width = ALIGN(pixmp->width, 2);
 	pixmp->height = ALIGN(pixmp->height, 2);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V2 4/7] venus : Addition of EOS Event support for Encoder
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
                     ` (2 preceding siblings ...)
  2022-08-08  9:28   ` [PATCH V2 3/7] venus : CAPTURE Plane width/height alignment with OUT plane quic_vboma
@ 2022-08-08  9:28   ` quic_vboma
  2022-08-08  9:28   ` [PATCH V2 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD quic_vboma
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Viswanath Boma, Vikash Garodia, Dikshita Agarwal

From: Viswanath Boma <quic_vboma@quicinc.com>

V4l2 encoder compliance expecting End of stream Event registration
support for Encoder.

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
Signed-off-by: Vikash Garodia <vgarodia@qti.qualcomm.com>
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
---
 drivers/media/platform/qcom/venus/venc.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index b56960d7f6c89..17312d316f93d 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -507,6 +507,19 @@ static int venc_enum_frameintervals(struct file *file, void *fh,
 	return 0;
 }
 
+static int venc_subscribe_event(struct v4l2_fh *fh,
+				const struct v4l2_event_subscription *sub)
+{
+	switch (sub->type) {
+	case V4L2_EVENT_EOS:
+		return v4l2_event_subscribe(fh, sub, 2, NULL);
+	case V4L2_EVENT_CTRL:
+		return v4l2_ctrl_subscribe_event(fh, sub);
+	default:
+		return -EINVAL;
+	}
+}
+
 static int
 venc_encoder_cmd(struct file *file, void *fh, struct v4l2_encoder_cmd *cmd)
 {
@@ -572,7 +585,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
 	.vidioc_g_parm = venc_g_parm,
 	.vidioc_enum_framesizes = venc_enum_framesizes,
 	.vidioc_enum_frameintervals = venc_enum_frameintervals,
-	.vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
+	.vidioc_subscribe_event = venc_subscribe_event,
 	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 	.vidioc_encoder_cmd = venc_encoder_cmd,
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V2 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
                     ` (3 preceding siblings ...)
  2022-08-08  9:28   ` [PATCH V2 4/7] venus : Addition of EOS Event support for Encoder quic_vboma
@ 2022-08-08  9:28   ` quic_vboma
  2022-08-08  9:28   ` [PATCH V2 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm quic_vboma
  2022-08-08  9:28   ` [PATCH V2 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range quic_vboma
  6 siblings, 0 replies; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Dikshita Agarwal, Viswanath Boma, Vikash Garodia

From: Dikshita Agarwal <quic_dikshita@quicinc.com>

v4l2 compliance expecting support for vidioc_try_encoder_cmd .

error details : test VIDIOC_(TRY_)ENCODER_CMD: FAIL

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 17312d316f93d..966f41f3603ec 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -588,6 +588,7 @@ static const struct v4l2_ioctl_ops venc_ioctl_ops = {
 	.vidioc_subscribe_event = venc_subscribe_event,
 	.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
 	.vidioc_encoder_cmd = venc_encoder_cmd,
+	.vidioc_try_encoder_cmd = v4l2_m2m_ioctl_try_encoder_cmd,
 };
 
 static int venc_pm_get(struct venus_inst *inst)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V2 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
                     ` (4 preceding siblings ...)
  2022-08-08  9:28   ` [PATCH V2 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD quic_vboma
@ 2022-08-08  9:28   ` quic_vboma
  2022-08-30 13:30     ` Stanimir Varbanov
  2022-08-08  9:28   ` [PATCH V2 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range quic_vboma
  6 siblings, 1 reply; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Viswanath Boma, Vikash Garodia

From: Viswanath Boma <quic_vboma@quicinc.com>

v4l2 compliance expecting settings for out buffer only and the same
values will be propagated to capture buffer setting by h/w encoder .
settings on cpature plane are optional , required only if
offline-encoding supports.

error details : fail: v4l2-test-formats.cpp(1350): !ret

Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 966f41f3603ec..16f0abb0d76c6 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -390,7 +390,7 @@ static int venc_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
 	struct v4l2_fract *timeperframe = &out->timeperframe;
 	u64 us_per_frame, fps;
 
-	if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
+	if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT &&
 	    a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
 		return -EINVAL;
 
@@ -422,7 +422,7 @@ static int venc_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
 {
 	struct venus_inst *inst = to_inst(file);
 
-	if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
+	if (a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT &&
 	    a->type != V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
 		return -EINVAL;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V2 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range.
  2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
                     ` (5 preceding siblings ...)
  2022-08-08  9:28   ` [PATCH V2 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm quic_vboma
@ 2022-08-08  9:28   ` quic_vboma
  6 siblings, 0 replies; 26+ messages in thread
From: quic_vboma @ 2022-08-08  9:28 UTC (permalink / raw)
  To: Stanimir Varbanov, Andy Gross, Bjorn Andersson,
	Mauro Carvalho Chehab, linux-media, linux-arm-msm, linux-kernel
  Cc: Vikash Garodia, Viswanath Boma, Dikshita Agarwal

From: Vikash Garodia <vgarodia@qti.qualcomm.com>

Control MIN/MAX range defined as 0 to 1, as MIN value setting enabled
for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM.

error details: fail: v4l2-test-controls.cpp(516): 
invalid maximum range check

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
Signed-off-by: Vikash Garodia <vgarodia@qti.qualcomm.com>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
---
 drivers/media/platform/qcom/venus/venc_ctrls.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index b4437cf598ff1..e55f7a0b39608 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -334,8 +334,6 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
 		 * if we disable 8x8 transform for HP.
 		 */
 
-		if (ctrl->val == 0)
-			return -EINVAL;
 
 		ctr->h264_8x8_transform = ctrl->val;
 		break;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH V2 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm
  2022-08-08  9:28   ` [PATCH V2 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm quic_vboma
@ 2022-08-30 13:30     ` Stanimir Varbanov
  0 siblings, 0 replies; 26+ messages in thread
From: Stanimir Varbanov @ 2022-08-30 13:30 UTC (permalink / raw)
  To: quic_vboma, Andy Gross, Bjorn Andersson, Mauro Carvalho Chehab,
	linux-media, linux-arm-msm, linux-kernel
  Cc: Vikash Garodia



On 8/8/22 12:28, quic_vboma@quicinc.com wrote:
> From: Viswanath Boma <quic_vboma@quicinc.com>
> 
> v4l2 compliance expecting settings for out buffer only and the same
> values will be propagated to capture buffer setting by h/w encoder .
> settings on cpature plane are optional , required only if
> offline-encoding supports.
> 
> error details : fail: v4l2-test-formats.cpp(1350): !ret
> 
> Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
> Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
> ---
>  drivers/media/platform/qcom/venus/venc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>


-- 
regards,
Stan

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2022-08-30 13:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 12:23 [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Viswanath Boma
2022-07-12 12:23 ` [PATCH 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT Viswanath Boma
2022-07-25 10:37   ` Stanimir Varbanov
2022-07-12 12:23 ` [PATCH 3/7] venus : CAPTURE Plane width/height alignment with OUT plane Viswanath Boma
2022-07-12 12:23 ` [PATCH 4/7] venus : Addition of EOS Event support for Encoder Viswanath Boma
2022-07-25 10:44   ` Stanimir Varbanov
2022-07-12 12:23 ` [PATCH 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD Viswanath Boma
2022-07-26 10:05   ` Stanimir Varbanov
2022-07-12 12:23 ` [PATCH 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm Viswanath Boma
2022-07-12 12:23 ` [PATCH 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range Viswanath Boma
2022-07-25 10:41   ` Stanimir Varbanov
2022-07-12 12:35 ` [PATCH 1/7] venus : Add default values for the control V4L2_CID_COLORIMETRY_HDR10_MASTERING_DISPLAY Manivannan Sadhasivam
2022-07-18 10:31   ` Viswanath Boma (Temp)
2022-07-12 13:34 ` Nicolas Dufresne
2022-07-18 10:35   ` Viswanath Boma (Temp)
2022-07-25  9:01   ` Stanimir Varbanov
2022-07-25  9:07 ` Stanimir Varbanov
2022-08-08  9:28 ` [PATCH V2 0/7] Fixes for Encoder Compliance issues quic_vboma
2022-08-08  9:28   ` [PATCH V2 1/7] venus : Add default values for the control quic_vboma
2022-08-08  9:28   ` [PATCH V2 2/7] venus : Addition of control support - V4L2_CID_MIN_BUFFERS_FOR_OUTPUT quic_vboma
2022-08-08  9:28   ` [PATCH V2 3/7] venus : CAPTURE Plane width/height alignment with OUT plane quic_vboma
2022-08-08  9:28   ` [PATCH V2 4/7] venus : Addition of EOS Event support for Encoder quic_vboma
2022-08-08  9:28   ` [PATCH V2 5/7] venus : Addition of support for VIDIOC_TRY_ENCODER_CMD quic_vboma
2022-08-08  9:28   ` [PATCH V2 6/7] venus : Remove the capture plane settings for venc_g_parm/venc_s_parm quic_vboma
2022-08-30 13:30     ` Stanimir Varbanov
2022-08-08  9:28   ` [PATCH V2 7/7] venus : Allow MIN/MAX settings for the v4l2 encoder controls defined range quic_vboma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.