From: Hugues Fruchet <hugues.fruchet@st.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mickael Guene <mickael.guene@st.com>
Cc: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Hugues Fruchet" <hugues.fruchet@st.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>
Subject: [PATCH v2 2/3] media: st-mipid02: add support of YUYV8 and UYVY8
Date: Mon, 17 Jun 2019 15:43:57 +0200 [thread overview]
Message-ID: <1560779038-26012-3-git-send-email-hugues.fruchet@st.com> (raw)
In-Reply-To: <1560779038-26012-1-git-send-email-hugues.fruchet@st.com>
Add support of YUYV8 and UYVY8 pixel formats.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
drivers/media/i2c/st-mipid02.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c
index 76a9f52..35946ad 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;
--
2.7.4
next prev parent reply other threads:[~2019-06-17 13:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 13:43 [PATCH v2 0/3] Add support of RGB565, YUV and JPEG to MIPID02 bridge Hugues Fruchet
2019-06-17 13:43 ` [PATCH v2 1/3] media: st-mipid02: add support of RGB565 Hugues Fruchet
2019-06-17 13:43 ` Hugues Fruchet [this message]
2019-06-17 13:43 ` [PATCH v2 3/3] media: st-mipid02: add support of JPEG Hugues Fruchet
2019-06-20 8:49 ` [PATCH v2 0/3] Add support of RGB565, YUV and JPEG to MIPID02 bridge Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1560779038-26012-3-git-send-email-hugues.fruchet@st.com \
--to=hugues.fruchet@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mickael.guene@st.com \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).