devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dikshita Agarwal <quic_dikshita@quicinc.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Vikash Garodia <quic_vgarodia@quicinc.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>
Cc: Sebastian Fricke <sebastian.fricke@collabora.com>,
	<linux-arm-msm@vger.kernel.org>, <linux-media@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Vedang Nagar <quic_vnagar@quicinc.com>
Subject: Re: [PATCH v4 11/28] media: iris: implement g_selection ioctl
Date: Wed, 23 Oct 2024 17:01:01 +0530	[thread overview]
Message-ID: <c841e94e-0468-5863-9cb1-403b83c3510d@quicinc.com> (raw)
In-Reply-To: <ffbbb1f2-81b0-40f5-806c-4bda3c9a3ce0@xs4all.nl>



On 10/23/2024 4:15 PM, Hans Verkuil wrote:
> On 14/10/2024 11:07, Dikshita Agarwal wrote:
>> From: Vedang Nagar <quic_vnagar@quicinc.com>
>>
>> Implement g_selection ioctl in the driver with necessary hooks.
>>
>> Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
>> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
>> ---
>>  drivers/media/platform/qcom/iris/iris_vidc.c | 29 ++++++++++++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_vidc.c b/drivers/media/platform/qcom/iris/iris_vidc.c
>> index 05146970189b..481fa0a7b7f3 100644
>> --- a/drivers/media/platform/qcom/iris/iris_vidc.c
>> +++ b/drivers/media/platform/qcom/iris/iris_vidc.c
>> @@ -256,6 +256,34 @@ static int iris_g_fmt_vid_mplane(struct file *filp, void *fh, struct v4l2_format
>>  	return ret;
>>  }
>>  
>> +static int iris_g_selection(struct file *filp, void *fh, struct v4l2_selection *s)
>> +{
>> +	struct iris_inst *inst = iris_get_inst(filp, NULL);
>> +
>> +	if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
> 
> For g/s_selection the MPLANE type will always be mapped to the non-mplane type,
> so you'll never see V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE here.
> 
> See v4l_g/s_selection in v4l2-core/v4l2-ioctl.c.
> 
> It's a bit of an historical artifact.
> 
I see, Will remove the check for MPLANE then and keep only for
V4L2_BUF_TYPE_VIDEO_CAPTURE.

Thanks,
Dikshita
>> +	    s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
>> +		return -EINVAL;
>> +
>> +	switch (s->target) {
>> +	case V4L2_SEL_TGT_CROP_BOUNDS:
>> +	case V4L2_SEL_TGT_CROP_DEFAULT:
>> +	case V4L2_SEL_TGT_CROP:
>> +	case V4L2_SEL_TGT_COMPOSE_BOUNDS:
>> +	case V4L2_SEL_TGT_COMPOSE_PADDED:
>> +	case V4L2_SEL_TGT_COMPOSE_DEFAULT:
>> +	case V4L2_SEL_TGT_COMPOSE:
>> +		s->r.left = inst->crop.left;
>> +		s->r.top = inst->crop.top;
>> +		s->r.width = inst->crop.width;
>> +		s->r.height = inst->crop.height;
>> +		break;
>> +	default:
>> +		return -EINVAL;
>> +	}
>> +
>> +	return 0;
>> +}
>> +
>>  static struct v4l2_file_operations iris_v4l2_file_ops = {
>>  	.owner                          = THIS_MODULE,
>>  	.open                           = iris_open,
>> @@ -277,6 +305,7 @@ static const struct v4l2_ioctl_ops iris_v4l2_ioctl_ops = {
>>  	.vidioc_g_fmt_vid_cap_mplane    = iris_g_fmt_vid_mplane,
>>  	.vidioc_g_fmt_vid_out_mplane    = iris_g_fmt_vid_mplane,
>>  	.vidioc_reqbufs                 = v4l2_m2m_ioctl_reqbufs,
>> +	.vidioc_g_selection             = iris_g_selection,
>>  };
>>  
>>  void iris_init_ops(struct iris_core *core)
>>
> 
> Regards,
> 
> 	Hans

  reply	other threads:[~2024-10-23 11:31 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  9:07 [PATCH v4 00/28] Qualcomm iris video decoder driver Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 01/28] dt-bindings: media: Add video support for QCOM SM8550 SoC Dikshita Agarwal
2024-10-14 11:57   ` Krzysztof Kozlowski
2024-10-14  9:07 ` [PATCH v4 02/28] media: iris: add platform driver for iris video device Dikshita Agarwal
2024-10-16  9:38   ` Uwe Kleine-König
2024-10-16 10:29     ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 03/28] media: iris: implement iris v4l2 file ops Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 04/28] media: iris: introduce iris core state management with shared queues Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 05/28] media: iris: implement video firmware load/unload Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 06/28] media: iris: implement boot sequence of the firmware Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 07/28] media: iris: introduce host firmware interface with necessary hooks Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 08/28] media: iris: implement power management Dikshita Agarwal
2024-10-15 11:25   ` kernel test robot
2024-10-15 12:07   ` kernel test robot
2024-10-14  9:07 ` [PATCH v4 09/28] media: iris: implement reqbuf ioctl with vb2_queue_setup Dikshita Agarwal
2024-10-23  9:59   ` Hans Verkuil
2024-10-23 10:17     ` Dikshita Agarwal
2024-10-23 11:25       ` Hans Verkuil
2024-10-23 11:33         ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 10/28] media: iris: implement s_fmt, g_fmt and try_fmt ioctls Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 11/28] media: iris: implement g_selection ioctl Dikshita Agarwal
2024-10-23 10:45   ` Hans Verkuil
2024-10-23 11:31     ` Dikshita Agarwal [this message]
2024-10-14  9:07 ` [PATCH v4 12/28] media: iris: implement enum_fmt and enum_frameintervals ioctls Dikshita Agarwal
2024-10-23 10:49   ` Hans Verkuil
2024-10-23 11:38     ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 13/28] media: iris: implement subscribe_event and unsubscribe_event ioctls Dikshita Agarwal
2024-10-23 10:53   ` Hans Verkuil
2024-10-23 12:03     ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 14/28] media: iris: implement iris v4l2_ctrl_ops Dikshita Agarwal
2024-10-23 11:02   ` Hans Verkuil
2024-10-25  9:21     ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 15/28] media: iris: implement query_cap, query_ctrl and query_menu ioctls Dikshita Agarwal
2024-10-23 11:05   ` Hans Verkuil
2024-10-24  5:50     ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 16/28] media: iris: implement vb2 streaming ops Dikshita Agarwal
2024-10-23 11:13   ` Hans Verkuil
2024-10-25  7:06     ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 17/28] media: iris: implement set properties to firmware during streamon Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 18/28] media: iris: subscribe parameters and properties to firmware for hfi_gen2 Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 19/28] media: iris: allocate, initialize and queue internal buffers Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 20/28] media: iris: implement vb2 ops for buf_queue and firmware response Dikshita Agarwal
2024-10-23 11:19   ` Hans Verkuil
2024-10-23 11:53     ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 21/28] media: iris: add support for dynamic resolution change Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 22/28] media: iris: handle streamoff/on from client in " Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 23/28] media: iris: add support for drain sequence Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 24/28] media: iris: add check whether the video session is supported or not Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 25/28] media: iris: implement power scaling for vpu2 and vpu3 Dikshita Agarwal
2024-10-17  6:08   ` kernel test robot
2024-10-19 11:38   ` kernel test robot
2024-10-14  9:07 ` [PATCH v4 26/28] media: iris: add check to allow sub states transitions Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 27/28] media: iris: enable video driver probe of SM8250 SoC Dikshita Agarwal
2024-10-14 14:00   ` Jianhua Lu
2024-10-14 14:08     ` Dmitry Baryshkov
2024-10-15  9:22       ` Dikshita Agarwal
2024-10-15 12:26         ` Dmitry Baryshkov
2024-10-25  7:03           ` Dikshita Agarwal
2024-10-14  9:07 ` [PATCH v4 28/28] media: MAINTAINERS: add Qualcomm iris video accelerator driver Dikshita Agarwal
2024-10-14 11:54 ` [PATCH v4 00/28] Qualcomm iris video decoder driver Krzysztof Kozlowski
2024-10-15  7:26   ` Dikshita Agarwal
2024-10-17  1:26 ` Bryan O'Donoghue

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=c841e94e-0468-5863-9cb1-403b83c3510d@quicinc.com \
    --to=quic_dikshita@quicinc.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=krzk+dt@kernel.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=p.zabel@pengutronix.de \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_vgarodia@quicinc.com \
    --cc=quic_vnagar@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sebastian.fricke@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).