On Fri, 23 Jul 2010, Laurent Pinchart wrote: > Hi Guennadi, > > On Friday 23 July 2010 10:13:37 Guennadi Liakhovetski wrote: > > Add pixel format codes, defined in the MIPI CSI-2 specification. > > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx> > > --- > > > > Even though it affects the same enum as my patch from yesterday, they are > > independent, Hans and Laurent CCed just to avoid possible conflicts, when > > further patching this file. > > > > include/media/v4l2-mediabus.h | 26 ++++++++++++++++++++++++++ > > 1 files changed, 26 insertions(+), 0 deletions(-) > > > > diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h > > index a870965..b0dcace 100644 > > --- a/include/media/v4l2-mediabus.h > > +++ b/include/media/v4l2-mediabus.h > > @@ -41,6 +41,32 @@ enum v4l2_mbus_pixelcode { > > V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE, > > V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE, > > V4L2_MBUS_FMT_SGRBG8_1X8, > > + /* MIPI CSI-2 codes */ > > + V4L2_MBUS_FMT_MIPI_CSI2_YUV420_8_L, > > + V4L2_MBUS_FMT_MIPI_CSI2_YUV420_8, > > + V4L2_MBUS_FMT_MIPI_CSI2_YUV420_10, > > + V4L2_MBUS_FMT_MIPI_CSI2_YUV420_8_CSPS, > > + V4L2_MBUS_FMT_MIPI_CSI2_YUV420_10_CSPS, > > + V4L2_MBUS_FMT_MIPI_CSI2_YUV422_8, > > + V4L2_MBUS_FMT_MIPI_CSI2_YUV422_10, > > + V4L2_MBUS_FMT_MIPI_CSI2_RGB888, > > + V4L2_MBUS_FMT_MIPI_CSI2_RGB666, > > + V4L2_MBUS_FMT_MIPI_CSI2_RGB565, > > + V4L2_MBUS_FMT_MIPI_CSI2_RGB555, > > + V4L2_MBUS_FMT_MIPI_CSI2_RGB444, > > + V4L2_MBUS_FMT_MIPI_CSI2_RAW6, > > + V4L2_MBUS_FMT_MIPI_CSI2_RAW7, > > + V4L2_MBUS_FMT_MIPI_CSI2_RAW8, > > + V4L2_MBUS_FMT_MIPI_CSI2_RAW10, > > + V4L2_MBUS_FMT_MIPI_CSI2_RAW12, > > + V4L2_MBUS_FMT_MIPI_CSI2_RAW14, > > + V4L2_MBUS_FMT_MIPI_CSI2_GEN_NULL, > > + V4L2_MBUS_FMT_MIPI_CSI2_GEN_BLANKING, > > + V4L2_MBUS_FMT_MIPI_CSI2_GEN_EMBEDDED8, > > + V4L2_MBUS_FMT_MIPI_CSI2_USER_1, > > + V4L2_MBUS_FMT_MIPI_CSI2_USER_2, > > + V4L2_MBUS_FMT_MIPI_CSI2_USER_3, > > + V4L2_MBUS_FMT_MIPI_CSI2_USER_4, > > I don't think I like this. Take the raw formats for instance, they're used for > Bayer RGB. V4L2_MBUS_FMT_MIPI_CSI2_RAW8 could map to any Bayer format (GRBG, > RGGB, ...). Why don't we just use "standard" pixel codes ? Well, the idea was to keep them cleanly separated: CSI connections only deal with CSI codes, parallel connections with parallel codes. In principle, the above codes are supposed to specify the bus type, right? A "NX8" format is an 8-bit parallel bus, etc. CSI doesn't fit into any of those. So, from that PoV you do need separate codes, I think. That said, using these new CSI codes is difficult... Ok, how about this: looking at the spec, there is a layer chart of the MIPI CSI-2 data-flow. It shows some arbitrary data format at the application level, lane-based serial connection on the wire, but between them there is a fixed 8-bit data bus, say, at the lane-management layer. So, we just agree to take that as our CSI bus view. In fact, we _have_ to use a more generic pixel code scheme, than the CSI formats, because, say, with CSI codes there's no way to say, that it's actually Bayer data, that the sensor is sending, using the CSI RAW8 format. So, Laurent, you're right, this is not going to work. Thanks for pointing this out! cat mediabus-add-MIPI-CSI-2-pixel-format-codes.patch > /dev/null Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- 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