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: Update FAMS sequence for DCN30 & DCN32

Provide DCN32 specific sequence and update DCN30 sequence

Reviewed-by: Samson Tam <samson.tam@amd.com>
Acked-by: Roman Li <roman.li@amd.com>
Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alvin Lee and committed by
Alex Deucher
f583db81 79f3f1b6

+38 -19
+1 -1
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c
··· 60 60 .pipe_control_lock = dcn20_pipe_control_lock, 61 61 .interdependent_update_lock = dcn10_lock_all_pipes, 62 62 .cursor_lock = dcn10_cursor_lock, 63 - .prepare_bandwidth = dcn30_prepare_bandwidth, 63 + .prepare_bandwidth = dcn32_prepare_bandwidth, 64 64 .optimize_bandwidth = dcn20_optimize_bandwidth, 65 65 .update_bandwidth = dcn20_update_bandwidth, 66 66 .set_drr = dcn10_set_drr,
+3 -18
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
··· 993 993 void dcn30_prepare_bandwidth(struct dc *dc, 994 994 struct dc_state *context) 995 995 { 996 - bool p_state_change_support = context->bw_ctx.bw.dcn.clk.p_state_change_support; 997 - /* Any transition into an FPO config should disable MCLK switching first to avoid 998 - * driver and FW P-State synchronization issues. 999 - */ 1000 - if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching || dc->clk_mgr->clks.fw_based_mclk_switching) { 996 + if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching && !dc->clk_mgr->clks.fw_based_mclk_switching) { 1001 997 dc->optimized_required = true; 1002 998 context->bw_ctx.bw.dcn.clk.p_state_change_support = false; 1003 999 } ··· 1004 1008 dc->clk_mgr->funcs->set_max_memclk(dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries - 1].memclk_mhz); 1005 1009 1006 1010 dcn20_prepare_bandwidth(dc, context); 1007 - /* 1008 - * enabled -> enabled: do not disable 1009 - * enabled -> disabled: disable 1010 - * disabled -> enabled: don't care 1011 - * disabled -> disabled: don't care 1012 - */ 1013 - if (!context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) 1014 - dc_dmub_srv_p_state_delegate(dc, false, context); 1015 1011 1016 - if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching || dc->clk_mgr->clks.fw_based_mclk_switching) { 1017 - /* After disabling P-State, restore the original value to ensure we get the correct P-State 1018 - * on the next optimize. */ 1019 - context->bw_ctx.bw.dcn.clk.p_state_change_support = p_state_change_support; 1020 - } 1012 + if (!dc->clk_mgr->clks.fw_based_mclk_switching) 1013 + dc_dmub_srv_p_state_delegate(dc, false, context); 1021 1014 } 1022 1015 1023 1016 void dcn30_set_static_screen_control(struct pipe_ctx **pipe_ctx,
+31
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
··· 50 50 #include "dce/dmub_hw_lock_mgr.h" 51 51 #include "dcn32/dcn32_resource.h" 52 52 #include "link.h" 53 + #include "../dcn20/dcn20_hwseq.h" 53 54 54 55 #define DC_LOGGER_INIT(logger) 55 56 ··· 1677 1676 } 1678 1677 1679 1678 return is_seamless; 1679 + } 1680 + 1681 + void dcn32_prepare_bandwidth(struct dc *dc, 1682 + struct dc_state *context) 1683 + { 1684 + bool p_state_change_support = context->bw_ctx.bw.dcn.clk.p_state_change_support; 1685 + /* Any transition into an FPO config should disable MCLK switching first to avoid 1686 + * driver and FW P-State synchronization issues. 1687 + */ 1688 + if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching || dc->clk_mgr->clks.fw_based_mclk_switching) { 1689 + dc->optimized_required = true; 1690 + context->bw_ctx.bw.dcn.clk.p_state_change_support = false; 1691 + } 1692 + 1693 + if (dc->clk_mgr->dc_mode_softmax_enabled) 1694 + if (dc->clk_mgr->clks.dramclk_khz <= dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000 && 1695 + context->bw_ctx.bw.dcn.clk.dramclk_khz > dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000) 1696 + dc->clk_mgr->funcs->set_max_memclk(dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries - 1].memclk_mhz); 1697 + 1698 + dcn20_prepare_bandwidth(dc, context); 1699 + 1700 + if (!context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) 1701 + dc_dmub_srv_p_state_delegate(dc, false, context); 1702 + 1703 + if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching || dc->clk_mgr->clks.fw_based_mclk_switching) { 1704 + /* After disabling P-State, restore the original value to ensure we get the correct P-State 1705 + * on the next optimize. 1706 + */ 1707 + context->bw_ctx.bw.dcn.clk.p_state_change_support = p_state_change_support; 1708 + } 1680 1709 }
+3
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.h
··· 124 124 const struct dc_state *cur_ctx, 125 125 const struct dc_state *new_ctx); 126 126 127 + void dcn32_prepare_bandwidth(struct dc *dc, 128 + struct dc_state *context); 129 + 127 130 #endif /* __DC_HWSS_DCN32_H__ */