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

drm/amd/display: add debug option to bypass ssinfo from bios for dcn315

[Why & How]
Add debug option to bypass ssinfo from BIOS for dcn315.

Reviewed-by: Park, Chris <Chris.Park@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Charlene Liu and committed by
Alex Deucher
3b8b44a4 7c916f95

+32 -1
+4 -1
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
··· 526 526 struct dccg *dccg) 527 527 { 528 528 struct dcn315_smu_dpm_clks smu_dpm_clks = { 0 }; 529 + struct clk_mgr *clk_mgr_base = ctx->dc->clk_mgr; 529 530 530 531 clk_mgr->base.base.ctx = ctx; 531 532 clk_mgr->base.base.funcs = &dcn315_funcs; ··· 587 586 } 588 587 589 588 clk_mgr->base.base.dprefclk_khz = 600000; 590 - clk_mgr->base.dccg->ref_dtbclk_khz = 600000; 589 + clk_mgr->base.base.dprefclk_khz = dcn315_smu_get_dpref_clk(&clk_mgr->base); 590 + clk_mgr->base.dccg->ref_dtbclk_khz = clk_mgr->base.base.dprefclk_khz; 591 591 dce_clock_read_ss_info(&clk_mgr->base); 592 + clk_mgr->base.dccg->ref_dtbclk_khz = dce_adjust_dp_ref_freq_for_ss(&clk_mgr->base, clk_mgr->base.base.dprefclk_khz); 592 593 593 594 clk_mgr->base.base.bw_params = &dcn315_bw_params; 594 595
+24
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c
··· 312 312 VBIOSSMC_MSG_TransferTableDram2Smu, TABLE_WATERMARKS); 313 313 } 314 314 315 + int dcn315_smu_get_dpref_clk(struct clk_mgr_internal *clk_mgr) 316 + { 317 + int dprefclk_get_mhz = -1; 318 + if (clk_mgr->smu_present) { 319 + dprefclk_get_mhz = dcn315_smu_send_msg_with_param( 320 + clk_mgr, 321 + VBIOSSMC_MSG_GetDprefclkFreq, 322 + 0); 323 + } 324 + return (dprefclk_get_mhz * 1000); 325 + } 326 + 327 + int dcn315_smu_get_smu_fclk(struct clk_mgr_internal *clk_mgr) 328 + { 329 + int fclk_get_mhz = -1; 330 + 331 + if (clk_mgr->smu_present) { 332 + fclk_get_mhz = dcn315_smu_send_msg_with_param( 333 + clk_mgr, 334 + VBIOSSMC_MSG_GetFclkFrequency, 335 + 0); 336 + } 337 + return (fclk_get_mhz * 1000); 338 + }
+2
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.h
··· 123 123 void dcn315_smu_transfer_wm_table_dram_2_smu(struct clk_mgr_internal *clk_mgr); 124 124 void dcn315_smu_request_voltage_via_phyclk(struct clk_mgr_internal *clk_mgr, int requested_phyclk_khz); 125 125 void dcn315_smu_enable_pme_wa(struct clk_mgr_internal *clk_mgr); 126 + int dcn315_smu_get_dpref_clk(struct clk_mgr_internal *clk_mgr); 127 + int dcn315_smu_get_smu_fclk(struct clk_mgr_internal *clk_mgr); 126 128 #endif /* DAL_DC_315_SMU_H_ */
+2
drivers/gpu/drm/amd/display/dc/dce/dce_clk_mgr.c
··· 450 450 clk_mgr_dce->dprefclk_ss_percentage = 451 451 info.spread_spectrum_percentage; 452 452 } 453 + if (clk_mgr_dce->base.ctx->dc->debug.ignore_dpref_ss) 454 + clk_mgr_dce->dprefclk_ss_percentage = 0; 453 455 } 454 456 } 455 457 }