s->dram_clk_chanage = REG_READ(DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_D);
}
-void verify_allow_pstate_change_high(
+bool hubbub1_verify_allow_pstate_change_high(
struct hubbub *hubbub)
{
/* pstate latency is ~20us so if we wait over 40us and pstate allow
static unsigned int pstate_wait_expected_timeout_us = 40;
static unsigned int max_sampled_pstate_wait_us; /* data collection */
static bool forced_pstate_allow; /* help with revert wa */
- static bool should_log_hw_state; /* prevent hw state log by default */
unsigned int debug_index = 0x7;
unsigned int debug_data;
"pstate took longer than expected ~%dus\n",
i);
- return;
+ return false;
}
if (max_sampled_pstate_wait_us < i)
max_sampled_pstate_wait_us = i;
DCHUBBUB_ARB_ALLOW_PSTATE_CHANGE_FORCE_ENABLE, 1);
forced_pstate_allow = true;
- if (should_log_hw_state) {
- dcn10_log_hw_state(hubbub->ctx->dc);
- }
-
dm_logger_write(hubbub->ctx->logger, LOG_WARNING,
"pstate TEST_DEBUG_DATA: 0x%X\n",
debug_data);
- BREAK_TO_DEBUGGER();
+
+ return true;
}
static uint32_t convert_and_clamp(
}
-void program_watermarks(
+void hubbub1_program_watermarks(
struct hubbub *hubbub,
struct dcn_watermark_set *watermarks,
unsigned int refclk_mhz)
dh_data->dchub_info_valid = false;
}
-void toggle_watermark_change_req(struct hubbub *hubbub)
+void hubbub1_toggle_watermark_change_req(struct hubbub *hubbub)
{
uint32_t watermark_change_req;
pipe_ctx->pipe_idx, pipe_ctx->stream_res.tg->inst);
}
+void dcn10_verify_allow_pstate_change_high(struct dc *dc)
+{
+ static bool should_log_hw_state; /* prevent hw state log by default */
+
+ if (hubbub1_verify_allow_pstate_change_high(dc->res_pool->hubbub)) {
+ if (should_log_hw_state) {
+ dcn10_log_hw_state(dc);
+ }
+
+ BREAK_TO_DEBUGGER();
+ }
+}
+
/* trigger HW to start disconnect plane from stream on the next vsync */
static void plane_atomic_disconnect(struct dc *dc,
int fe_idx)
return;
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
hubp->funcs->dcc_control(hubp, false, false);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
mpc->funcs->remove(mpc, &(dc->res_pool->opps[opp_id]->mpc_tree),
dc->res_pool->opps[opp_id]->inst, fe_idx);
hubp->funcs->set_blank(hubp, true);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
REG_UPDATE(HUBP_CLK_CNTL[fe_idx],
HUBP_CLOCK_ENABLE, 0);
OPP_PIPE_CLOCK_EN, 0);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
static void reset_front_end(
tg->funcs->unlock(tg);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
if (tg->ctx->dce_environment != DCE_ENV_FPGA_MAXIMUS)
REG_WAIT(OTG_GLOBAL_SYNC_STATUS[tg->inst],
"Power gated front end %d\n", fe_idx);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
static void dcn10_init_hw(struct dc *dc)
return;
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
if (lock)
pipe->stream_res.tg->funcs->lock(pipe->stream_res.tg);
pipe->stream_res.tg->funcs->unlock(pipe->stream_res.tg);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
static bool wait_for_reset_trigger_to_occur(
struct dce_hwseq *hws = dc->hwseq;
if (dc->debug.sanity_checks) {
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
power_on_plane(dc->hwseq,
}
if (dc->debug.sanity_checks) {
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
}
* this OTG. this is done only one time.
*/
/* watermark is for all pipes */
- program_watermarks(dc->res_pool->hubbub, &context->bw.dcn.watermarks, ref_clk_mhz);
+ hubbub1_program_watermarks(dc->res_pool->hubbub, &context->bw.dcn.watermarks, ref_clk_mhz);
if (dc->debug.sanity_checks) {
/* pstate stuck check after watermark update */
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
pipe_ctx->stream_res.tg->funcs->lock(pipe_ctx->stream_res.tg);
* DCHUBBUB_ARB_WATERMARK_CHANGE_REQUEST is owned by SMU we should have
* both driver and fw accessing same register
*/
- toggle_watermark_change_req(dc->res_pool->hubbub);
+ hubbub1_toggle_watermark_change_req(dc->res_pool->hubbub);
update_dchubp_dpp(dc, pipe_ctx, context);
if (dc->debug.sanity_checks) {
/* pstate stuck check after each pipe is programmed */
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
if (pipe_ctx->bottom_pipe != NULL && pipe_ctx->bottom_pipe != pipe_ctx)
int i, be_idx;
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
be_idx = -1;
for (i = 0; i < dc->res_pool->pipe_count; i++) {
hubp->funcs->hubp_disconnect(hubp);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
old_pipe_ctx->top_pipe = NULL;
old_pipe_ctx->bottom_pipe = NULL;
);
if (dc->debug.sanity_checks)
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
static void dcn10_set_bandwidth(
struct pp_smu_funcs_rv *pp_smu = dc->res_pool->pp_smu;
if (dc->debug.sanity_checks) {
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
if (IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment))
dcn10_pplib_apply_display_requirements(dc, context);
if (dc->debug.sanity_checks) {
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
/* need to fix this function. not doing the right thing here */
int i;
if (dc->debug.sanity_checks) {
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
if (!pipe_ctx->stream_res.opp)
}
if (dc->debug.sanity_checks) {
- verify_allow_pstate_change_high(dc->res_pool->hubbub);
+ dcn10_verify_allow_pstate_change_high(dc);
}
}