All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] media: v4l2-ctl: Add support to VIDIOC_DQEVENT_TIME32 on non x86_64 arch
@ 2021-07-28 10:06 Dafna Hirschfeld
  2021-07-28 10:06 ` [PATCH 1/3] media: v4l2-core: move the code that copies v4l2_event_time32 to a function Dafna Hirschfeld
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dafna Hirschfeld @ 2021-07-28 10:06 UTC (permalink / raw)
  To: linux-media
  Cc: laurent.pinchart, dafna.hirschfeld, helen.koike, ezequiel,
	hverkuil, kernel, dafna3, sakari.ailus, mchehab, tfiga,
	enric.balletbo, acourbot, hsinyi, eizan

Currently, if the ioctl VIDIOC_DQEVENT_TIME32 is called on e.g. Arm-64
the function 'v4l2_compat_translate_cmd' doesn't have a 'translation'
for the cmd and so 'cmd' is returned as is. This later cause
a failure '-ENOTTY' in __video_do_ioctl.
This patchset fix it by defining VIDIOC_DQEVENT32_TIME32 to be
VIDIOC_DQEVENT_TIME32 for non x86-64 arch and translate it
to VIDIOC_DQEVENT.

I tested the patchset with vicodec on x86_64 with both v4l2-ctl v4l2-ctl-32
and I tested it on arm64 with v4l2-ctl compiled to 32 bits, - chromeos userspace on mt8173 device.

The command I used:
$ modprobe vicdec
$ v4l2-ctl -d7 --stream-mmap --stream-out-mmap --stream-from jelly_700-1000-YU12.fwht

Witout that patchset the command holds:
$ v4l2-ctl -d7 --stream-mmap --stream-out-mmap --stream-from jelly_700-1000-YU12.fwht
>>>>

This patchset also fixes a failing test video.DecodeAccelVD.h264 from the 'tast' tests on mtk-vcodec:

tast -verbose run -build=false 10.42.0.175 video.DecodeAccelVD.h264

Dafna Hirschfeld (3):
  media: v4l2-core: move the code that copies v4l2_event_time32 to a
    function
  media: v4l2-core: combine code chunks under macro condition together
  media: v4l2-ctl: Add support to VIDIOC_DQEVENT_TIME32 on non x86_64
    arch

 drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 51 ++++++++++---------
 drivers/media/v4l2-core/v4l2-ioctl.c          | 41 +++++++++------
 include/media/v4l2-ioctl.h                    |  9 ++++
 3 files changed, 61 insertions(+), 40 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-09-02 12:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 10:06 [PATCH 0/3] media: v4l2-ctl: Add support to VIDIOC_DQEVENT_TIME32 on non x86_64 arch Dafna Hirschfeld
2021-07-28 10:06 ` [PATCH 1/3] media: v4l2-core: move the code that copies v4l2_event_time32 to a function Dafna Hirschfeld
2021-07-28 10:06 ` [PATCH 2/3] media: v4l2-core: combine code chunks under macro condition together Dafna Hirschfeld
2021-07-28 10:06 ` [PATCH 3/3] media: v4l2-ctl: Add support to VIDIOC_DQEVENT_TIME32 on non x86_64 arch Dafna Hirschfeld
2021-09-02  8:24   ` Hans Verkuil
2021-09-02  8:39     ` Hans Verkuil
2021-09-02  8:49       ` Laurent Pinchart
2021-09-02 11:08         ` Hans Verkuil
2021-09-02 12:47           ` Hans Verkuil

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.