[RFC/PATCH 0/3] New g_framesamples subdev callback for compressed formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everybody,

Many of our embedded systems I deal with are equipped with (too) smart camera 
sensors (devices) which use MIPI-CSI bus to send already compressed image data.
Usually the media bus is used with camera for transmitting raw image data, where
it's easy to calculate target memory buffer size given the pixel resolution,
bus width and number of bus samples per pixel.

However when compressed formats come into play, there is no standard way to obtain
information from a subdev how much data it is going to transmit per single frame.
In other words MIPI-CSI receiver can't know how much memory it should allocate
for MIPI-CSI transmitter to proceed.

The following change set adds g_framesamples callback to the subdev video operations
set, so the host drivers can query subdev for memory requirements per specific format.
I have added media bus pixel format as an argument because the host may need to know
number of samples per frame' if user space issues VIDIOC_TRY_FMT, at this time pixel
format at MIPI-CSI transmitter subdev might not be set yet.

I have also been preparing patches utilising '__u32 framesamples' field added to
struct v4l2_mbus_framefmt. Extending v4l2_mbus_framefmt data structure allows
to associate frame length with pads, similarly as it's done with media bus pixel
format. But if would force application to set proper framesamples value at each pad,
I suppose it could be done only for compressed formats, then the host driver would
validate the values before actually starting streaming.

Any critics and suggestions are welcome :-)


Sylwester Nawrocki (3):
  v4l: Add new g_framesamples subdev video operation
  s5p-fimc: Add g_framesamples subdev operation support
  m5mols: Add g_framesamples operation support

 drivers/media/video/m5mols/m5mols.h         |    2 +
 drivers/media/video/m5mols/m5mols_capture.c |    4 ++
 drivers/media/video/m5mols/m5mols_core.c    |   16 ++++++-
 drivers/media/video/m5mols/m5mols_reg.h     |    2 +
 drivers/media/video/s5p-fimc/fimc-capture.c |   63 +++++++++++++++++++++++++--
 drivers/media/video/s5p-fimc/fimc-core.c    |   11 ++++-
 drivers/media/video/s5p-fimc/fimc-core.h    |    9 +++-
 include/media/v4l2-subdev.h                 |    6 +++
 8 files changed, 103 insertions(+), 10 deletions(-)


--
Regards,
Sylwester

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux