mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-09 14:14:00 +08:00
media: ov5640: Associate bpp with formats
Associate the bit depth to each format supported by the sensor. The bpp will be used to calculate the line length. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
8e823f5c8c
commit
2d7671f609
@ -150,23 +150,56 @@ enum ov5640_format_mux {
|
||||
OV5640_FMT_MUX_RAW_CIP,
|
||||
};
|
||||
|
||||
struct ov5640_pixfmt {
|
||||
static const struct ov5640_pixfmt {
|
||||
u32 code;
|
||||
u32 colorspace;
|
||||
};
|
||||
|
||||
static const struct ov5640_pixfmt ov5640_formats[] = {
|
||||
{ MEDIA_BUS_FMT_JPEG_1X8, V4L2_COLORSPACE_JPEG, },
|
||||
{ MEDIA_BUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_UYVY8_1X16, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_YUYV8_2X8, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_YUYV8_1X16, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_RGB565_2X8_LE, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_RGB565_2X8_BE, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_SBGGR8_1X8, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_SGBRG8_1X8, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_SGRBG8_1X8, V4L2_COLORSPACE_SRGB, },
|
||||
{ MEDIA_BUS_FMT_SRGGB8_1X8, V4L2_COLORSPACE_SRGB, },
|
||||
u8 bpp;
|
||||
} ov5640_formats[] = {
|
||||
{
|
||||
.code = MEDIA_BUS_FMT_JPEG_1X8,
|
||||
.colorspace = V4L2_COLORSPACE_JPEG,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_UYVY8_2X8,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_UYVY8_1X16,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_YUYV8_2X8,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_YUYV8_1X16,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_RGB565_2X8_LE,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_RGB565_2X8_BE,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 16,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_SBGGR8_1X8,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 8,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_SGBRG8_1X8,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 8
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_SGRBG8_1X8,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 8,
|
||||
}, {
|
||||
.code = MEDIA_BUS_FMT_SRGGB8_1X8,
|
||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
||||
.bpp = 8,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user