include: media: Add maxframerate field
Bhanu Murthy V [Thu, 7 Jul 2016 01:19:01 +0000 (18:19 -0700)]
Add maxframerate field as part of pixelformat
to distinguish different framerate ranges support
as two different modes in sensor drivers.
e.g: 4k@(0-30) and 4K@(0-60).
More parameters might be changed in sensor with a
framerate range for optimal usage.

Bug 1769654

Change-Id: I80e6a36911e802d9f7b17b61248b6268f9b0439d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176482
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

include/media/v4l2-mediabus.h
include/uapi/linux/v4l2-mediabus.h
include/uapi/linux/videodev2.h

index 645a3f4..9f0b812 100644 (file)
@@ -97,6 +97,7 @@ static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt,
        pix_fmt->ycbcr_enc = mbus_fmt->ycbcr_enc;
        pix_fmt->quantization = mbus_fmt->quantization;
        pix_fmt->xfer_func = mbus_fmt->xfer_func;
+       pix_fmt->maxframerate = mbus_fmt->maxframerate;
 }
 
 static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
@@ -110,6 +111,7 @@ static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
        mbus_fmt->ycbcr_enc = pix_fmt->ycbcr_enc;
        mbus_fmt->quantization = pix_fmt->quantization;
        mbus_fmt->xfer_func = pix_fmt->xfer_func;
+       mbus_fmt->maxframerate = pix_fmt->maxframerate;
        mbus_fmt->code = code;
 }
 
index df4bb6a..3501c30 100644 (file)
@@ -122,6 +122,7 @@ enum v4l2_mbus_pixelcode {
  * @colorspace:        colorspace of the data (from enum v4l2_colorspace)
  * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)
  * @quantization: quantization of the data (from enum v4l2_quantization)
+ * @max_framerate: max frame rate of the resolution
  * @xfer_func:  transfer function of the data (from enum v4l2_xfer_func)
  */
 struct v4l2_mbus_framefmt {
@@ -133,7 +134,8 @@ struct v4l2_mbus_framefmt {
        __u16                   ycbcr_enc;
        __u16                   quantization;
        __u16                   xfer_func;
-       __u16                   reserved[11];
+       __u16                   maxframerate;
+       __u16                   reserved[10];
 };
 
 #endif
index b057245..c8783ed 100644 (file)
@@ -444,6 +444,7 @@ struct v4l2_pix_format {
        __u32                   ycbcr_enc;      /* enum v4l2_ycbcr_encoding */
        __u32                   quantization;   /* enum v4l2_quantization */
        __u32                   xfer_func;      /* enum v4l2_xfer_func */
+       __u32                   maxframerate;
 };
 
 /*      Pixel format         FOURCC                          depth  Description  */