drm/mediatek: Fix color format MACROs in OVL
Subsystems (3)
PATCH v3 1/1 drm/mediatek: Fix color format MACROs in OVL
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.
---
Changes in v3:
- Add missing Reviewed-by tag
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Clarify that the commit get fixed was intended to be a no-op cleanup
- Fix the typo in tag
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/mediatek/mtk_disp_ovl.c +2 -2
@@ -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)
---
base-commit: 75b607fab38d149f232f01eae5e6392b394dd659
change-id: 20241015-color-e205e75b64aa
Best regards,
Signature · 1 line
Hsin-Te Yuan <[email protected]>
Il 16/10/24 16:17, Hsin-Te Yuan ha scritto:
Quoted 11 lines
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 <[email protected]>Reviewed-by Matthias Brugger <[email protected]>Signed-off-by Hsin-Te Yuan <[email protected]>
Hi, Hsin-te:
Quoted 8 lines · Hsin-Te Yuan
External email : Please do not click links or open attachments until you have verified the sender or the content.
In commit9f428b95ac89("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.
Quoted 42 lines
Fixes 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in OVL")Reviewed-by Douglas Anderson <[email protected]>Reviewed-by Matthias Brugger <[email protected]>Signed-off-by Hsin-Te Yuan <[email protected]>---
Changes in v3:
- Add missing Reviewed-by tag
- Link to v2: https://lore.kernel.org/r/[email protected]Changes in v2:
- Clarify that the commit get fixed was intended to be a no-op cleanup
- Fix the typo in tag
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/mediatek/mtk_disp_ovl.c +2
-3@@ -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) ---base-commit:
75b607fab38d149f232f01eae5e6392b394dd659
change-id: 20241015-color-e205e75b64aaBest regards,
Signature · 1 line
Hsin-Te Yuan <[email protected]>
Hi, Hsin-te:
Hsin-Te Yuan <[email protected]> 於 2024年10月16日 週三 下午10:17寫道:
Quoted 7 lines
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.
Applied to mediatek-drm-fixes [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-fixes
Regards,
Chun-Kuang.
Quoted 42 lines
Fixes 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in OVL")Reviewed-by Douglas Anderson <[email protected]>Reviewed-by Matthias Brugger <[email protected]>Signed-off-by Hsin-Te Yuan <[email protected]>---
Changes in v3:
- Add missing Reviewed-by tag
- Link to v2: https://lore.kernel.org/r/[email protected]Changes in v2:
- Clarify that the commit get fixed was intended to be a no-op cleanup
- Fix the typo in tag
- Link to v1: https://lore.kernel.org/r/[email protected]--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/mediatek/mtk_disp_ovl.c +2
-3@@ -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) ---base-commit:
75b607fab38d149f232f01eae5e6392b394dd659
change-id: 20241015-color-e205e75b64aaBest regards,
--
Hsin-Te Yuan <[email protected]>