All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viswanath Boma <quic_vboma@quicinc.com>
To: video.upstream.external@qti.qualcomm.com,
	Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <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
Cc: Viswanath Boma <quic_vboma@quicinc.com>
Subject: [PATCH 4/7] venus : Addition of EOS Event support for Encoder
Date: Tue, 12 Jul 2022 17:53:44 +0530	[thread overview]
Message-ID: <20220712122347.6781-4-quic_vboma@quicinc.com> (raw)
In-Reply-To: <20220712122347.6781-1-quic_vboma@quicinc.com>

 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


  parent reply	other threads:[~2022-07-12 12:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Viswanath Boma [this message]
2022-07-25 10:44   ` [PATCH 4/7] venus : Addition of EOS Event support for Encoder 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

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=20220712122347.6781-4-quic_vboma@quicinc.com \
    --to=quic_vboma@quicinc.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=video.upstream.external@qti.qualcomm.com \
    /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.