[PATCH 4/5] drm/rockchip: dw_hdmi_qp: Use bit macros for RK3576 regs
Cristian Ciocaltea
cristian.ciocaltea at collabora.com
Mon Jul 21 10:39:07 PDT 2025
For consistency and improved readability, redefine a few RK3576 specific
register configurations by relying on GENMASK() and unshifted values for
color depth and output format. Those are not used at the moment, but
will be needed soon to support the related features.
While at it, drop a few other defines which are unlikely to be ever
required.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea at collabora.com>
---
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index b2dd29347338d58640387adb2b455cc1558d4272..578ff5eb87f1e27b9bb9a6a299347b24b45381bb 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -38,21 +38,16 @@
#define RK3576_HDMI_HDCP14_MEM_EN BIT(15)
#define RK3576_VO0_GRF_SOC_CON8 0x0020
-#define RK3576_COLOR_FORMAT_MASK (0xf << 4)
-#define RK3576_COLOR_DEPTH_MASK (0xf << 8)
-#define RK3576_RGB (0 << 4)
-#define RK3576_YUV422 (0x1 << 4)
-#define RK3576_YUV444 (0x2 << 4)
-#define RK3576_YUV420 (0x3 << 4)
-#define RK3576_8BPC (0x0 << 8)
-#define RK3576_10BPC (0x6 << 8)
+#define RK3576_COLOR_DEPTH_MASK GENMASK(11, 8)
+#define RK3576_8BPC 0x0
+#define RK3576_10BPC 0x6
+#define RK3576_COLOR_FORMAT_MASK GENMASK(7, 4)
+#define RK3576_RGB 0x9
+#define RK3576_YUV422 0x1
+#define RK3576_YUV444 0x2
+#define RK3576_YUV420 0x3
#define RK3576_CECIN_MASK BIT(3)
-#define RK3576_VO0_GRF_SOC_CON12 0x0030
-#define RK3576_GRF_OSDA_DLYN (0xf << 12)
-#define RK3576_GRF_OSDA_DIV (0x7f << 1)
-#define RK3576_GRF_OSDA_DLY_EN BIT(0)
-
#define RK3576_VO0_GRF_SOC_CON14 0x0038
#define RK3576_I2S_SEL_MASK BIT(0)
#define RK3576_SPDIF_SEL_MASK BIT(1)
--
2.50.0
More information about the Linux-rockchip
mailing list