* [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event
@ 2022-04-29 11:06 Naina Vaskenly
2022-04-29 11:18 ` Hans Verkuil
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Naina Vaskenly @ 2022-04-29 11:06 UTC (permalink / raw)
To: Mauro Carvalho Chehab, lijian, Hans Verkuil, linux-media, linux-kernel
Cc: Kumar Anshuman, Naina Vaskenly
'reserved' member of struct v4l2_event is currently not enabled.
This field can be used to transfer data, if >64 bytes of data
has to be sent. Hence, added this change to copy the reserved field in
__v4l2_event_queue_fh.
Naina Vaskenly (1):
media: v4l2-core: Enable reserved field of v4l2_event
drivers/media/v4l2-core/v4l2-event.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event
2022-04-29 11:06 [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event Naina Vaskenly
@ 2022-04-29 11:18 ` Hans Verkuil
2022-04-29 11:45 ` [PATCH V0 0/1] " Naina Vaskenly
2022-04-29 11:45 ` [PATCH V0 1/1] " Naina Vaskenly
2 siblings, 0 replies; 5+ messages in thread
From: Hans Verkuil @ 2022-04-29 11:18 UTC (permalink / raw)
To: Naina Vaskenly, Mauro Carvalho Chehab, lijian, linux-media, linux-kernel
Cc: Kumar Anshuman
On 29/04/2022 13:06, Naina Vaskenly wrote:
> 'reserved' member of struct v4l2_event is currently not enabled.
> This field can be used to transfer data, if >64 bytes of data
> has to be sent. Hence, added this change to copy the reserved field in
> __v4l2_event_queue_fh.
>
> Naina Vaskenly (1):
> media: v4l2-core: Enable reserved field of v4l2_event
>
> drivers/media/v4l2-core/v4l2-event.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
No patch?
Regards,
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V0 0/1] media: v4l2-core: Enable reserved field of v4l2_event
2022-04-29 11:06 [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event Naina Vaskenly
2022-04-29 11:18 ` Hans Verkuil
@ 2022-04-29 11:45 ` Naina Vaskenly
2022-04-29 11:45 ` [PATCH V0 1/1] " Naina Vaskenly
2 siblings, 0 replies; 5+ messages in thread
From: Naina Vaskenly @ 2022-04-29 11:45 UTC (permalink / raw)
To: Mauro Carvalho Chehab, lijian, Hans Verkuil, linux-media, linux-kernel
Cc: Kumar Anshuman, Naina Vaskenly
'reserved' member of struct v4l2_event is currently not enabled.
This field can be used to transfer data, if >64 bytes of data
has to be sent. Hence, added this change to copy the reserved field in
__v4l2_event_queue_fh.
Naina Vaskenly (1):
media: v4l2-core: Enable reserved field of v4l2_event
drivers/media/v4l2-core/v4l2-event.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event
2022-04-29 11:06 [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event Naina Vaskenly
2022-04-29 11:18 ` Hans Verkuil
2022-04-29 11:45 ` [PATCH V0 0/1] " Naina Vaskenly
@ 2022-04-29 11:45 ` Naina Vaskenly
2022-04-29 11:50 ` Hans Verkuil
2 siblings, 1 reply; 5+ messages in thread
From: Naina Vaskenly @ 2022-04-29 11:45 UTC (permalink / raw)
To: Mauro Carvalho Chehab, lijian, Hans Verkuil, linux-media, linux-kernel
Cc: Kumar Anshuman, Naina Vaskenly
'reserved' member of struct v4l2_event is currently not enabled.
This field can be used to transfer data, if >64 bytes of data
has to be sent. Hence, added this change to copy the reserved field in
__v4l2_event_queue_fh.
Signed-off-by: Naina Vaskenly <quic_nvaskenl@quicinc.com>
---
drivers/media/v4l2-core/v4l2-event.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-event.c b/drivers/media/v4l2-core/v4l2-event.c
index c5ce9f1..3d741cb 100644
--- a/drivers/media/v4l2-core/v4l2-event.c
+++ b/drivers/media/v4l2-core/v4l2-event.c
@@ -137,8 +137,10 @@ static void __v4l2_event_queue_fh(struct v4l2_fh *fh,
/* Take one and fill it. */
kev = sev->events + sev_pos(sev, sev->in_use);
kev->event.type = ev->type;
- if (copy_payload)
+ if (copy_payload) {
kev->event.u = ev->u;
+ memcpy(kev->event.reserved, ev->reserved, sizeof(ev->reserved));
+ }
kev->event.id = ev->id;
kev->ts = ts;
kev->event.sequence = fh->sequence;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event
2022-04-29 11:45 ` [PATCH V0 1/1] " Naina Vaskenly
@ 2022-04-29 11:50 ` Hans Verkuil
0 siblings, 0 replies; 5+ messages in thread
From: Hans Verkuil @ 2022-04-29 11:50 UTC (permalink / raw)
To: Naina Vaskenly, Mauro Carvalho Chehab, lijian, linux-media, linux-kernel
Cc: Kumar Anshuman
On 29/04/2022 13:45, Naina Vaskenly wrote:
> 'reserved' member of struct v4l2_event is currently not enabled.
> This field can be used to transfer data, if >64 bytes of data
> has to be sent. Hence, added this change to copy the reserved field in
> __v4l2_event_queue_fh.
>
> Signed-off-by: Naina Vaskenly <quic_nvaskenl@quicinc.com>
> ---
> drivers/media/v4l2-core/v4l2-event.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-event.c b/drivers/media/v4l2-core/v4l2-event.c
> index c5ce9f1..3d741cb 100644
> --- a/drivers/media/v4l2-core/v4l2-event.c
> +++ b/drivers/media/v4l2-core/v4l2-event.c
> @@ -137,8 +137,10 @@ static void __v4l2_event_queue_fh(struct v4l2_fh *fh,
> /* Take one and fill it. */
> kev = sev->events + sev_pos(sev, sev->in_use);
> kev->event.type = ev->type;
> - if (copy_payload)
> + if (copy_payload) {
> kev->event.u = ev->u;
> + memcpy(kev->event.reserved, ev->reserved, sizeof(ev->reserved));
> + }
> kev->event.id = ev->id;
> kev->ts = ts;
> kev->event.sequence = fh->sequence;
What's the point of this? It's a reserved field, it must be 0. If you want to use
it for something else, then make a proposal to repurpose some of the reserved
fields.
This looks like you are trying to copy reserved data for some driver-specific hack.
That's not going to be accepted.
For the record:
Nacked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Regards,
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-04-29 11:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 11:06 [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event Naina Vaskenly
2022-04-29 11:18 ` Hans Verkuil
2022-04-29 11:45 ` [PATCH V0 0/1] " Naina Vaskenly
2022-04-29 11:45 ` [PATCH V0 1/1] " Naina Vaskenly
2022-04-29 11:50 ` Hans Verkuil
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).