Skip to content

Commit 1e994cc

Browse files
Daniel Miessalexdeucher
authored andcommitted
drm/amd/display: limit timing for single dimm memory
[Why] 1. It could hit bandwidth limitdation under single dimm memory when connecting 8K external monitor. 2. IsSupportedVidPn got validation failed with 2K240Hz eDP + 8K24Hz external monitor. 3. It's better to filter out such combination in EnumVidPnCofuncModality 4. For short term, filter out in dc bandwidth validation. [How] Force 2K@240Hz+8K@24Hz timing validation false in dc. Reviewed-by: Nicholas Kazlauskas <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Daniel Miess <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 6d9240c commit 1e994cc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,6 +1697,23 @@ static void dcn314_get_panel_config_defaults(struct dc_panel_config *panel_confi
16971697
*panel_config = panel_config_defaults;
16981698
}
16991699

1700+
static bool filter_modes_for_single_channel_workaround(struct dc *dc,
1701+
struct dc_state *context)
1702+
{
1703+
// Filter 2K@240Hz+8K@24fps above combination timing if memory only has single dimm LPDDR
1704+
if (dc->clk_mgr->bw_params->vram_type == 34 && dc->clk_mgr->bw_params->num_channels < 2) {
1705+
int total_phy_pix_clk = 0;
1706+
1707+
for (int i = 0; i < context->stream_count; i++)
1708+
if (context->res_ctx.pipe_ctx[i].stream)
1709+
total_phy_pix_clk += context->res_ctx.pipe_ctx[i].stream->phy_pix_clk;
1710+
1711+
if (total_phy_pix_clk >= (1148928+826260)) //2K@240Hz+8K@24fps
1712+
return true;
1713+
}
1714+
return false;
1715+
}
1716+
17001717
bool dcn314_validate_bandwidth(struct dc *dc,
17011718
struct dc_state *context,
17021719
bool fast_validate)
@@ -1712,6 +1729,9 @@ bool dcn314_validate_bandwidth(struct dc *dc,
17121729

17131730
BW_VAL_TRACE_COUNT();
17141731

1732+
if (filter_modes_for_single_channel_workaround(dc, context))
1733+
goto validate_fail;
1734+
17151735
DC_FP_START();
17161736
// do not support self refresh only
17171737
out = dcn30_internal_validate_bw(dc, context, pipes, &pipe_cnt, &vlevel, fast_validate, false);

0 commit comments

Comments
 (0)