]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: Add CSI-2 bus configuration to frame descriptors
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 26 Apr 2022 07:02:39 +0000 (09:02 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 17 May 2022 07:11:25 +0000 (09:11 +0200)
Add CSI-2 bus specific configuration to the frame descriptors. This allows
obtaining the virtual channel and data type information for each stream
the transmitter is sending.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
include/media/v4l2-subdev.h

index 544ddd1bdcbe13be1e113b0b06b736e3361a815c..b661e1817470f90ba9ecc05cf019077adca3f620 100644 (file)
@@ -312,6 +312,17 @@ struct v4l2_subdev_audio_ops {
        int (*s_stream)(struct v4l2_subdev *sd, int enable);
 };
 
+/**
+ * struct v4l2_mbus_frame_desc_entry_csi2
+ *
+ * @vc: CSI-2 virtual channel
+ * @dt: CSI-2 data type ID
+ */
+struct v4l2_mbus_frame_desc_entry_csi2 {
+       u8 vc;
+       u8 dt;
+};
+
 /**
  * enum v4l2_mbus_frame_desc_flags - media bus frame description flags
  *
@@ -335,11 +346,16 @@ enum v4l2_mbus_frame_desc_flags {
  *             %FRAME_DESC_FL_BLOB is not set.
  * @length:    number of octets per frame, valid if @flags
  *             %V4L2_MBUS_FRAME_DESC_FL_LEN_MAX is set.
+ * @bus:       Bus-specific frame descriptor parameters
+ * @bus.csi2:  CSI-2-specific bus configuration
  */
 struct v4l2_mbus_frame_desc_entry {
        enum v4l2_mbus_frame_desc_flags flags;
        u32 pixelcode;
        u32 length;
+       union {
+               struct v4l2_mbus_frame_desc_entry_csi2 csi2;
+       } bus;
 };
 
 #define V4L2_FRAME_DESC_ENTRY_MAX      4