drm/amd/display: Run full global validation in dc_commit_state
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Mon, 8 Nov 2021 18:33:12 +0000 (13:33 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Nov 2021 19:59:13 +0000 (14:59 -0500)
commit85fb8bb9d4a5bae9d1abd0d21550517a40ba81e9
tree02282c361b0cd42400e07caa22b704dc432ceb77
parentf8fb5cd412e31d6277c5b0107bb37d677107cbc0
drm/amd/display: Run full global validation in dc_commit_state

[Why]
Dynamic link encoder assignment expects that it can modify DC
current_state and the links associated with the incoming state when
performing full validation.

This does not align with our actual synchronization constraints
in DM's atomic_check.

[How]
Since link encoder assignment only happens as part of full validation
we can just use fast validation as part of atomic_check instead.

This satisfy's DC interface requirements and skips the DML calculations
needed for pipe programming - hopefully speeding up things a little bit
to offset the cost of double validation during stream modification.

We already do this as part of dc_commit_updates_for_stream()
with validate_bandwidth(), so extend this to dc_commit_state() as
well.

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/core/dc.c