All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dikshita Agarwal <dikshita@codeaurora.org>
To: linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl,
	stanimir.varbanov@linaro.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	vgarodia@codeaurora.org,
	Dikshita Agarwal <dikshita@codeaurora.org>
Subject: [PATCH v4 2/2] venus: venc : Add support for priority ID control.
Date: Mon,  4 Jan 2021 11:11:54 +0530	[thread overview]
Message-ID: <1609738914-22769-3-git-send-email-dikshita@codeaurora.org> (raw)
In-Reply-To: <1609738914-22769-1-git-send-email-dikshita@codeaurora.org>

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

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


  parent reply	other threads:[~2021-01-04  5:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04  5:41 [PATCH v4 0/2] Add base layer priority id control Dikshita Agarwal
2021-01-04  5:41 ` [PATCH v4 1/2] media: v4l2-ctrl: " Dikshita Agarwal
2021-01-04  5:41 ` Dikshita Agarwal [this message]
2021-01-12  9:44   ` [PATCH v4 2/2] venus: venc : Add support for priority ID control Stanimir Varbanov
2021-01-13 16:44 ` [PATCH v4 0/2] Add base layer priority id control Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1609738914-22769-3-git-send-email-dikshita@codeaurora.org \
    --to=dikshita@codeaurora.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=vgarodia@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.