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

drm/amd/display: Add debug prints for SMU messages

[Why&How]
Add debug prints for SMU messages with regard to
versions, clocks, and more.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Robin Singh <Robin.Singh@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Harry Wentland and committed by
Alex Deucher
73affd30 3306ace5

+25 -4
+25 -4
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c
··· 113 113 114 114 int dcn301_smu_get_smu_version(struct clk_mgr_internal *clk_mgr) 115 115 { 116 - return dcn301_smu_send_msg_with_param( 117 - clk_mgr, 118 - VBIOSSMC_MSG_GetSmuVersion, 119 - 0); 116 + int smu_version = dcn301_smu_send_msg_with_param(clk_mgr, 117 + VBIOSSMC_MSG_GetSmuVersion, 118 + 0); 119 + 120 + DC_LOG_DEBUG("%s %x\n", __func__, smu_version); 121 + 122 + return smu_version; 120 123 } 121 124 122 125 123 126 int dcn301_smu_set_dispclk(struct clk_mgr_internal *clk_mgr, int requested_dispclk_khz) 124 127 { 125 128 int actual_dispclk_set_mhz = -1; 129 + 130 + DC_LOG_DEBUG("%s(%d)\n", __func__, requested_dispclk_khz); 126 131 127 132 /* Unit of SMU msg parameter is Mhz */ 128 133 actual_dispclk_set_mhz = dcn301_smu_send_msg_with_param( ··· 141 136 int dcn301_smu_set_dprefclk(struct clk_mgr_internal *clk_mgr) 142 137 { 143 138 int actual_dprefclk_set_mhz = -1; 139 + 140 + DC_LOG_DEBUG("%s %d\n", __func__, clk_mgr->base.dprefclk_khz / 1000); 144 141 145 142 actual_dprefclk_set_mhz = dcn301_smu_send_msg_with_param( 146 143 clk_mgr, ··· 158 151 { 159 152 int actual_dcfclk_set_mhz = -1; 160 153 154 + DC_LOG_DEBUG("%s(%d)\n", __func__, requested_dcfclk_khz); 155 + 161 156 actual_dcfclk_set_mhz = dcn301_smu_send_msg_with_param( 162 157 clk_mgr, 163 158 VBIOSSMC_MSG_SetHardMinDcfclkByFreq, ··· 171 162 int dcn301_smu_set_min_deep_sleep_dcfclk(struct clk_mgr_internal *clk_mgr, int requested_min_ds_dcfclk_khz) 172 163 { 173 164 int actual_min_ds_dcfclk_mhz = -1; 165 + 166 + DC_LOG_DEBUG("%s(%d)\n", __func__, requested_min_ds_dcfclk_khz); 174 167 175 168 actual_min_ds_dcfclk_mhz = dcn301_smu_send_msg_with_param( 176 169 clk_mgr, ··· 186 175 { 187 176 int actual_dppclk_set_mhz = -1; 188 177 178 + DC_LOG_DEBUG("%s(%d)\n", __func__, requested_dpp_khz); 179 + 189 180 actual_dppclk_set_mhz = dcn301_smu_send_msg_with_param( 190 181 clk_mgr, 191 182 VBIOSSMC_MSG_SetDppclkFreq, ··· 199 186 void dcn301_smu_set_display_idle_optimization(struct clk_mgr_internal *clk_mgr, uint32_t idle_info) 200 187 { 201 188 //TODO: Work with smu team to define optimization options. 189 + 190 + DC_LOG_DEBUG("%s(%x)\n", __func__, idle_info); 202 191 203 192 dcn301_smu_send_msg_with_param( 204 193 clk_mgr, ··· 216 201 idle_info.idle_info.df_request_disabled = 1; 217 202 idle_info.idle_info.phy_ref_clk_off = 1; 218 203 } 204 + 205 + DC_LOG_DEBUG("%s(%d)\n", __func__, enable); 219 206 220 207 dcn301_smu_send_msg_with_param( 221 208 clk_mgr, ··· 235 218 236 219 void dcn301_smu_set_dram_addr_high(struct clk_mgr_internal *clk_mgr, uint32_t addr_high) 237 220 { 221 + DC_LOG_DEBUG("%s(%x)\n", __func__, addr_high); 222 + 238 223 dcn301_smu_send_msg_with_param(clk_mgr, 239 224 VBIOSSMC_MSG_SetVbiosDramAddrHigh, addr_high); 240 225 } 241 226 242 227 void dcn301_smu_set_dram_addr_low(struct clk_mgr_internal *clk_mgr, uint32_t addr_low) 243 228 { 229 + DC_LOG_DEBUG("%s(%x)\n", __func__, addr_low); 230 + 244 231 dcn301_smu_send_msg_with_param(clk_mgr, 245 232 VBIOSSMC_MSG_SetVbiosDramAddrLow, addr_low); 246 233 }