drm/amd/display: Speed up DML fast_validate path
authorIlya Bakoulin <Ilya.Bakoulin@amd.com>
Thu, 24 Nov 2022 18:58:49 +0000 (13:58 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jan 2023 17:25:21 +0000 (12:25 -0500)
commit3a9c6f9a6159d8ecdf715f7eda0777ead96bcdc0
tree53ba0fd6c9da17c20bb0b6d03c1b42756d8a25c6
parent0bed85e48af1a1a2851f44bd4c486bff414f1079
drm/amd/display: Speed up DML fast_validate path

[Why]
Iterating over every voltage state when we need to validate thousands of
configurations all at once (i.e. display hotplug) can take a significant
amount of time.

[How]
Check just the highest voltage state when fast_validate is true to
verify whether the configuration can work at all, then do a proper
validation including all voltage states later when fast_validate is false.

Reviewed-by: Nevenko Stupar <Nevenko.Stupar@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@amd.com>
Signed-off-by: Dillon Varone <Dillon.Varone@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
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h