drm/amd/display: Add check for PState change in DCN32
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Thu, 6 Apr 2023 20:19:16 +0000 (16:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Apr 2023 12:50:20 +0000 (08:50 -0400)
For pstate change, allow DML to loop through
all possible prefetch combinations so as to
support more display configurations. Set the max
and min prefetch modes to enable the sequence.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@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_util_32.c

index d39e77d..a50e7f4 100644 (file)
@@ -4656,6 +4656,10 @@ void dml32_CalculateMinAndMaxPrefetchMode(
        } else if (AllowForPStateChangeOrStutterInVBlankFinal == dm_prefetch_support_uclk_fclk_and_stutter) {
                *MinPrefetchMode = 0;
                *MaxPrefetchMode = 0;
+       } else if (AllowForPStateChangeOrStutterInVBlankFinal ==
+                       dm_prefetch_support_uclk_fclk_and_stutter_if_possible) {
+               *MinPrefetchMode = 0;
+               *MaxPrefetchMode = 3;
        } else {
                *MinPrefetchMode = 0;
                *MaxPrefetchMode = 3;