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>
Thu, 15 Dec 2022 17:18:18 +0000 (12:18 -0500)
commit1b5d0e7e15430aecbf2bb0ac634a44aec971895c
tree73ca008e7917c8a34886e44a0aa2281cd490450b
parentb8ff7e08bab938d84dc329a7193ebf459088727c
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: Jun Lei <Jun.Lei@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Ilya Bakoulin <Ilya.Bakoulin@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