* [PATCH v3] drm/imx: dc-plane: Add more RGB swizzling options
@ 2026-01-04 21:37 Marek Vasut
0 siblings, 0 replies; only message in thread
From: Marek Vasut @ 2026-01-04 21:37 UTC (permalink / raw)
To: dri-devel
Cc: Marek Vasut, Abel Vesa, Conor Dooley, Fabio Estevam,
Krzysztof Kozlowski, Laurent Pinchart, Liu Ying, Lucas Stach,
Peng Fan, Pengutronix Kernel Team, Rob Herring, Shawn Guo,
Thomas Zimmermann, devicetree, imx, linux-arm-kernel, linux-clk
Add additional buffer format swizzling options beyond XR24, the
hardware is capable of sampling other formats, fill them in.
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
---
Cc: Abel Vesa <abelvesa@kernel.org>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Liu Ying <victor.liu@nxp.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Rob Herring <robh@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-clk@vger.kernel.org
---
V2: - Adjust commit subject
- Drop the alpha formats for now, add RGB888/BGR888 to dc_plane_formats[]
V3: - Drop even more formats for now, because they do not work with
prefetch engine, which seems currently unimplemented.
---
drivers/gpu/drm/imx/dc/dc-fu.c | 16 ++++++++++++++++
drivers/gpu/drm/imx/dc/dc-plane.c | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/imx/dc/dc-fu.c b/drivers/gpu/drm/imx/dc/dc-fu.c
index 1d8f74babef8a..8a2c1c2a54d2c 100644
--- a/drivers/gpu/drm/imx/dc/dc-fu.c
+++ b/drivers/gpu/drm/imx/dc/dc-fu.c
@@ -65,6 +65,22 @@ static const struct dc_fu_pixel_format pixel_formats[] = {
DRM_FORMAT_XRGB8888,
R_BITS(8) | G_BITS(8) | B_BITS(8) | A_BITS(0),
R_SHIFT(16) | G_SHIFT(8) | B_SHIFT(0) | A_SHIFT(0),
+ }, {
+ DRM_FORMAT_XBGR8888,
+ R_BITS(8) | G_BITS(8) | B_BITS(8) | A_BITS(0),
+ R_SHIFT(0) | G_SHIFT(8) | B_SHIFT(16) | A_SHIFT(0),
+ }, {
+ DRM_FORMAT_RGBX8888,
+ R_BITS(8) | G_BITS(8) | B_BITS(8) | A_BITS(0),
+ R_SHIFT(24) | G_SHIFT(16) | B_SHIFT(8) | A_SHIFT(0),
+ }, {
+ DRM_FORMAT_BGRX8888,
+ R_BITS(8) | G_BITS(8) | B_BITS(8) | A_BITS(0),
+ R_SHIFT(8) | G_SHIFT(16) | B_SHIFT(24) | A_SHIFT(0),
+ }, {
+ DRM_FORMAT_RGB565,
+ R_BITS(5) | G_BITS(6) | B_BITS(5) | A_BITS(0),
+ R_SHIFT(11) | G_SHIFT(5) | B_SHIFT(0) | A_SHIFT(0),
},
};
diff --git a/drivers/gpu/drm/imx/dc/dc-plane.c b/drivers/gpu/drm/imx/dc/dc-plane.c
index e40d5d66c5c1f..2f009a5a1fb3c 100644
--- a/drivers/gpu/drm/imx/dc/dc-plane.c
+++ b/drivers/gpu/drm/imx/dc/dc-plane.c
@@ -33,6 +33,10 @@ do { \
static const uint32_t dc_plane_formats[] = {
DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_RGBX8888,
+ DRM_FORMAT_BGRX8888,
+ DRM_FORMAT_RGB565,
};
static const struct drm_plane_funcs dc_plane_funcs = {
--
2.51.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-04 21:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-04 21:37 [PATCH v3] drm/imx: dc-plane: Add more RGB swizzling options Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox