Skip to content

Commit 2aafcdd

Browse files
Hong-lu Chengalexdeucher
authored andcommitted
drm/amd/display: Remove asserts
[why] Endless assert caused by LinesInDETChroma=0. [how] Don't floor for LinesInDETChroma=0 Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Jun Lei <jun.lei@amd.com> Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Signed-off-by: Hong-lu Cheng <hong-lu.cheng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 2faa365 commit 2aafcdd

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4356,12 +4356,16 @@ void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
43564356
locals->PSCL_FACTOR[k] / locals->ReturnBWPerState[i][0],
43574357
locals->EffectiveLBLatencyHidingSourceLinesLuma),
43584358
locals->SwathHeightYPerState[i][j][k]);
4359-
4360-
locals->EffectiveDETLBLinesChroma = dml_floor(locals->LinesInDETChroma + dml_min(
4361-
locals->LinesInDETChroma * locals->RequiredDISPCLK[i][j] * locals->BytePerPixelInDETC[k] *
4362-
locals->PSCL_FACTOR_CHROMA[k] / locals->ReturnBWPerState[i][0],
4363-
locals->EffectiveLBLatencyHidingSourceLinesChroma),
4364-
locals->SwathHeightCPerState[i][j][k]);
4359+
if (locals->LinesInDETChroma) {
4360+
locals->EffectiveDETLBLinesChroma = dml_floor(locals->LinesInDETChroma +
4361+
dml_min(locals->LinesInDETChroma * locals->RequiredDISPCLK[i][j] *
4362+
locals->BytePerPixelInDETC[k] *
4363+
locals->PSCL_FACTOR_CHROMA[k] / locals->ReturnBWPerState[i][0],
4364+
locals->EffectiveLBLatencyHidingSourceLinesChroma),
4365+
locals->SwathHeightCPerState[i][j][k]);
4366+
} else {
4367+
locals->EffectiveDETLBLinesChroma = 0;
4368+
}
43654369

43664370
if (locals->BytePerPixelInDETC[k] == 0) {
43674371
locals->UrgentLatencySupportUsPerState[i][j][k] = locals->EffectiveDETLBLinesLuma * (locals->HTotal[k] / locals->PixelClock[k])

0 commit comments

Comments
 (0)