diff options
author | Hugues Fruchet <hugues.fruchet@st.com> | 2019-06-17 09:43:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-24 13:04:16 -0400 |
commit | b9f343dfc65ee692b3e47cb34b3fa5ae4979f066 (patch) | |
tree | ee3114a129968c62bf60803af498359c29e5fe65 /drivers/media/i2c | |
parent | 197adee605642c72732fd07ed59a3950a80f4e77 (diff) | |
download | linux-b9f343dfc65ee692b3e47cb34b3fa5ae4979f066.tar.gz linux-b9f343dfc65ee692b3e47cb34b3fa5ae4979f066.tar.bz2 linux-b9f343dfc65ee692b3e47cb34b3fa5ae4979f066.zip |
media: st-mipid02: add support of YUYV8 and UYVY8
Add support of YUYV8 and UYVY8 pixel formats.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/st-mipid02.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c index cbe476eb5d59..f9aa96fdf387 100644 --- a/drivers/media/i2c/st-mipid02.c +++ b/drivers/media/i2c/st-mipid02.c @@ -63,6 +63,7 @@ static const u32 mipid02_supported_fmt_codes[] = { MEDIA_BUS_FMT_SGRBG12_1X12, MEDIA_BUS_FMT_SRGGB12_1X12, MEDIA_BUS_FMT_UYVY8_1X16, MEDIA_BUS_FMT_BGR888_1X24, MEDIA_BUS_FMT_RGB565_2X8_LE, MEDIA_BUS_FMT_RGB565_2X8_BE, + MEDIA_BUS_FMT_YUYV8_2X8, MEDIA_BUS_FMT_UYVY8_2X8, }; /* regulator supplies */ @@ -129,6 +130,8 @@ static int bpp_from_code(__u32 code) case MEDIA_BUS_FMT_SRGGB12_1X12: return 12; case MEDIA_BUS_FMT_UYVY8_1X16: + case MEDIA_BUS_FMT_YUYV8_2X8: + case MEDIA_BUS_FMT_UYVY8_2X8: case MEDIA_BUS_FMT_RGB565_2X8_LE: case MEDIA_BUS_FMT_RGB565_2X8_BE: return 16; @@ -158,6 +161,8 @@ static u8 data_type_from_code(__u32 code) case MEDIA_BUS_FMT_SRGGB12_1X12: return 0x2c; case MEDIA_BUS_FMT_UYVY8_1X16: + case MEDIA_BUS_FMT_YUYV8_2X8: + case MEDIA_BUS_FMT_UYVY8_2X8: return 0x1e; case MEDIA_BUS_FMT_BGR888_1X24: return 0x24; |