[media] platform: Make use of media_bus_format enum
In order to have subsytem agnostic media bus format definitions we've moved media bus definition to include/uapi/linux/media-bus-format.h and prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT. Reference new definitions in all platform drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

orang tua
43ba464182
melakukan
27ffaeb0ab
@@ -49,7 +49,7 @@
|
||||
struct bcap_format {
|
||||
char *desc;
|
||||
u32 pixelformat;
|
||||
enum v4l2_mbus_pixelcode mbus_code;
|
||||
u32 mbus_code;
|
||||
int bpp; /* bits per pixel */
|
||||
int dlen; /* data length for ppi in bits */
|
||||
};
|
||||
@@ -116,35 +116,35 @@ static const struct bcap_format bcap_formats[] = {
|
||||
{
|
||||
.desc = "YCbCr 4:2:2 Interleaved UYVY",
|
||||
.pixelformat = V4L2_PIX_FMT_UYVY,
|
||||
.mbus_code = V4L2_MBUS_FMT_UYVY8_2X8,
|
||||
.mbus_code = MEDIA_BUS_FMT_UYVY8_2X8,
|
||||
.bpp = 16,
|
||||
.dlen = 8,
|
||||
},
|
||||
{
|
||||
.desc = "YCbCr 4:2:2 Interleaved YUYV",
|
||||
.pixelformat = V4L2_PIX_FMT_YUYV,
|
||||
.mbus_code = V4L2_MBUS_FMT_YUYV8_2X8,
|
||||
.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8,
|
||||
.bpp = 16,
|
||||
.dlen = 8,
|
||||
},
|
||||
{
|
||||
.desc = "YCbCr 4:2:2 Interleaved UYVY",
|
||||
.pixelformat = V4L2_PIX_FMT_UYVY,
|
||||
.mbus_code = V4L2_MBUS_FMT_UYVY8_1X16,
|
||||
.mbus_code = MEDIA_BUS_FMT_UYVY8_1X16,
|
||||
.bpp = 16,
|
||||
.dlen = 16,
|
||||
},
|
||||
{
|
||||
.desc = "RGB 565",
|
||||
.pixelformat = V4L2_PIX_FMT_RGB565,
|
||||
.mbus_code = V4L2_MBUS_FMT_RGB565_2X8_LE,
|
||||
.mbus_code = MEDIA_BUS_FMT_RGB565_2X8_LE,
|
||||
.bpp = 16,
|
||||
.dlen = 8,
|
||||
},
|
||||
{
|
||||
.desc = "RGB 444",
|
||||
.pixelformat = V4L2_PIX_FMT_RGB444,
|
||||
.mbus_code = V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE,
|
||||
.mbus_code = MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE,
|
||||
.bpp = 16,
|
||||
.dlen = 8,
|
||||
},
|
||||
@@ -161,7 +161,7 @@ static struct bcap_buffer *to_bcap_vb(struct vb2_buffer *vb)
|
||||
|
||||
static int bcap_init_sensor_formats(struct bcap_device *bcap_dev)
|
||||
{
|
||||
enum v4l2_mbus_pixelcode code;
|
||||
u32 code;
|
||||
struct bcap_format *sf;
|
||||
unsigned int num_formats = 0;
|
||||
int i, j;
|
||||
|
Reference in New Issue
Block a user