All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] media: Add ST VGXY61 camera sensor driver
@ 2022-04-15 11:18 Benjamin Mugnier
  2022-04-15 11:18 ` [PATCH v2 1/5] media: v4l: Add 1X16 16-bit greyscale media bus code definition Benjamin Mugnier
                   ` (4 more replies)
  0 siblings, 5 replies; 33+ messages in thread
From: Benjamin Mugnier @ 2022-04-15 11:18 UTC (permalink / raw)
  To: linux-media
  Cc: alain.volmat, hugues.fruchet, sylvain.petinot, dave.stevenson,
	sakari.ailus, laurent.pinchart, kieran.bingham, Benjamin Mugnier

Hello,

This series adds a driver for the ST VGXY61 camera sensor. This camera sensor is using the i2c bus
for control and the csi-2 bus for data.
DT bindings are in 4/5, and the driver in 5/5.
Other commits, in order, introduce the MEDIA_BUS_FMT_Y16_1X16 as a media bus format, a v4l2 standard
control to retrieve sensor temperature, and reserve 16 user controls for the driver (required to set
the HDR mode).
Tested on DragonBoard 410c and on Raspberry Pi 4.

The vblank and hblank support required some work to make sure some v4l2 controls update their
minimum and maximum values to avoid crashing the sensor. This required some time to wrap my head
around, I apologize for the delay.

Here are some observations after the first review:
- The sensor requires patch at boot time. Therefore the pm_runtime power_on function applies the
  patch every time it needs to wake up the sensor. The delay is barely noticeable for the user, and
  we benefit from the power management functionalities.
- After changing wrong SGBRG* media bus formats to proper Y*, as this is a monochrome sensor, I
  noticed that my test target db410c offers limited support for monochrome pixel formats as only
  Y10P pixel format is supported. Moreover, Y10P does not seem to be supported by some viewers
  (qv4l2 for instance returns an unknown pixel format error). v4l-ctl and yavta are doing fine but
  do not offer a video preview, and I couldn't find a tool to unpack the captured packed raw frame.
  As advised by Sakari on irc, adding other monochrome pixel formats to the db410c should not be
  really complicated, neither adding support in v4l-convert for monochrome formats to benefit qv4l2.
  But this leaves me without the ability to preview a video on this specific platform for now on. I
  would like to have your opinions on this matter, maybe I missed something.

Thanks a lot.

v1->v2:
- Move temperature control to v4l2-controls.h as a standard control
- Reserve controls in v4l2-controls.h for HDR control
- Remove GPIO strobbing controls
- Remove references to unused controls in sensor struct
- Use v4l2_find_nearest_size
- Use V4L2_COLORSPACE_RAW instead of V4L2_COLORSPACE_SRGB
- Fill ycbcr_enc, quantization, and xfer_func in v4l2_mbus_framefmt
- Change gain from formula to a register RAW write
- Change temperature control value directly
- Remove clock-name and clock-lanes from device tree bindings
- Declare crop zones in mode_info structure
- Remove frame_interval functions and add hblank and vblank instead
- Update controls dependencies on change
- Fix first exposure rule of thumb being too restrictive
- Disable hflip and vflip controls while streaming
- Change RGB media bus code to Y as the sensor is monochrome
- Add Y16 format to v4l2 media bus formats
- Add get_selection API
- Fix timeout errors while disabling streaming on high framerates
- Support pm_runtime
- Rebase on master

Benjamin Mugnier (5):
  media: v4l: Add 1X16 16-bit greyscale media bus code definition
  media: v4l: ctrls: Add a control for temperature
  media: v4l: ctrls: Add user control base for st-vgxy61 controls
  media: dt-bindings: media: i2c: Add ST VGXY61 camera sensor binding
  media: i2c: Add driver for ST VGXY61 camera sensor

 .../bindings/media/i2c/st,st-vgxy61.yaml      |  125 ++
 .../media/v4l/ext-ctrls-camera.rst            |    3 +
 .../media/v4l/subdev-formats.rst              |   37 +
 MAINTAINERS                                   |    9 +
 drivers/media/i2c/Kconfig                     |   10 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/st-vgxy61.c                 | 1997 +++++++++++++++++
 drivers/media/v4l2-core/v4l2-ctrls-defs.c     |    4 +
 include/uapi/linux/media-bus-format.h         |    3 +-
 include/uapi/linux/v4l2-controls.h            |    7 +
 10 files changed, 2195 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml
 create mode 100644 drivers/media/i2c/st-vgxy61.c

-- 
2.25.1


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

end of thread, other threads:[~2022-04-27 14:27 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-15 11:18 [PATCH v2 0/5] media: Add ST VGXY61 camera sensor driver Benjamin Mugnier
2022-04-15 11:18 ` [PATCH v2 1/5] media: v4l: Add 1X16 16-bit greyscale media bus code definition Benjamin Mugnier
2022-04-15 14:47   ` Laurent Pinchart
2022-04-15 11:18 ` [PATCH v2 2/5] media: v4l: ctrls: Add a control for temperature Benjamin Mugnier
2022-04-15 14:37   ` Laurent Pinchart
2022-04-20 13:01     ` Benjamin Mugnier
2022-04-19  7:03   ` Hans Verkuil
2022-04-20 13:01     ` Benjamin Mugnier
2022-04-19 18:24   ` Nicolas Dufresne
2022-04-19 19:28     ` Guenter Roeck
2022-04-19 21:01       ` Laurent Pinchart
2022-04-19 22:04         ` Guenter Roeck
2022-04-20 13:01           ` Benjamin Mugnier
2022-04-20 13:21             ` Laurent Pinchart
2022-04-20 13:58               ` Guenter Roeck
2022-04-20 14:23                 ` Laurent Pinchart
2022-04-20 15:19                   ` Benjamin Mugnier
2022-04-20 16:19                     ` Guenter Roeck
2022-04-20 16:51                       ` Laurent Pinchart
2022-04-15 11:18 ` [PATCH v2 3/5] media: v4l: ctrls: Add user control base for st-vgxy61 controls Benjamin Mugnier
2022-04-15 14:51   ` Laurent Pinchart
2022-04-15 11:18 ` [PATCH v2 4/5] media: dt-bindings: media: i2c: Add ST VGXY61 camera sensor binding Benjamin Mugnier
2022-04-15 14:59   ` Laurent Pinchart
2022-04-20 13:01     ` Benjamin Mugnier
2022-04-15 11:18 ` [PATCH v2 5/5] media: i2c: Add driver for ST VGXY61 camera sensor Benjamin Mugnier
2022-04-15 15:39   ` Laurent Pinchart
2022-04-20 13:01     ` Benjamin Mugnier
2022-04-20 16:48       ` Laurent Pinchart
2022-04-22  8:44         ` Benjamin Mugnier
2022-04-22 13:29           ` Laurent Pinchart
2022-04-22 14:40             ` Benjamin Mugnier
2022-04-24 16:34               ` Laurent Pinchart
2022-04-27 14:27                 ` Benjamin Mugnier

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.