Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Wait for all pending cleared before full update

[Description]
Before every full update we must wait for all pending updates to be
cleared - this is particularly important for minimal transitions
because if we don't wait for pending cleared, it will be as if
there was no minimal transition at all. In OTG we must read 3 different
status registers for pending cleared, one specifically for OTG updates,
one specifically for OPTC updates, and the last for surface related
updates.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alvin Lee and committed by
Alex Deucher
faee3edf 352c3165

+161 -34
+7 -2
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
··· 1071 1071 if (!pipe_ctx->stream) 1072 1072 continue; 1073 1073 1074 - if (pipe_ctx->stream_res.tg->funcs->wait_drr_doublebuffer_pending_clear) 1075 - pipe_ctx->stream_res.tg->funcs->wait_drr_doublebuffer_pending_clear(pipe_ctx->stream_res.tg); 1074 + /* For full update we must wait for all double buffer updates, not just DRR updates. This 1075 + * is particularly important for minimal transitions. Only check for OTG_MASTER pipes, 1076 + * as non-OTG Master pipes share the same OTG as 1077 + */ 1078 + if (resource_is_pipe_type(pipe_ctx, OTG_MASTER) && dc->hwss.wait_for_all_pending_updates) { 1079 + dc->hwss.wait_for_all_pending_updates(pipe_ctx); 1080 + } 1076 1081 1077 1082 hubp = pipe_ctx->plane_res.hubp; 1078 1083 if (!hubp)
+2 -2
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
··· 2255 2255 struct timing_generator *tg = pipe->stream_res.tg; 2256 2256 2257 2257 2258 - if (tg->funcs->get_double_buffer_pending) { 2258 + if (tg->funcs->get_optc_double_buffer_pending) { 2259 2259 for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_US / polling_interval_us 2260 - && tg->funcs->get_double_buffer_pending(tg); j++) 2260 + && tg->funcs->get_optc_double_buffer_pending(tg); j++) 2261 2261 udelay(polling_interval_us); 2262 2262 } 2263 2263 }
+27
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
··· 1185 1185 if (!dc->clk_mgr->clks.fw_based_mclk_switching) 1186 1186 dc_dmub_srv_p_state_delegate(dc, false, context); 1187 1187 } 1188 + 1189 + void dcn30_wait_for_all_pending_updates(const struct pipe_ctx *pipe_ctx) 1190 + { 1191 + struct timing_generator *tg = pipe_ctx->stream_res.tg; 1192 + bool pending_updates = false; 1193 + unsigned int i; 1194 + 1195 + if (tg && tg->funcs->is_tg_enabled(tg)) { 1196 + // Poll for 100ms maximum 1197 + for (i = 0; i < 100000; i++) { 1198 + pending_updates = false; 1199 + if (tg->funcs->get_optc_double_buffer_pending) 1200 + pending_updates |= tg->funcs->get_optc_double_buffer_pending(tg); 1201 + 1202 + if (tg->funcs->get_otg_double_buffer_pending) 1203 + pending_updates |= tg->funcs->get_otg_double_buffer_pending(tg); 1204 + 1205 + if (tg->funcs->get_pipe_update_pending && pipe_ctx->plane_state) 1206 + pending_updates |= tg->funcs->get_pipe_update_pending(tg); 1207 + 1208 + if (!pending_updates) 1209 + break; 1210 + 1211 + udelay(1); 1212 + } 1213 + } 1214 + }
+2
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.h
··· 96 96 void dcn30_prepare_bandwidth(struct dc *dc, 97 97 struct dc_state *context); 98 98 99 + void dcn30_wait_for_all_pending_updates(const struct pipe_ctx *pipe_ctx); 100 + 99 101 #endif /* __DC_HWSS_DCN30_H__ */
+2 -1
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_init.c
··· 108 108 .set_disp_pattern_generator = dcn30_set_disp_pattern_generator, 109 109 .get_dcc_en_bits = dcn10_get_dcc_en_bits, 110 110 .update_visual_confirm_color = dcn10_update_visual_confirm_color, 111 - .is_abm_supported = dcn21_is_abm_supported 111 + .is_abm_supported = dcn21_is_abm_supported, 112 + .wait_for_all_pending_updates = dcn30_wait_for_all_pending_updates, 112 113 }; 113 114 114 115 static const struct hwseq_private_funcs dcn30_private_funcs = {
+1
drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.c
··· 107 107 .optimize_pwr_state = dcn21_optimize_pwr_state, 108 108 .exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state, 109 109 .update_visual_confirm_color = dcn10_update_visual_confirm_color, 110 + .wait_for_all_pending_updates = dcn30_wait_for_all_pending_updates, 110 111 }; 111 112 112 113 static const struct hwseq_private_funcs dcn301_private_funcs = {
+1
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_init.c
··· 121 121 .is_pipe_topology_transition_seamless = dcn32_is_pipe_topology_transition_seamless, 122 122 .calculate_pix_rate_divider = dcn32_calculate_pix_rate_divider, 123 123 .program_outstanding_updates = dcn32_program_outstanding_updates, 124 + .wait_for_all_pending_updates = dcn30_wait_for_all_pending_updates, 124 125 }; 125 126 126 127 static const struct hwseq_private_funcs dcn32_private_funcs = {
+1
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c
··· 100 100 .fams2_update_config = dcn401_fams2_update_config, 101 101 .fams2_global_control_lock_fast = dcn401_fams2_global_control_lock_fast, 102 102 .program_outstanding_updates = dcn401_program_outstanding_updates, 103 + .wait_for_all_pending_updates = dcn30_wait_for_all_pending_updates, 103 104 }; 104 105 105 106 static const struct hwseq_private_funcs dcn401_private_funcs = {
+1
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
··· 462 462 void (*program_outstanding_updates)(struct dc *dc, 463 463 struct dc_state *context); 464 464 void (*setup_hpo_hw_control)(const struct dce_hwseq *hws, bool enable); 465 + void (*wait_for_all_pending_updates)(const struct pipe_ctx *pipe_ctx); 465 466 }; 466 467 467 468 void color_space_to_black_color(
+3 -1
drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
··· 342 342 void (*wait_drr_doublebuffer_pending_clear)(struct timing_generator *tg); 343 343 void (*set_long_vtotal)(struct timing_generator *optc, const struct long_vtotal_params *params); 344 344 void (*wait_odm_doublebuffer_pending_clear)(struct timing_generator *tg); 345 - bool (*get_double_buffer_pending)(struct timing_generator *tg); 345 + bool (*get_optc_double_buffer_pending)(struct timing_generator *tg); 346 + bool (*get_otg_double_buffer_pending)(struct timing_generator *tg); 347 + bool (*get_pipe_update_pending)(struct timing_generator *tg); 346 348 }; 347 349 348 350 #endif
+9
drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.h
··· 202 202 uint32_t OPTC_CLOCK_CONTROL; 203 203 uint32_t OPTC_WIDTH_CONTROL2; 204 204 uint32_t OTG_PSTATE_REGISTER; 205 + uint32_t OTG_PIPE_UPDATE_STATUS; 205 206 }; 206 207 207 208 #define TG_COMMON_MASK_SH_LIST_DCN(mask_sh)\ ··· 567 566 type OTG_H_TIMING_DIV_MODE_DB_UPDATE_PENDING;\ 568 567 type OPTC_DOUBLE_BUFFER_PENDING;\ 569 568 569 + #define TG_REG_FIELD_LIST_DCN2_0(type) \ 570 + type OTG_FLIP_PENDING;\ 571 + type OTG_DC_REG_UPDATE_PENDING;\ 572 + type OTG_CURSOR_UPDATE_PENDING;\ 573 + type OTG_VUPDATE_KEEPOUT_STATUS;\ 574 + 570 575 #define TG_REG_FIELD_LIST_DCN3_2(type) \ 571 576 type OTG_H_TIMING_DIV_MODE_MANUAL; 572 577 ··· 607 600 608 601 struct dcn_optc_shift { 609 602 TG_REG_FIELD_LIST(uint8_t) 603 + TG_REG_FIELD_LIST_DCN2_0(uint8_t) 610 604 TG_REG_FIELD_LIST_DCN3_2(uint8_t) 611 605 TG_REG_FIELD_LIST_DCN3_5(uint8_t) 612 606 TG_REG_FIELD_LIST_DCN401(uint8_t) ··· 615 607 616 608 struct dcn_optc_mask { 617 609 TG_REG_FIELD_LIST(uint32_t) 610 + TG_REG_FIELD_LIST_DCN2_0(uint32_t) 618 611 TG_REG_FIELD_LIST_DCN3_2(uint32_t) 619 612 TG_REG_FIELD_LIST_DCN3_5(uint32_t) 620 613 TG_REG_FIELD_LIST_DCN401(uint32_t)
+6 -1
drivers/gpu/drm/amd/display/dc/optc/dcn20/dcn20_optc.h
··· 43 43 SRI(OPTC_MEMORY_CONFIG, ODM, inst),\ 44 44 SR(DWB_SOURCE_SELECT),\ 45 45 SRI(OTG_MANUAL_FLOW_CONTROL, OTG, inst), \ 46 - SRI(OTG_DRR_CONTROL, OTG, inst) 46 + SRI(OTG_DRR_CONTROL, OTG, inst),\ 47 + SRI(OTG_PIPE_UPDATE_STATUS, OTG, inst) 47 48 48 49 #define TG_COMMON_MASK_SH_LIST_DCN2_0(mask_sh)\ 49 50 TG_COMMON_MASK_SH_LIST_DCN(mask_sh),\ ··· 54 53 SF(OTG0_OTG_GLOBAL_CONTROL2, GLOBAL_UPDATE_LOCK_EN, mask_sh),\ 55 54 SF(OTG0_OTG_GLOBAL_CONTROL2, DIG_UPDATE_LOCATION, mask_sh),\ 56 55 SF(OTG0_OTG_DOUBLE_BUFFER_CONTROL, OTG_RANGE_TIMING_DBUF_UPDATE_MODE, mask_sh),\ 56 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_FLIP_PENDING, mask_sh),\ 57 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_DC_REG_UPDATE_PENDING, mask_sh),\ 58 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_CURSOR_UPDATE_PENDING, mask_sh),\ 59 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_VUPDATE_KEEPOUT_STATUS, mask_sh),\ 57 60 SF(OTG0_OTG_GSL_WINDOW_X, OTG_GSL_WINDOW_START_X, mask_sh),\ 58 61 SF(OTG0_OTG_GSL_WINDOW_X, OTG_GSL_WINDOW_END_X, mask_sh), \ 59 62 SF(OTG0_OTG_GSL_WINDOW_Y, OTG_GSL_WINDOW_START_Y, mask_sh),\
+45
drivers/gpu/drm/amd/display/dc/optc/dcn30/dcn30_optc.c
··· 271 271 optc1->opp_count = opp_cnt; 272 272 } 273 273 274 + /* OTG status register that indicates OPTC update is pending */ 275 + bool optc3_get_optc_double_buffer_pending(struct timing_generator *optc) 276 + { 277 + struct optc *optc1 = DCN10TG_FROM_TG(optc); 278 + uint32_t update_pending = 0; 279 + 280 + REG_GET(OPTC_INPUT_GLOBAL_CONTROL, 281 + OPTC_DOUBLE_BUFFER_PENDING, 282 + &update_pending); 283 + 284 + return (update_pending == 1); 285 + } 286 + 287 + /* OTG status register that indicates OTG update is pending */ 288 + bool optc3_get_otg_update_pending(struct timing_generator *optc) 289 + { 290 + struct optc *optc1 = DCN10TG_FROM_TG(optc); 291 + uint32_t update_pending = 0; 292 + 293 + REG_GET(OTG_DOUBLE_BUFFER_CONTROL, 294 + OTG_UPDATE_PENDING, 295 + &update_pending); 296 + 297 + return (update_pending == 1); 298 + } 299 + 300 + /* OTG status register that indicates surface update is pending */ 301 + bool optc3_get_pipe_update_pending(struct timing_generator *optc) 302 + { 303 + struct optc *optc1 = DCN10TG_FROM_TG(optc); 304 + uint32_t flip_pending = 0; 305 + uint32_t dc_update_pending = 0; 306 + 307 + REG_GET_2(OTG_PIPE_UPDATE_STATUS, 308 + OTG_FLIP_PENDING, 309 + &flip_pending, 310 + OTG_DC_REG_UPDATE_PENDING, 311 + &dc_update_pending); 312 + 313 + return (flip_pending == 1 || dc_update_pending == 1); 314 + } 315 + 274 316 /** 275 317 * optc3_set_timing_double_buffer() - DRR double buffering control 276 318 * ··· 417 375 .get_hw_timing = optc1_get_hw_timing, 418 376 .wait_drr_doublebuffer_pending_clear = optc3_wait_drr_doublebuffer_pending_clear, 419 377 .is_two_pixels_per_container = optc1_is_two_pixels_per_container, 378 + .get_optc_double_buffer_pending = optc3_get_optc_double_buffer_pending, 379 + .get_otg_double_buffer_pending = optc3_get_otg_update_pending, 380 + .get_pipe_update_pending = optc3_get_pipe_update_pending, 420 381 }; 421 382 422 383 void dcn30_timing_generator_init(struct optc *optc1)
+11 -2
drivers/gpu/drm/amd/display/dc/optc/dcn30/dcn30_optc.h
··· 109 109 SRI(OPTC_BYTES_PER_PIXEL, ODM, inst),\ 110 110 SRI(OPTC_WIDTH_CONTROL, ODM, inst),\ 111 111 SRI(OPTC_MEMORY_CONFIG, ODM, inst),\ 112 - SR(DWB_SOURCE_SELECT) 112 + SR(DWB_SOURCE_SELECT),\ 113 + SRI(OTG_PIPE_UPDATE_STATUS, OTG, inst) 113 114 114 115 #define DCN30_VTOTAL_REGS_SF(mask_sh) 115 116 ··· 210 209 SF(ODM0_OPTC_INPUT_CLOCK_CONTROL, OPTC_INPUT_CLK_GATE_DIS, mask_sh),\ 211 210 SF(ODM0_OPTC_INPUT_GLOBAL_CONTROL, OPTC_UNDERFLOW_OCCURRED_STATUS, mask_sh),\ 212 211 SF(ODM0_OPTC_INPUT_GLOBAL_CONTROL, OPTC_UNDERFLOW_CLEAR, mask_sh),\ 212 + SF(ODM0_OPTC_INPUT_GLOBAL_CONTROL, OPTC_DOUBLE_BUFFER_PENDING, mask_sh),\ 213 213 SF(VTG0_CONTROL, VTG0_ENABLE, mask_sh),\ 214 214 SF(VTG0_CONTROL, VTG0_FP2, mask_sh),\ 215 215 SF(VTG0_CONTROL, VTG0_VCOUNT_INIT, mask_sh),\ ··· 321 319 SF(OTG0_OTG_DRR_V_TOTAL_CHANGE, OTG_DRR_V_TOTAL_CHANGE_LIMIT, mask_sh),\ 322 320 SF(OTG0_OTG_H_TIMING_CNTL, OTG_H_TIMING_DIV_MODE, mask_sh),\ 323 321 SF(OTG0_OTG_DOUBLE_BUFFER_CONTROL, OTG_DRR_TIMING_DBUF_UPDATE_PENDING, mask_sh),\ 324 - SF(OTG0_OTG_DOUBLE_BUFFER_CONTROL, OTG_DRR_TIMING_DBUF_UPDATE_MODE, mask_sh) 322 + SF(OTG0_OTG_DOUBLE_BUFFER_CONTROL, OTG_DRR_TIMING_DBUF_UPDATE_MODE, mask_sh),\ 323 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_FLIP_PENDING, mask_sh),\ 324 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_DC_REG_UPDATE_PENDING, mask_sh),\ 325 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_CURSOR_UPDATE_PENDING, mask_sh),\ 326 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_VUPDATE_KEEPOUT_STATUS, mask_sh),\ 325 327 326 328 void dcn30_timing_generator_init(struct optc *optc1); 327 329 ··· 362 356 void optc3_wait_drr_doublebuffer_pending_clear(struct timing_generator *optc); 363 357 void optc3_tg_init(struct timing_generator *optc); 364 358 void optc3_set_vtotal_min_max(struct timing_generator *optc, int vtotal_min, int vtotal_max); 359 + bool optc3_get_optc_double_buffer_pending(struct timing_generator *optc); 360 + bool optc3_get_otg_update_pending(struct timing_generator *optc); 361 + bool optc3_get_pipe_update_pending(struct timing_generator *optc); 365 362 #endif /* __DC_OPTC_DCN30_H__ */
+3
drivers/gpu/drm/amd/display/dc/optc/dcn301/dcn301_optc.c
··· 169 169 .get_hw_timing = optc1_get_hw_timing, 170 170 .wait_drr_doublebuffer_pending_clear = optc3_wait_drr_doublebuffer_pending_clear, 171 171 .is_two_pixels_per_container = optc1_is_two_pixels_per_container, 172 + .get_optc_double_buffer_pending = optc3_get_optc_double_buffer_pending, 173 + .get_otg_double_buffer_pending = optc3_get_otg_update_pending, 174 + .get_pipe_update_pending = optc3_get_pipe_update_pending, 172 175 }; 173 176 174 177 void dcn301_timing_generator_init(struct optc *optc1)
+7 -2
drivers/gpu/drm/amd/display/dc/optc/dcn31/dcn31_optc.h
··· 99 99 SRI(OPTC_MEMORY_CONFIG, ODM, inst),\ 100 100 SRI(OTG_CRC_CNTL2, OTG, inst),\ 101 101 SR(DWB_SOURCE_SELECT),\ 102 - SRI(OTG_DRR_CONTROL, OTG, inst) 102 + SRI(OTG_DRR_CONTROL, OTG, inst),\ 103 + SRI(OTG_PIPE_UPDATE_STATUS, OTG, inst) 103 104 104 105 #define OPTC_COMMON_MASK_SH_LIST_DCN3_1(mask_sh)\ 105 106 SF(OTG0_OTG_VSTARTUP_PARAM, VSTARTUP_START, mask_sh),\ ··· 255 254 SF(OTG0_OTG_CRC_CNTL2, OTG_CRC_DATA_STREAM_COMBINE_MODE, mask_sh),\ 256 255 SF(OTG0_OTG_CRC_CNTL2, OTG_CRC_DATA_STREAM_SPLIT_MODE, mask_sh),\ 257 256 SF(OTG0_OTG_CRC_CNTL2, OTG_CRC_DATA_FORMAT, mask_sh),\ 258 - SF(OTG0_OTG_DRR_CONTROL, OTG_V_TOTAL_LAST_USED_BY_DRR, mask_sh) 257 + SF(OTG0_OTG_DRR_CONTROL, OTG_V_TOTAL_LAST_USED_BY_DRR, mask_sh),\ 258 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_FLIP_PENDING, mask_sh),\ 259 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_DC_REG_UPDATE_PENDING, mask_sh),\ 260 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_CURSOR_UPDATE_PENDING, mask_sh),\ 261 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_VUPDATE_KEEPOUT_STATUS, mask_sh),\ 259 262 260 263 void dcn31_timing_generator_init(struct optc *optc1); 261 264
+7 -2
drivers/gpu/drm/amd/display/dc/optc/dcn314/dcn314_optc.h
··· 98 98 SRI(OPTC_BYTES_PER_PIXEL, ODM, inst),\ 99 99 SRI(OPTC_WIDTH_CONTROL, ODM, inst),\ 100 100 SRI(OPTC_MEMORY_CONFIG, ODM, inst),\ 101 - SRI(OTG_DRR_CONTROL, OTG, inst) 101 + SRI(OTG_DRR_CONTROL, OTG, inst),\ 102 + SRI(OTG_PIPE_UPDATE_STATUS, OTG, inst) 102 103 103 104 #define OPTC_COMMON_MASK_SH_LIST_DCN3_14(mask_sh)\ 104 105 SF(OTG0_OTG_VSTARTUP_PARAM, VSTARTUP_START, mask_sh),\ ··· 249 248 SF(OTG0_OTG_H_TIMING_CNTL, OTG_H_TIMING_DIV_MODE, mask_sh),\ 250 249 SF(OTG0_OTG_H_TIMING_CNTL, OTG_H_TIMING_DIV_MODE_MANUAL, mask_sh),\ 251 250 SF(OTG0_OTG_DOUBLE_BUFFER_CONTROL, OTG_DRR_TIMING_DBUF_UPDATE_MODE, mask_sh),\ 252 - SF(OTG0_OTG_DRR_CONTROL, OTG_V_TOTAL_LAST_USED_BY_DRR, mask_sh) 251 + SF(OTG0_OTG_DRR_CONTROL, OTG_V_TOTAL_LAST_USED_BY_DRR, mask_sh),\ 252 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_FLIP_PENDING, mask_sh),\ 253 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_DC_REG_UPDATE_PENDING, mask_sh),\ 254 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_CURSOR_UPDATE_PENDING, mask_sh),\ 255 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_VUPDATE_KEEPOUT_STATUS, mask_sh),\ 253 256 254 257 void dcn314_timing_generator_init(struct optc *optc1); 255 258
+3 -13
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.c
··· 297 297 optc32_setup_manual_trigger(optc); 298 298 } 299 299 300 - bool optc32_get_double_buffer_pending(struct timing_generator *optc) 301 - { 302 - struct optc *optc1 = DCN10TG_FROM_TG(optc); 303 - uint32_t update_pending = 0; 304 - 305 - REG_GET(OPTC_INPUT_GLOBAL_CONTROL, 306 - OPTC_DOUBLE_BUFFER_PENDING, 307 - &update_pending); 308 - 309 - return (update_pending == 1); 310 - } 311 - 312 300 static struct timing_generator_funcs dcn32_tg_funcs = { 313 301 .validate_timing = optc1_validate_timing, 314 302 .program_timing = optc1_program_timing, ··· 361 373 .setup_manual_trigger = optc2_setup_manual_trigger, 362 374 .get_hw_timing = optc1_get_hw_timing, 363 375 .is_two_pixels_per_container = optc1_is_two_pixels_per_container, 364 - .get_double_buffer_pending = optc32_get_double_buffer_pending, 376 + .get_optc_double_buffer_pending = optc3_get_optc_double_buffer_pending, 377 + .get_otg_double_buffer_pending = optc3_get_otg_update_pending, 378 + .get_pipe_update_pending = optc3_get_pipe_update_pending, 365 379 }; 366 380 367 381 void dcn32_timing_generator_init(struct optc *optc1)
+5 -2
drivers/gpu/drm/amd/display/dc/optc/dcn32/dcn32_optc.h
··· 177 177 SF(OTG0_OTG_H_TIMING_CNTL, OTG_H_TIMING_DIV_MODE, mask_sh),\ 178 178 SF(OTG0_OTG_H_TIMING_CNTL, OTG_H_TIMING_DIV_MODE_MANUAL, mask_sh),\ 179 179 SF(OTG0_OTG_DOUBLE_BUFFER_CONTROL, OTG_DRR_TIMING_DBUF_UPDATE_MODE, mask_sh),\ 180 - SF(OTG0_OTG_DRR_CONTROL, OTG_V_TOTAL_LAST_USED_BY_DRR, mask_sh) 180 + SF(OTG0_OTG_DRR_CONTROL, OTG_V_TOTAL_LAST_USED_BY_DRR, mask_sh),\ 181 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_FLIP_PENDING, mask_sh),\ 182 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_DC_REG_UPDATE_PENDING, mask_sh),\ 183 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_CURSOR_UPDATE_PENDING, mask_sh),\ 184 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_VUPDATE_KEEPOUT_STATUS, mask_sh) 181 185 182 186 void dcn32_timing_generator_init(struct optc *optc1); 183 187 void optc32_set_h_timing_div_manual_mode(struct timing_generator *optc, bool manual_mode); ··· 189 185 void optc32_set_odm_bypass(struct timing_generator *optc, 190 186 const struct dc_crtc_timing *dc_crtc_timing); 191 187 void optc32_wait_odm_doublebuffer_pending_clear(struct timing_generator *tg); 192 - bool optc32_get_double_buffer_pending(struct timing_generator *optc); 193 188 194 189 #endif /* __DC_OPTC_DCN32_H__ */
+5 -1
drivers/gpu/drm/amd/display/dc/optc/dcn35/dcn35_optc.h
··· 67 67 SF(OTG0_OTG_CRC1_WINDOWB_Y_CONTROL_READBACK, OTG_CRC1_WINDOWB_Y_END_READBACK, mask_sh),\ 68 68 SF(OPTC_CLOCK_CONTROL, OPTC_FGCG_REP_DIS, mask_sh),\ 69 69 SF(OTG0_OTG_V_COUNT_STOP_CONTROL, OTG_V_COUNT_STOP, mask_sh),\ 70 - SF(OTG0_OTG_V_COUNT_STOP_CONTROL2, OTG_V_COUNT_STOP_TIMER, mask_sh) 70 + SF(OTG0_OTG_V_COUNT_STOP_CONTROL2, OTG_V_COUNT_STOP_TIMER, mask_sh),\ 71 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_FLIP_PENDING, mask_sh),\ 72 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_DC_REG_UPDATE_PENDING, mask_sh),\ 73 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_CURSOR_UPDATE_PENDING, mask_sh),\ 74 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_VUPDATE_KEEPOUT_STATUS, mask_sh) 71 75 72 76 void dcn35_timing_generator_init(struct optc *optc1); 73 77
+3 -1
drivers/gpu/drm/amd/display/dc/optc/dcn401/dcn401_optc.c
··· 493 493 .setup_manual_trigger = optc2_setup_manual_trigger, 494 494 .get_hw_timing = optc1_get_hw_timing, 495 495 .is_two_pixels_per_container = optc1_is_two_pixels_per_container, 496 - .get_double_buffer_pending = optc32_get_double_buffer_pending, 496 + .get_optc_double_buffer_pending = optc3_get_optc_double_buffer_pending, 497 + .get_otg_double_buffer_pending = optc3_get_otg_update_pending, 498 + .get_pipe_update_pending = optc3_get_pipe_update_pending, 497 499 }; 498 500 499 501 void dcn401_timing_generator_init(struct optc *optc1)
+5 -1
drivers/gpu/drm/amd/display/dc/optc/dcn401/dcn401_optc.h
··· 159 159 SF(OTG0_OTG_PSTATE_REGISTER, OTG_PSTATE_KEEPOUT_START, mask_sh),\ 160 160 SF(OTG0_OTG_PSTATE_REGISTER, OTG_PSTATE_EXTEND, mask_sh),\ 161 161 SF(OTG0_OTG_PSTATE_REGISTER, OTG_UNBLANK, mask_sh),\ 162 - SF(OTG0_OTG_PSTATE_REGISTER, OTG_PSTATE_ALLOW_WIDTH_MIN, mask_sh) 162 + SF(OTG0_OTG_PSTATE_REGISTER, OTG_PSTATE_ALLOW_WIDTH_MIN, mask_sh),\ 163 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_FLIP_PENDING, mask_sh),\ 164 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_DC_REG_UPDATE_PENDING, mask_sh),\ 165 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_CURSOR_UPDATE_PENDING, mask_sh),\ 166 + SF(OTG0_OTG_PIPE_UPDATE_STATUS, OTG_VUPDATE_KEEPOUT_STATUS, mask_sh) 163 167 164 168 void dcn401_timing_generator_init(struct optc *optc1); 165 169
+2 -1
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.h
··· 1054 1054 SRI_ARR(OPTC_BYTES_PER_PIXEL, ODM, inst), \ 1055 1055 SRI_ARR(OPTC_WIDTH_CONTROL, ODM, inst), \ 1056 1056 SRI_ARR(OPTC_MEMORY_CONFIG, ODM, inst), \ 1057 - SRI_ARR(OTG_DRR_CONTROL, OTG, inst) 1057 + SRI_ARR(OTG_DRR_CONTROL, OTG, inst), \ 1058 + SRI_ARR(OTG_PIPE_UPDATE_STATUS, OTG, inst) 1058 1059 1059 1060 /* HUBP */ 1060 1061
+3 -2
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.h
··· 536 536 SRI_ARR(OPTC_WIDTH_CONTROL, ODM, inst), \ 537 537 SRI_ARR(OPTC_WIDTH_CONTROL2, ODM, inst), \ 538 538 SRI_ARR(OPTC_MEMORY_CONFIG, ODM, inst), \ 539 - SRI_ARR(OTG_DRR_CONTROL, OTG, inst), \ 540 - SRI_ARR(OTG_PSTATE_REGISTER, OTG, inst) 539 + SRI_ARR(OTG_DRR_CONTROL, OTG, inst), \ 540 + SRI_ARR(OTG_PSTATE_REGISTER, OTG, inst), \ 541 + SRI_ARR(OTG_PIPE_UPDATE_STATUS, OTG, inst) 541 542 542 543 /* HUBBUB */ 543 544 #define HUBBUB_REG_LIST_DCN4_01_RI(id) \