mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paweł Anikiel" <pan@semihalf.com>
To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org
Cc: dinguyen@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	mchehab@kernel.org, upstream@semihalf.com, amstan@chromium.org,
	ribalda@chromium.org, "Paweł Anikiel" <pan@semihalf.com>
Subject: [RFC PATCH 1/3] media: Add 10, 12, and 16 bit RGB formats
Date: Fri, 30 Jun 2023 16:40:04 +0200	[thread overview]
Message-ID: <20230630144006.1513270-2-pan@semihalf.com> (raw)
In-Reply-To: <20230630144006.1513270-1-pan@semihalf.com>

Add the RGB30U, RGB30L, RGB36U, RGB36L, and RGB48 pixel formats.

Signed-off-by: Paweł Anikiel <pan@semihalf.com>
---
 drivers/media/v4l2-core/v4l2-ioctl.c | 5 +++++
 include/uapi/linux/videodev2.h       | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index a858acea6547..5ee616704225 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1300,6 +1300,11 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	case V4L2_PIX_FMT_ARGB2101010:	descr = "32-bit ARGB 2-10-10-10"; break;
 	case V4L2_PIX_FMT_BGR48_12:	descr = "12-bit Depth BGR"; break;
 	case V4L2_PIX_FMT_ABGR64_12:	descr = "12-bit Depth BGRA"; break;
+	case V4L2_PIX_FMT_RGB30U:	descr = "30-bit RXGXBX-10-10-10"; break;
+	case V4L2_PIX_FMT_RGB30L:	descr = "30-bit XRXGXB-10-10-10"; break;
+	case V4L2_PIX_FMT_RGB36U:	descr = "36-bit RXGXBX-12-12-12"; break;
+	case V4L2_PIX_FMT_RGB36L:	descr = "36-bit XRXGXB-12-12-12"; break;
+	case V4L2_PIX_FMT_RGB48:	descr = "48-bit RGB-16-16-16"; break;
 	case V4L2_PIX_FMT_GREY:		descr = "8-bit Greyscale"; break;
 	case V4L2_PIX_FMT_Y4:		descr = "4-bit Greyscale"; break;
 	case V4L2_PIX_FMT_Y6:		descr = "6-bit Greyscale"; break;
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index aee75eb9e686..3568819eabeb 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -583,6 +583,11 @@ struct v4l2_pix_format {
 /* RGB formats (6 or 8 bytes per pixel) */
 #define V4L2_PIX_FMT_BGR48_12    v4l2_fourcc('B', '3', '1', '2') /* 48  BGR 12-bit per component */
 #define V4L2_PIX_FMT_ABGR64_12   v4l2_fourcc('B', '4', '1', '2') /* 64  BGRA 12-bit per component */
+#define V4L2_PIX_FMT_RGB30U  v4l2_fourcc('R', '3', '0', 'U') /* 30  RXGXBX-10-10-10 */
+#define V4L2_PIX_FMT_RGB30L  v4l2_fourcc('R', '3', '0', 'L') /* 30  XRXGXB-10-10-10 */
+#define V4L2_PIX_FMT_RGB36U  v4l2_fourcc('R', '3', '6', 'U') /* 36  RXGXBX-12-12-12 */
+#define V4L2_PIX_FMT_RGB36L  v4l2_fourcc('R', '3', '6', 'L') /* 36  XRXGXB-12-12-12 */
+#define V4L2_PIX_FMT_RGB48   v4l2_fourcc('R', 'G', 'B', '6') /* 48  RGB-16-16-16    */
 
 /* Grey formats */
 #define V4L2_PIX_FMT_GREY    v4l2_fourcc('G', 'R', 'E', 'Y') /*  8  Greyscale     */
-- 
2.41.0.255.g8b1d071c50-goog


  reply	other threads:[~2023-06-30 14:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 14:40 [RFC PATCH 0/3] Google Chameleon v3 video driver Paweł Anikiel
2023-06-30 14:40 ` Paweł Anikiel [this message]
2023-07-07 18:34   ` [RFC PATCH 1/3] media: Add 10, 12, and 16 bit RGB formats Nicolas Dufresne
2023-09-06 10:37   ` Hans Verkuil
2023-06-30 14:40 ` [RFC PATCH 2/3] media: Add Google Chameleon v3 video driver Paweł Anikiel
2023-09-06 11:14   ` Hans Verkuil
2023-09-06 16:27     ` Paweł Anikiel
2023-09-07  7:47       ` Hans Verkuil
2023-06-30 14:40 ` [RFC PATCH 3/3] ARM: dts: Add Chameleon v3 video node Paweł Anikiel
2023-06-30 18:25   ` Conor Dooley
2023-07-03 11:44     ` Paweł Anikiel
2023-07-03 12:33       ` Krzysztof Kozlowski
2023-07-04 16:16         ` Paweł Anikiel
2023-07-04 16:23           ` Krzysztof Kozlowski
2023-07-04 16:27             ` Conor Dooley
2023-07-05 14:45 ` [RFC PATCH 0/3] Google Chameleon v3 video driver Alexandru M Stan
2023-09-06 11:15 ` 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=20230630144006.1513270-2-pan@semihalf.com \
    --to=pan@semihalf.com \
    --cc=amstan@chromium.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.org \
    --cc=robh+dt@kernel.org \
    --cc=upstream@semihalf.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

all inboxes | Powered by JetHome®