All of lore.kernel.org
 help / color / mirror / Atom feed
* Please help test the new v4l-subdev support in v4l2-compliance
@ 2018-02-03 15:56 Hans Verkuil
  2018-02-05 16:21 ` Tim Harvey
  2018-02-06  7:16 ` Tim Harvey
  0 siblings, 2 replies; 15+ messages in thread
From: Hans Verkuil @ 2018-02-03 15:56 UTC (permalink / raw)
  To: Linux Media Mailing List, Tim Harvey, Jacopo Mondi
  Cc: Laurent Pinchart, Mauro Carvalho Chehab

Hi Tim, Jacopo,

I have now finished writing the v4l2-compliance tests for the various v4l-subdev
ioctls. I managed to test some with the vimc driver, but that doesn't implement all
ioctls, so I could use some help testing my test code :-)

To test you first need to apply these patches to your kernel:

https://patchwork.linuxtv.org/patch/46817/
https://patchwork.linuxtv.org/patch/46822/

Otherwise the compliance test will fail a lot.

Now run v4l2-compliance -u /dev/v4l-subdevX (or -uX as a shortcut) and see what
happens.

I have tested the following ioctls with vimc, so they are likely to be correct:

#define VIDIOC_SUBDEV_G_FMT                     _IOWR('V',  4, struct v4l2_subdev_format)
#define VIDIOC_SUBDEV_S_FMT                     _IOWR('V',  5, struct v4l2_subdev_format)
#define VIDIOC_SUBDEV_ENUM_MBUS_CODE            _IOWR('V',  2, struct v4l2_subdev_mbus_code_enum)
#define VIDIOC_SUBDEV_ENUM_FRAME_SIZE           _IOWR('V', 74, struct v4l2_subdev_frame_size_enum)

All others are untested:

#define VIDIOC_SUBDEV_G_FRAME_INTERVAL          _IOWR('V', 21, struct v4l2_subdev_frame_interval)
#define VIDIOC_SUBDEV_S_FRAME_INTERVAL          _IOWR('V', 22, struct v4l2_subdev_frame_interval)
#define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL       _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum)
#define VIDIOC_SUBDEV_G_CROP                    _IOWR('V', 59, struct v4l2_subdev_crop)
#define VIDIOC_SUBDEV_S_CROP                    _IOWR('V', 60, struct v4l2_subdev_crop)
#define VIDIOC_SUBDEV_G_SELECTION               _IOWR('V', 61, struct v4l2_subdev_selection)
#define VIDIOC_SUBDEV_S_SELECTION               _IOWR('V', 62, struct v4l2_subdev_selection)
#define VIDIOC_SUBDEV_G_EDID                    _IOWR('V', 40, struct v4l2_edid)
#define VIDIOC_SUBDEV_S_EDID                    _IOWR('V', 41, struct v4l2_edid)
#define VIDIOC_SUBDEV_S_DV_TIMINGS              _IOWR('V', 87, struct v4l2_dv_timings)
#define VIDIOC_SUBDEV_G_DV_TIMINGS              _IOWR('V', 88, struct v4l2_dv_timings)
#define VIDIOC_SUBDEV_ENUM_DV_TIMINGS           _IOWR('V', 98, struct v4l2_enum_dv_timings)
#define VIDIOC_SUBDEV_QUERY_DV_TIMINGS          _IOR('V', 99, struct v4l2_dv_timings)
#define VIDIOC_SUBDEV_DV_TIMINGS_CAP            _IOWR('V', 100, struct v4l2_dv_timings_cap)

I did the best I could, but there may very well be bugs in the test code.

I will also test the timings and edid ioctls myself later next week at work.

The v4l2-compliance utility can now also test media devices (-m option), although that's
early days yet. Eventually I want to be able to walk the graph and test each device in
turn.

I have this idea of making v4l2-compliance, cec-compliance and media-compliance
frontends that can all share the actual test code. And perhaps that can include a new
dvb-compliance as well.

However, that's future music, for now I just want to get proper ioctl test coverage
so driver authors can at least have some confidence in their code by running these
tests.

Regards,

	Hans

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

end of thread, other threads:[~2018-02-06 19:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-03 15:56 Please help test the new v4l-subdev support in v4l2-compliance Hans Verkuil
2018-02-05 16:21 ` Tim Harvey
2018-02-05 16:27   ` Hans Verkuil
2018-02-05 16:49     ` Tim Harvey
2018-02-05 16:37   ` Mauro Carvalho Chehab
2018-02-05 16:55     ` Mauro Carvalho Chehab
2018-02-05 16:59       ` Hans Verkuil
2018-02-05 17:01         ` Hans Verkuil
2018-02-05 17:33           ` Mauro Carvalho Chehab
2018-02-05 16:58     ` Hans Verkuil
2018-02-06  7:16 ` Tim Harvey
2018-02-06  7:34   ` Hans Verkuil
2018-02-06 18:48     ` Tim Harvey
2018-02-06 19:05       ` Hans Verkuil
2018-02-06 19:31         ` Tim Harvey

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.