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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Toggle for Disable Force Pstate Allow on Disable

[Why & How]
In theory, driver should be able to support disabling force pstate allow
after hardware release however this behavior is not tested yet.
Introducing a new toggle to disable the force on the fly.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Ryan Seto <ryanseto@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Ryan Seto and committed by
Alex Deucher
20ea30a7 e63e9f8b

+22 -12
+1
drivers/gpu/drm/amd/display/dc/dc.h
··· 1073 1073 unsigned int force_mall_ss_num_ways; 1074 1074 bool alloc_extra_way_for_cursor; 1075 1075 uint32_t subvp_extra_lines; 1076 + bool disable_force_pstate_allow_on_hw_release; 1076 1077 bool force_usr_allow; 1077 1078 /* uses value at boot and disables switch */ 1078 1079 bool disable_dtb_ref_clk_switch;
+20 -12
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
··· 1621 1621 1622 1622 void dcn401_hardware_release(struct dc *dc) 1623 1623 { 1624 - dc_dmub_srv_fams2_update_config(dc, dc->current_state, false); 1624 + if (!dc->debug.disable_force_pstate_allow_on_hw_release) { 1625 + dc_dmub_srv_fams2_update_config(dc, dc->current_state, false); 1625 1626 1626 - /* If pstate unsupported, or still supported 1627 - * by firmware, force it supported by dcn 1628 - */ 1629 - if (dc->current_state) { 1630 - if ((!dc->clk_mgr->clks.p_state_change_support || 1631 - dc->current_state->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable) && 1632 - dc->res_pool->hubbub->funcs->force_pstate_change_control) 1633 - dc->res_pool->hubbub->funcs->force_pstate_change_control( 1634 - dc->res_pool->hubbub, true, true); 1627 + /* If pstate unsupported, or still supported 1628 + * by firmware, force it supported by dcn 1629 + */ 1630 + if (dc->current_state) { 1631 + if ((!dc->clk_mgr->clks.p_state_change_support || 1632 + dc->current_state->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable) && 1633 + dc->res_pool->hubbub->funcs->force_pstate_change_control) 1634 + dc->res_pool->hubbub->funcs->force_pstate_change_control( 1635 + dc->res_pool->hubbub, true, true); 1635 1636 1636 - dc->current_state->bw_ctx.bw.dcn.clk.p_state_change_support = true; 1637 - dc->clk_mgr->funcs->update_clocks(dc->clk_mgr, dc->current_state, true); 1637 + dc->current_state->bw_ctx.bw.dcn.clk.p_state_change_support = true; 1638 + dc->clk_mgr->funcs->update_clocks(dc->clk_mgr, dc->current_state, true); 1639 + } 1640 + } else { 1641 + if (dc->current_state) { 1642 + dc->clk_mgr->clks.p_state_change_support = false; 1643 + dc->clk_mgr->funcs->update_clocks(dc->clk_mgr, dc->current_state, true); 1644 + } 1645 + dc_dmub_srv_fams2_update_config(dc, dc->current_state, false); 1638 1646 } 1639 1647 } 1640 1648
+1
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
··· 708 708 }, 709 709 .use_max_lb = true, 710 710 .force_disable_subvp = false, 711 + .disable_force_pstate_allow_on_hw_release = false, 711 712 .exit_idle_opt_for_cursor_updates = true, 712 713 .using_dml2 = true, 713 714 .using_dml21 = true,