mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/amd/display: Add debug option to force fclk request
[Why] So that we can adjust fclk for debugging purposes. [How] Add option to force adjust fclk request to pplib. Signed-off-by: Hugo Hu <hugo.hu@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
987741af33
commit
51ba137ef2
2 changed files with 5 additions and 0 deletions
|
@ -255,6 +255,7 @@ struct dc_debug_options {
|
|||
bool scl_reset_length10;
|
||||
bool hdmi20_disable;
|
||||
bool skip_detection_link_training;
|
||||
unsigned int force_fclk_khz;
|
||||
};
|
||||
|
||||
struct dc_debug_data {
|
||||
|
|
|
@ -218,6 +218,7 @@ static void dcn1_update_clocks(struct clk_mgr *clk_mgr,
|
|||
bool safe_to_lower)
|
||||
{
|
||||
struct dc *dc = clk_mgr->ctx->dc;
|
||||
struct dc_debug_options *debug = &dc->debug;
|
||||
struct dc_clocks *new_clocks = &context->bw.dcn.clk;
|
||||
struct pp_smu_display_requirement_rv *smu_req_cur =
|
||||
&dc->res_pool->pp_smu_req;
|
||||
|
@ -261,6 +262,9 @@ static void dcn1_update_clocks(struct clk_mgr *clk_mgr,
|
|||
}
|
||||
|
||||
// F Clock
|
||||
if (debug->force_fclk_khz != 0)
|
||||
new_clocks->fclk_khz = debug->force_fclk_khz;
|
||||
|
||||
if (should_set_clock(safe_to_lower, new_clocks->fclk_khz, clk_mgr->clks.fclk_khz)) {
|
||||
clk_mgr->clks.fclk_khz = new_clocks->fclk_khz;
|
||||
smu_req.hard_min_fclk_mhz = new_clocks->fclk_khz / 1000;
|
||||
|
|
Loading…
Add table
Reference in a new issue