Commit 074b3a88 authored by Alvin Lee's avatar Alvin Lee Committed by Alex Deucher
Browse files

drm/amd/display: Account for cursor prefetch BW in DML1 mode support



[Description]
We need to ensure to take into account cursor prefetch BW in
mode support or we may pass ModeQuery but fail an actual flip
which will cause a hang. Flip may fail because the cursor_pre_bw
is populated during mode programming (and mode programming is
never called prior to ModeQuery).

Reviewed-by: default avatarChaitanya Dhere <chaitanya.dhere@amd.com>
Reviewed-by: default avatarNevenko Stupar <nevenko.stupar@amd.com>
Signed-off-by: default avatarJerry Zuo <jerry.zuo@amd.com>
Signed-off-by: default avatarAlvin Lee <alvin.lee2@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 74ad26b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3364,6 +3364,9 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
							&mode_lib->vba.UrgentBurstFactorLumaPre[k],
							&mode_lib->vba.UrgentBurstFactorChromaPre[k],
							&mode_lib->vba.NotUrgentLatencyHidingPre[k]);

					v->cursor_bw_pre[k] = mode_lib->vba.NumberOfCursors[k] * mode_lib->vba.CursorWidth[k][0] * mode_lib->vba.CursorBPP[k][0] /
							8.0 / (mode_lib->vba.HTotal[k] / mode_lib->vba.PixelClock[k]) * v->VRatioPreY[i][j][k];
				}

				{