]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/mediatek: Fix color format MACROs in OVL
authorHsin-Te Yuan <yuanhsinte@chromium.org>
Wed, 16 Oct 2024 14:17:14 +0000 (14:17 +0000)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Tue, 22 Oct 2024 12:50:51 +0000 (12:50 +0000)
In commit 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in
OVL"), some new color formats are defined in the MACROs to make the
switch statement more concise. That commit was intended to be a no-op
cleanup. However, there are typos in these formats MACROs, which cause
the return value to be incorrect. Fix the typos to ensure the return
value remains unchanged.

Fixes: 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in OVL")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Hsin-Te Yuan <yuanhsinte@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Link: https://patchwork.kernel.org/project/dri-devel/patch/20241016-color-v3-1-e0f5f44a72d8@chromium.org/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_disp_ovl.c

index 9786ce94de0e679d65b48ded39e92e85f60ab89e..e0c0bb01f65ae006828a9a94e945dac62c56763c 100644 (file)
@@ -65,8 +65,8 @@
 #define OVL_CON_CLRFMT_RGB     (1 << 12)
 #define OVL_CON_CLRFMT_ARGB8888        (2 << 12)
 #define OVL_CON_CLRFMT_RGBA8888        (3 << 12)
-#define OVL_CON_CLRFMT_ABGR8888        (OVL_CON_CLRFMT_RGBA8888 | OVL_CON_BYTE_SWAP)
-#define OVL_CON_CLRFMT_BGRA8888        (OVL_CON_CLRFMT_ARGB8888 | OVL_CON_BYTE_SWAP)
+#define OVL_CON_CLRFMT_ABGR8888        (OVL_CON_CLRFMT_ARGB8888 | OVL_CON_BYTE_SWAP)
+#define OVL_CON_CLRFMT_BGRA8888        (OVL_CON_CLRFMT_RGBA8888 | OVL_CON_BYTE_SWAP)
 #define OVL_CON_CLRFMT_UYVY    (4 << 12)
 #define OVL_CON_CLRFMT_YUYV    (5 << 12)
 #define OVL_CON_MTX_YUV_TO_RGB (6 << 16)