drm/amd/display: Correcting prefetch mode for fast validate
authorSaaem Rizvi <SyedSaaem.Rizvi@amd.com>
Thu, 5 Jan 2023 23:28:34 +0000 (18:28 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jan 2023 18:26:24 +0000 (13:26 -0500)
[WHY and HOW]
When fast validating, we should be agnostic to any sort of optimizations
such as supporting Pstate or stutter in Vblank. We should change our
prefetch mode for fast validate to support none of these optimizations.
For example, Valve Index running at 144Hz can only be validated without
any support these optimizations.

Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Saaem Rizvi <SyedSaaem.Rizvi@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/dcn32_fpu.c

index 37915ea935bac03b2387f4dfd817b49961430430..2b8037e4a56d16e3ca4a7caa4965539d53a64877 100644 (file)
@@ -1601,17 +1601,11 @@ bool dcn32_internal_validate_bw(struct dc *dc,
                 * to support with Prefetch mode 1 (dm_prefetch_support_fclk_and_stutter == 2)
                 */
                context->bw_ctx.dml.soc.allow_for_pstate_or_stutter_in_vblank_final =
-                       dm_prefetch_support_fclk_and_stutter;
+                       dm_prefetch_support_none;
 
                context->bw_ctx.dml.validate_max_state = fast_validate;
                vlevel = dml_get_voltage_level(&context->bw_ctx.dml, pipes, pipe_cnt);
 
-               /* Last attempt with Prefetch mode 2 (dm_prefetch_support_stutter == 3) */
-               if (vlevel == context->bw_ctx.dml.soc.num_states) {
-                       context->bw_ctx.dml.soc.allow_for_pstate_or_stutter_in_vblank_final =
-                               dm_prefetch_support_stutter;
-                       vlevel = dml_get_voltage_level(&context->bw_ctx.dml, pipes, pipe_cnt);
-               }
                context->bw_ctx.dml.validate_max_state = false;
 
                if (vlevel < context->bw_ctx.dml.soc.num_states) {