]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: apply two different methods to validate modes
authorYan Li <yan.li@amd.com>
Wed, 21 May 2025 20:02:55 +0000 (16:02 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Jun 2025 16:19:19 +0000 (12:19 -0400)
commitb02b0fc488ba6efc29884a517ab38c2efeaf9e34
tree02b21ed33b49aa094ac9382353a008013a485276
parent54f7a24e1437d66c9ff36d727a9dff1beeeab429
drm/amd/display: apply two different methods to validate modes

[Why]
In DML2, the current method to determine a
mode is supported involves checking the
voltage levels sequentially from the lowest,
until one is found that can support the
mode. It causes cursor lag due to low
performance.

[How]
We apply two methods for mode validation.
1) DC_VALIDATE_MODE_ONLY: only the
maximum voltage level is checked to
determine whether the mode is supported, which
improves performance and eliminate cursor lag.

2) DC_VALIDATE_MODE_AND_STATE_INDEX: when
the optimal voltage level is required, check
the voltage level from the lowest until
a suitable one is found found and returns
its index.

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Yan Li <yan.li@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core_structs.h
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c