Skip to content

Commit 5e66f6e

Browse files
Rodrigo Siqueiraalexdeucher
authored andcommitted
drm/amd/display: Add some missing HDMI registers for DCN3x
This commit add some missing HDMI control registers to DCN3x. Signed-off-by: Rodrigo Siqueira <[email protected]> Acked-by: Aurabindo Pillai <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent e023874 commit 5e66f6e

File tree

6 files changed

+32
-0
lines changed

6 files changed

+32
-0
lines changed

drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dccg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#define DCCG_REG_LIST_DCN30() \
3333
DCCG_REG_LIST_DCN2(),\
34+
DCCG_SRII(CLOCK_CNTL, HDMICHARCLK, 0),\
3435
DCCG_SRII(PIXEL_RATE_CNTL, OTG, 2),\
3536
DCCG_SRII(PIXEL_RATE_CNTL, OTG, 3),\
3637
DCCG_SRII(PIXEL_RATE_CNTL, OTG, 4),\
@@ -41,6 +42,8 @@
4142

4243
#define DCCG_MASK_SH_LIST_DCN3(mask_sh) \
4344
DCCG_MASK_SH_LIST_DCN2(mask_sh),\
45+
DCCG_SF(HDMICHARCLK0_CLOCK_CNTL, HDMICHARCLK0_EN, mask_sh),\
46+
DCCG_SF(HDMICHARCLK0_CLOCK_CNTL, HDMICHARCLK0_SRC_SEL, mask_sh),\
4447
DCCG_SF(PHYASYMCLK_CLOCK_CNTL, PHYASYMCLK_FORCE_EN, mask_sh),\
4548
DCCG_SF(PHYASYMCLK_CLOCK_CNTL, PHYASYMCLK_FORCE_SRC_SEL, mask_sh),\
4649
DCCG_SF(PHYBSYMCLK_CLOCK_CNTL, PHYBSYMCLK_FORCE_EN, mask_sh),\

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
DCCG_SRII(DTO_PARAM, DPPCLK, 1),\
3535
DCCG_SRII(DTO_PARAM, DPPCLK, 2),\
3636
DCCG_SRII(DTO_PARAM, DPPCLK, 3),\
37+
DCCG_SRII(CLOCK_CNTL, HDMICHARCLK, 0),\
3738
SR(PHYASYMCLK_CLOCK_CNTL),\
3839
SR(PHYBSYMCLK_CLOCK_CNTL),\
3940
SR(PHYCSYMCLK_CLOCK_CNTL),\
4041
SR(PHYDSYMCLK_CLOCK_CNTL),\
4142
SR(PHYESYMCLK_CLOCK_CNTL),\
4243
SR(DPSTREAMCLK_CNTL),\
44+
SR(HDMISTREAMCLK_CNTL),\
4345
SR(SYMCLK32_SE_CNTL),\
4446
SR(SYMCLK32_LE_CNTL),\
4547
DCCG_SRII(PIXEL_RATE_CNTL, OTG, 0),\
@@ -78,6 +80,8 @@
7880
DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 3, mask_sh),\
7981
DCCG_SF(DPPCLK0_DTO_PARAM, DPPCLK0_DTO_PHASE, mask_sh),\
8082
DCCG_SF(DPPCLK0_DTO_PARAM, DPPCLK0_DTO_MODULO, mask_sh),\
83+
DCCG_SF(HDMICHARCLK0_CLOCK_CNTL, HDMICHARCLK0_EN, mask_sh),\
84+
DCCG_SF(HDMICHARCLK0_CLOCK_CNTL, HDMICHARCLK0_SRC_SEL, mask_sh),\
8185
DCCG_SF(PHYASYMCLK_CLOCK_CNTL, PHYASYMCLK_FORCE_EN, mask_sh),\
8286
DCCG_SF(PHYASYMCLK_CLOCK_CNTL, PHYASYMCLK_FORCE_SRC_SEL, mask_sh),\
8387
DCCG_SF(PHYBSYMCLK_CLOCK_CNTL, PHYBSYMCLK_FORCE_EN, mask_sh),\
@@ -92,6 +96,8 @@
9296
DCCG_SF(DPSTREAMCLK_CNTL, DPSTREAMCLK_PIPE1_EN, mask_sh),\
9397
DCCG_SF(DPSTREAMCLK_CNTL, DPSTREAMCLK_PIPE2_EN, mask_sh),\
9498
DCCG_SF(DPSTREAMCLK_CNTL, DPSTREAMCLK_PIPE3_EN, mask_sh),\
99+
DCCG_SF(HDMISTREAMCLK_CNTL, HDMISTREAMCLK0_SRC_SEL, mask_sh),\
100+
DCCG_SF(HDMISTREAMCLK_CNTL, HDMISTREAMCLK0_DTO_FORCE_DIS, mask_sh),\
95101
DCCG_SF(SYMCLK32_SE_CNTL, SYMCLK32_SE0_SRC_SEL, mask_sh),\
96102
DCCG_SF(SYMCLK32_SE_CNTL, SYMCLK32_SE1_SRC_SEL, mask_sh),\
97103
DCCG_SF(SYMCLK32_SE_CNTL, SYMCLK32_SE2_SRC_SEL, mask_sh),\

drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_offset.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@
311311
#define mmPHYESYMCLK_CLOCK_CNTL_BASE_IDX 2
312312
#define mmPHYFSYMCLK_CLOCK_CNTL 0x0057
313313
#define mmPHYFSYMCLK_CLOCK_CNTL_BASE_IDX 2
314+
#define regHDMICHARCLK0_CLOCK_CNTL 0x004a
315+
#define regHDMICHARCLK0_CLOCK_CNTL_BASE_IDX 2
316+
#define mmHDMICHARCLK0_CLOCK_CNTL 0x004a
317+
#define mmHDMICHARCLK0_CLOCK_CNTL_BASE_IDX 2
314318

315319

316320
// addressBlock: dce_dc_dccg_dccg_dfs_dispdec

drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_0_0_sh_mask.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,11 @@
11891189
#define PHYFSYMCLK_CLOCK_CNTL__PHYFSYMCLK_FORCE_SRC_SEL__SHIFT 0x4
11901190
#define PHYFSYMCLK_CLOCK_CNTL__PHYFSYMCLK_FORCE_EN_MASK 0x00000001L
11911191
#define PHYFSYMCLK_CLOCK_CNTL__PHYFSYMCLK_FORCE_SRC_SEL_MASK 0x00000010L
1192+
//HDMICHARCLK0_CLOCK_CNTL
1193+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_EN__SHIFT 0x0
1194+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_SRC_SEL__SHIFT 0x4
1195+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_EN_MASK 0x00000001L
1196+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_SRC_SEL_MASK 0x00000070L
11921197

11931198

11941199
// addressBlock: dce_dc_dccg_dccg_dfs_dispdec

drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_1_5_offset.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@
213213
#define regDTBCLK_DTO2_MODULO_BASE_IDX 2
214214
#define regDTBCLK_DTO3_MODULO 0x0022
215215
#define regDTBCLK_DTO3_MODULO_BASE_IDX 2
216+
#define regHDMICHARCLK0_CLOCK_CNTL 0x004a
217+
#define regHDMICHARCLK0_CLOCK_CNTL_BASE_IDX 2
216218
#define regPHYASYMCLK_CLOCK_CNTL 0x0052
217219
#define regPHYASYMCLK_CLOCK_CNTL_BASE_IDX 2
218220
#define regPHYBSYMCLK_CLOCK_CNTL 0x0053
@@ -233,6 +235,8 @@
233235
#define regDCCG_AUDIO_DTBCLK_DTO_MODULO_BASE_IDX 2
234236
#define regDTBCLK_DTO_DBUF_EN 0x0063
235237
#define regDTBCLK_DTO_DBUF_EN_BASE_IDX 2
238+
#define regHDMISTREAMCLK_CNTL 0x0059
239+
#define regHDMISTREAMCLK_CNTL_BASE_IDX 2
236240

237241

238242
// addressBlock: dce_dc_dccg_dccg_dcperfmon0_dc_perfmon_dispdec

drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_3_1_5_sh_mask.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,11 @@
886886
//DTBCLK_DTO3_MODULO
887887
#define DTBCLK_DTO3_MODULO__DTBCLK_DTO3_MODULO__SHIFT 0x0
888888
#define DTBCLK_DTO3_MODULO__DTBCLK_DTO3_MODULO_MASK 0xFFFFFFFFL
889+
//HDMICHARCLK0_CLOCK_CNTL
890+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_EN__SHIFT 0x0
891+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_SRC_SEL__SHIFT 0x4
892+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_EN_MASK 0x00000001L
893+
#define HDMICHARCLK0_CLOCK_CNTL__HDMICHARCLK0_SRC_SEL_MASK 0x00000070L
889894
//PHYASYMCLK_CLOCK_CNTL
890895
#define PHYASYMCLK_CLOCK_CNTL__PHYASYMCLK_FORCE_EN__SHIFT 0x0
891896
#define PHYASYMCLK_CLOCK_CNTL__PHYASYMCLK_FORCE_SRC_SEL__SHIFT 0x4
@@ -911,6 +916,11 @@
911916
#define PHYESYMCLK_CLOCK_CNTL__PHYESYMCLK_FORCE_SRC_SEL__SHIFT 0x4
912917
#define PHYESYMCLK_CLOCK_CNTL__PHYESYMCLK_FORCE_EN_MASK 0x00000001L
913918
#define PHYESYMCLK_CLOCK_CNTL__PHYESYMCLK_FORCE_SRC_SEL_MASK 0x00000030L
919+
//HDMISTREAMCLK_CNTL
920+
#define HDMISTREAMCLK_CNTL__HDMISTREAMCLK0_SRC_SEL__SHIFT 0x0
921+
#define HDMISTREAMCLK_CNTL__HDMISTREAMCLK0_DTO_FORCE_DIS__SHIFT 0x10
922+
#define HDMISTREAMCLK_CNTL__HDMISTREAMCLK0_SRC_SEL_MASK 0x00000003L
923+
#define HDMISTREAMCLK_CNTL__HDMISTREAMCLK0_DTO_FORCE_DIS_MASK 0x00010000L
914924
//DCCG_GATE_DISABLE_CNTL3
915925
#define DCCG_GATE_DISABLE_CNTL3__HDMISTREAMCLK0_GATE_DISABLE__SHIFT 0x0
916926
#define DCCG_GATE_DISABLE_CNTL3__HDMISTREAMCLK1_GATE_DISABLE__SHIFT 0x1

0 commit comments

Comments
 (0)