]> www.infradead.org Git - nvme.git/commitdiff
drm/amd/display: Account for cursor prefetch BW in DML1 mode support
authorAlvin Lee <alvin.lee2@amd.com>
Thu, 20 Jun 2024 19:11:38 +0000 (15:11 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Jul 2024 20:50:02 +0000 (16:50 -0400)
[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: Chaitanya Dhere <chaitanya.dhere@amd.com>
Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com>
Signed-off-by: Jerry Zuo <jerry.zuo@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>
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c

index 6c84b0fa40f44d94ea2506e9b9e59a2b54408f10..0782a34689a00fa684586baf79ce0ca4d46a4f8b 100644 (file)
@@ -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];
                                }
 
                                {