mirror of
https://github.com/LibreELEC/LibreELEC.tv
synced 2025-09-24 19:46:01 +07:00
57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
From e1838fe1d781997c5bdc1254089e28d880930922 Mon Sep 17 00:00:00 2001
|
|
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
|
Date: Mon, 25 Aug 2025 13:08:35 +0300
|
|
Subject: [PATCH 061/113] FROMLIST(v2): drm/rockchip: dw_hdmi_qp: Use bit
|
|
macros for RK3576 regs
|
|
|
|
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@collabora.com>
|
|
---
|
|
.../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 6f2006e7999b..0f2b421134af 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.34.1
|
|
|