From: Marvin Lin <milkfafa@gmail.com>
To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
avifishman70@gmail.com, tmaimon77@gmail.com,
tali.perry1@gmail.com, venture@google.com, yuenn@google.com,
benjaminfair@google.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, andrzej.p@collabora.com
Cc: devicetree@vger.kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org,
kwliu@nuvoton.com, kflin@nuvoton.com,
Marvin Lin <milkfafa@gmail.com>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>
Subject: [PATCH v15 4/7] media: v4l: Add HEXTILE compressed format
Date: Wed, 20 Sep 2023 10:28:09 +0800 [thread overview]
Message-ID: <20230920022812.601800-5-milkfafa@gmail.com> (raw)
In-Reply-To: <20230920022812.601800-1-milkfafa@gmail.com>
Add HEXTILE compressed format which is defined in Remote Framebuffer
Protocol (RFC 6143, chapter 7.7.4 Hextile Encoding) and is used by
Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs.
Signed-off-by: Marvin Lin <milkfafa@gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
---
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 7 +++++++
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
include/uapi/linux/videodev2.h | 1 +
3 files changed, 9 insertions(+)
diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
index 296ad2025e8d..886ba7b08d6b 100644
--- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
+++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
@@ -288,6 +288,13 @@ please make a proposal on the linux-media mailing list.
- 'MT2110R'
- This format is two-planar 10-Bit raster mode and having similitude with
``V4L2_PIX_FMT_MM21`` in term of alignment and tiling. Used for AVC.
+ * .. _V4L2-PIX-FMT-HEXTILE:
+
+ - ``V4L2_PIX_FMT_HEXTILE``
+ - 'HXTL'
+ - Compressed format used by Nuvoton NPCM video driver. This format is
+ defined in Remote Framebuffer Protocol (RFC 6143, chapter 7.7.4 Hextile
+ Encoding).
.. raw:: latex
\normalsize
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index f4d9d6279094..9b1de54ce379 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1510,6 +1510,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
case V4L2_PIX_FMT_AV1_FRAME: descr = "AV1 Frame"; break;
case V4L2_PIX_FMT_MT2110T: descr = "Mediatek 10bit Tile Mode"; break;
case V4L2_PIX_FMT_MT2110R: descr = "Mediatek 10bit Raster Mode"; break;
+ case V4L2_PIX_FMT_HEXTILE: descr = "Hextile Compressed Format"; break;
default:
if (fmt->description[0])
return;
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 78260e5d9985..c3d4e490ce7c 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -804,6 +804,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_QC08C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */
#define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */
#define V4L2_PIX_FMT_AJPG v4l2_fourcc('A', 'J', 'P', 'G') /* Aspeed JPEG */
+#define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L') /* Hextile compressed */
/* 10bit raw packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */
#define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */
--
2.34.1
next prev parent reply other threads:[~2023-09-20 2:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 2:28 [PATCH v15 0/7] Support Nuvoton NPCM Video Capture/Encode Engine Marvin Lin
2023-09-20 2:28 ` [PATCH v15 1/7] ARM: dts: nuvoton: Add node for NPCM VCD and ECE engine Marvin Lin
2023-09-20 2:28 ` [PATCH v15 2/7] media: dt-bindings: nuvoton: Add " Marvin Lin
2023-09-20 2:28 ` [PATCH v15 3/7] dt-bindings: soc: nuvoton: Add NPCM GFXI Marvin Lin
2023-09-20 2:28 ` Marvin Lin [this message]
2023-09-20 2:28 ` [PATCH v15 5/7] media: v4l2-ctrls: Add user control base for Nuvoton NPCM controls Marvin Lin
2023-09-20 2:28 ` [PATCH v15 6/7] media: uapi: Add controls for NPCM video driver Marvin Lin
2023-09-20 2:28 ` [PATCH v15 7/7] media: nuvoton: Add driver for NPCM video capture and encoding engine Marvin Lin
2023-09-20 15:42 ` Hans Verkuil
2023-09-21 8:03 ` Hans Verkuil
2023-09-21 13:24 ` Kun-Fa Lin
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=20230920022812.601800-5-milkfafa@gmail.com \
--to=milkfafa@gmail.com \
--cc=andrzej.p@collabora.com \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kflin@nuvoton.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kwliu@nuvoton.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=venture@google.com \
--cc=yuenn@google.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).