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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1046,6 +1046,7 @@ void dcn35_clk_mgr_construct(
			ctx->dc->debug.disable_dpp_power_gate = false;
			ctx->dc->debug.disable_hubp_power_gate = false;
			ctx->dc->debug.disable_dsc_power_gate = false;
			ctx->dc->debug.disable_hpo_power_gate = false;
		} else {
			/*let's reset the config control flag*/
			ctx->dc->config.disable_ips = 1; /*pmfw not support it, disable it all*/
+6 −6
Original line number Diff line number Diff line
@@ -130,10 +130,10 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
	result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000);
	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) {
		smu_print("SMU response after wait: %d\n", result);
		if (result == VBIOSSMC_Status_BUSY)
			return -1;
	}

@@ -155,7 +155,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
		else
			ASSERT(0);
		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;
	}

@@ -163,7 +163,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
		ASSERT(0);
		result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000);
		//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);
+1 −0
Original line number Diff line number Diff line
@@ -832,6 +832,7 @@ struct dc_debug_options {
	bool disable_hubp_power_gate;
	bool disable_dsc_power_gate;
	bool disable_optc_power_gate;
	bool disable_hpo_power_gate;
	int dsc_min_slice_height_override;
	int dsc_bpp_increment_div;
	bool disable_pplib_wm_range;
+1 −0
Original line number Diff line number Diff line
@@ -262,6 +262,7 @@ void pg_cntl35_hpo_pg_control(struct pg_cntl *pg_cntl, bool power_on)
	bool block_enabled;

	if (pg_cntl->ctx->dc->debug.ignore_pg ||
		pg_cntl->ctx->dc->debug.disable_hpo_power_gate ||
		pg_cntl->ctx->dc->idle_optimizations_allowed)
		return;