|
35 | 35 | DCCG_SRII(DTO_PARAM, DPPCLK, 2),\
|
36 | 36 | DCCG_SRII(DTO_PARAM, DPPCLK, 3),\
|
37 | 37 | SR(REFCLK_CNTL),\
|
| 38 | + DCCG_SRII(PIXEL_RATE_CNTL, OTG, 0),\ |
| 39 | + DCCG_SRII(PIXEL_RATE_CNTL, OTG, 1),\ |
38 | 40 | SR(DISPCLK_FREQ_CHANGE_CNTL)
|
39 | 41 |
|
40 | 42 | #define DCCG_REG_LIST_DCN2() \
|
41 | 43 | DCCG_COMMON_REG_LIST_DCN_BASE(),\
|
42 | 44 | DCCG_SRII(DTO_PARAM, DPPCLK, 4),\
|
43 |
| - DCCG_SRII(DTO_PARAM, DPPCLK, 5) |
| 45 | + DCCG_SRII(DTO_PARAM, DPPCLK, 5),\ |
| 46 | + DCCG_SRII(PIXEL_RATE_CNTL, OTG, 2),\ |
| 47 | + DCCG_SRII(PIXEL_RATE_CNTL, OTG, 3),\ |
| 48 | + DCCG_SRII(PIXEL_RATE_CNTL, OTG, 4),\ |
| 49 | + DCCG_SRII(PIXEL_RATE_CNTL, OTG, 5) |
44 | 50 |
|
45 | 51 | #define DCCG_SF(reg_name, field_name, post_fix)\
|
46 | 52 | .field_name = reg_name ## __ ## field_name ## post_fix
|
47 | 53 |
|
48 | 54 | #define DCCG_SFI(reg_name, field_name, field_prefix, inst, post_fix)\
|
49 | 55 | .field_prefix ## _ ## field_name[inst] = reg_name ## __ ## field_prefix ## inst ## _ ## field_name ## post_fix
|
50 | 56 |
|
| 57 | +#define DCCG_SFII(block, reg_name, field_prefix, field_name, inst, post_fix)\ |
| 58 | + .field_prefix ## _ ## field_name[inst] = block ## inst ## _ ## reg_name ## __ ## field_prefix ## inst ## _ ## field_name ## post_fix |
| 59 | + |
51 | 60 | #define DCCG_COMMON_MASK_SH_LIST_DCN_COMMON_BASE(mask_sh) \
|
52 | 61 | DCCG_SFI(DPPCLK_DTO_CTRL, DTO_ENABLE, DPPCLK, 0, mask_sh),\
|
53 | 62 | DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 0, mask_sh),\
|
|
68 | 77 | DCCG_SF(DISPCLK_FREQ_CHANGE_CNTL, DCCG_FIFO_ERRDET_RESET, mask_sh),\
|
69 | 78 | DCCG_SF(DISPCLK_FREQ_CHANGE_CNTL, DCCG_FIFO_ERRDET_STATE, mask_sh),\
|
70 | 79 | DCCG_SF(DISPCLK_FREQ_CHANGE_CNTL, DCCG_FIFO_ERRDET_OVR_EN, mask_sh),\
|
71 |
| - DCCG_SF(DISPCLK_FREQ_CHANGE_CNTL, DISPCLK_CHG_FWD_CORR_DISABLE, mask_sh) |
| 80 | + DCCG_SF(DISPCLK_FREQ_CHANGE_CNTL, DISPCLK_CHG_FWD_CORR_DISABLE, mask_sh),\ |
| 81 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 0, mask_sh),\ |
| 82 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 1, mask_sh),\ |
| 83 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 0, mask_sh),\ |
| 84 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 1, mask_sh) |
| 85 | + |
| 86 | + |
72 | 87 |
|
73 | 88 |
|
74 | 89 | #define DCCG_MASK_SH_LIST_DCN2(mask_sh) \
|
75 | 90 | DCCG_COMMON_MASK_SH_LIST_DCN_COMMON_BASE(mask_sh),\
|
76 | 91 | DCCG_SFI(DPPCLK_DTO_CTRL, DTO_ENABLE, DPPCLK, 4, mask_sh),\
|
77 | 92 | DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 4, mask_sh),\
|
78 | 93 | DCCG_SFI(DPPCLK_DTO_CTRL, DTO_ENABLE, DPPCLK, 5, mask_sh),\
|
79 |
| - DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 5, mask_sh) |
| 94 | + DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 5, mask_sh),\ |
| 95 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 2, mask_sh),\ |
| 96 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 3, mask_sh),\ |
| 97 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 4, mask_sh),\ |
| 98 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 5, mask_sh),\ |
| 99 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 2, mask_sh),\ |
| 100 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 3, mask_sh),\ |
| 101 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 4, mask_sh),\ |
| 102 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 5, mask_sh) |
| 103 | + |
| 104 | +#define DCCG_MASK_SH_LIST_DCN2_1(mask_sh) \ |
| 105 | + DCCG_COMMON_MASK_SH_LIST_DCN_COMMON_BASE(mask_sh),\ |
| 106 | + DCCG_SFI(DPPCLK_DTO_CTRL, DTO_ENABLE, DPPCLK, 4, mask_sh),\ |
| 107 | + DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 4, mask_sh),\ |
| 108 | + DCCG_SFI(DPPCLK_DTO_CTRL, DTO_ENABLE, DPPCLK, 5, mask_sh),\ |
| 109 | + DCCG_SFI(DPPCLK_DTO_CTRL, DTO_DB_EN, DPPCLK, 5, mask_sh),\ |
| 110 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 2, mask_sh),\ |
| 111 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 3, mask_sh),\ |
| 112 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 2, mask_sh),\ |
| 113 | + DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 3, mask_sh) |
| 114 | + |
80 | 115 |
|
81 | 116 | #define DCCG_REG_FIELD_LIST(type) \
|
82 | 117 | type DPPCLK0_DTO_PHASE;\
|
|
93 | 128 | type DCCG_FIFO_ERRDET_STATE;\
|
94 | 129 | type DCCG_FIFO_ERRDET_OVR_EN;\
|
95 | 130 | type DISPCLK_CHG_FWD_CORR_DISABLE;\
|
96 |
| - type DISPCLK_FREQ_CHANGE_CNTL; |
| 131 | + type DISPCLK_FREQ_CHANGE_CNTL;\ |
| 132 | + type OTG_ADD_PIXEL[MAX_PIPES];\ |
| 133 | + type OTG_DROP_PIXEL[MAX_PIPES]; |
97 | 134 |
|
98 | 135 | #define DCCG3_REG_FIELD_LIST(type) \
|
99 | 136 | type PHYASYMCLK_FORCE_EN;\
|
@@ -157,14 +194,14 @@ struct dccg_registers {
|
157 | 194 | uint32_t DPPCLK_DTO_PARAM[6];
|
158 | 195 | uint32_t REFCLK_CNTL;
|
159 | 196 | uint32_t DISPCLK_FREQ_CHANGE_CNTL;
|
| 197 | + uint32_t OTG_PIXEL_RATE_CNTL[MAX_PIPES]; |
160 | 198 | uint32_t HDMICHARCLK_CLOCK_CNTL[6];
|
161 | 199 | uint32_t PHYASYMCLK_CLOCK_CNTL;
|
162 | 200 | uint32_t PHYBSYMCLK_CLOCK_CNTL;
|
163 | 201 | uint32_t PHYCSYMCLK_CLOCK_CNTL;
|
164 | 202 | #if defined(CONFIG_DRM_AMD_DC_DCN3_1)
|
165 | 203 | uint32_t PHYDSYMCLK_CLOCK_CNTL;
|
166 | 204 | uint32_t PHYESYMCLK_CLOCK_CNTL;
|
167 |
| - uint32_t OTG_PIXEL_RATE_CNTL[MAX_PIPES]; |
168 | 205 | uint32_t DTBCLK_DTO_MODULO[MAX_PIPES];
|
169 | 206 | uint32_t DTBCLK_DTO_PHASE[MAX_PIPES];
|
170 | 207 | uint32_t DCCG_AUDIO_DTBCLK_DTO_MODULO;
|
@@ -193,6 +230,11 @@ void dccg2_get_dccg_ref_freq(struct dccg *dccg,
|
193 | 230 |
|
194 | 231 | void dccg2_set_fifo_errdet_ovr_en(struct dccg *dccg,
|
195 | 232 | bool en);
|
| 233 | +void dccg2_otg_add_pixel(struct dccg *dccg, |
| 234 | + uint32_t otg_inst); |
| 235 | +void dccg2_otg_drop_pixel(struct dccg *dccg, |
| 236 | + uint32_t otg_inst); |
| 237 | + |
196 | 238 |
|
197 | 239 | void dccg2_init(struct dccg *dccg);
|
198 | 240 |
|
|
0 commit comments