Commit 4ea7151f authored by Sung Joon Kim's avatar Sung Joon Kim Committed by Alex Deucher

drm/amd/display: Modify SMU message logs

[why]
It's important to make sure SMU messages
are logged by default to improve debugging for
power optimization use cases.

[how]
Change logs to warnings when SMU message
returns non-success id.
Reviewed-by: default avatarCharlene Liu <charlene.liu@amd.com>
Acked-by: default avatarTom Chung <chiahsuan.chung@amd.com>
Signed-off-by: default avatarSung Joon Kim <sungkim@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 80285ae1
...@@ -1046,6 +1046,7 @@ void dcn35_clk_mgr_construct( ...@@ -1046,6 +1046,7 @@ void dcn35_clk_mgr_construct(
ctx->dc->debug.disable_dpp_power_gate = false; ctx->dc->debug.disable_dpp_power_gate = false;
ctx->dc->debug.disable_hubp_power_gate = false; ctx->dc->debug.disable_hubp_power_gate = false;
ctx->dc->debug.disable_dsc_power_gate = false; ctx->dc->debug.disable_dsc_power_gate = false;
ctx->dc->debug.disable_hpo_power_gate = false;
} else { } else {
/*let's reset the config control flag*/ /*let's reset the config control flag*/
ctx->dc->config.disable_ips = 1; /*pmfw not support it, disable it all*/ ctx->dc->config.disable_ips = 1; /*pmfw not support it, disable it all*/
......
...@@ -130,11 +130,11 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, ...@@ -130,11 +130,11 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000); result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000);
ASSERT(result == VBIOSSMC_Result_OK); ASSERT(result == VBIOSSMC_Result_OK);
if (result != VBIOSSMC_Result_OK) {
DC_LOG_WARNING("SMU response after wait: %d, msg id = %d\n", result, msg_id);
if (result == VBIOSSMC_Status_BUSY)
if (result == VBIOSSMC_Status_BUSY) { return -1;
smu_print("SMU response after wait: %d\n", result);
return -1;
} }
/* First clear response register */ /* First clear response register */
...@@ -155,7 +155,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, ...@@ -155,7 +155,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
else else
ASSERT(0); ASSERT(0);
REG_WRITE(MP1_SMN_C2PMSG_91, VBIOSSMC_Result_OK); REG_WRITE(MP1_SMN_C2PMSG_91, VBIOSSMC_Result_OK);
smu_print("SMU response after wait: %d\n", result); DC_LOG_WARNING("SMU response after wait: %d, msg id = %d\n", result, msg_id);
return -1; return -1;
} }
...@@ -163,7 +163,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, ...@@ -163,7 +163,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
ASSERT(0); ASSERT(0);
result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000); result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000);
//dm_helpers_smu_timeout(CTX, msg_id, param, 10 * 200000); //dm_helpers_smu_timeout(CTX, msg_id, param, 10 * 200000);
smu_print("SMU response after wait: %d\n", result); DC_LOG_WARNING("SMU response after wait: %d, msg id = %d\n", result, msg_id);
} }
return REG_READ(MP1_SMN_C2PMSG_83); return REG_READ(MP1_SMN_C2PMSG_83);
......
...@@ -832,6 +832,7 @@ struct dc_debug_options { ...@@ -832,6 +832,7 @@ struct dc_debug_options {
bool disable_hubp_power_gate; bool disable_hubp_power_gate;
bool disable_dsc_power_gate; bool disable_dsc_power_gate;
bool disable_optc_power_gate; bool disable_optc_power_gate;
bool disable_hpo_power_gate;
int dsc_min_slice_height_override; int dsc_min_slice_height_override;
int dsc_bpp_increment_div; int dsc_bpp_increment_div;
bool disable_pplib_wm_range; bool disable_pplib_wm_range;
......
...@@ -262,6 +262,7 @@ void pg_cntl35_hpo_pg_control(struct pg_cntl *pg_cntl, bool power_on) ...@@ -262,6 +262,7 @@ void pg_cntl35_hpo_pg_control(struct pg_cntl *pg_cntl, bool power_on)
bool block_enabled; bool block_enabled;
if (pg_cntl->ctx->dc->debug.ignore_pg || if (pg_cntl->ctx->dc->debug.ignore_pg ||
pg_cntl->ctx->dc->debug.disable_hpo_power_gate ||
pg_cntl->ctx->dc->idle_optimizations_allowed) pg_cntl->ctx->dc->idle_optimizations_allowed)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment