diff mbox series

[v4,2/2] venus: venc : Add support for priority ID control.

Message ID 1609738914-22769-3-git-send-email-dikshita@codeaurora.org
State New
Headers show
Series None | expand

Commit Message

Dikshita Agarwal Jan. 4, 2021, 5:41 a.m. UTC
Add support for base layer priority ID control in
encoder.
This is a preparation patch to support v6.

Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
---
 drivers/media/platform/qcom/venus/core.h       | 2 ++
 drivers/media/platform/qcom/venus/venc_ctrls.c | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

Comments

Stanimir Varbanov Jan. 12, 2021, 9:44 a.m. UTC | #1
On 1/4/21 7:41 AM, Dikshita Agarwal wrote:
> Add support for base layer priority ID control in

> encoder.

> This is a preparation patch to support v6.

> 

> Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>

> ---

>  drivers/media/platform/qcom/venus/core.h       | 2 ++

>  drivers/media/platform/qcom/venus/venc_ctrls.c | 9 ++++++++-

>  2 files changed, 10 insertions(+), 1 deletion(-)


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



-- 
regards,
Stan
diff mbox series

Patch

diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index 54c42a3..a346ddc 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -274,6 +274,8 @@  struct venc_controls {
 		u32 hevc;
 		u32 vp9;
 	} level;
+
+	u32 base_priority_id;
 };
 
 struct venus_buffer {
diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c
index 7d010d8..3ead51c 100644
--- a/drivers/media/platform/qcom/venus/venc_ctrls.c
+++ b/drivers/media/platform/qcom/venus/venc_ctrls.c
@@ -294,6 +294,9 @@  static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl)
 			return ret;
 		}
 		break;
+	case V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID:
+		ctr->base_priority_id = ctrl->val;
+		break;
 	default:
 		return -EINVAL;
 	}
@@ -309,7 +312,7 @@  int venc_ctrl_init(struct venus_inst *inst)
 {
 	int ret;
 
-	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 53);
+	ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 54);
 	if (ret)
 		return ret;
 
@@ -523,6 +526,10 @@  int venc_ctrl_init(struct venus_inst *inst)
 			  V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX, 0,
 			  (MAX_LTR_FRAME_COUNT - 1), 1, 0);
 
+	v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops,
+			  V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID, 0,
+			  6, 1, 0);
+
 	ret = inst->ctrl_handler.error;
 	if (ret)
 		goto err;