]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Reset link encoder assignments for GPU reset
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 9 Nov 2021 21:03:21 +0000 (16:03 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Nov 2021 20:06:21 +0000 (15:06 -0500)
commit9c69f4ffe69d3cfff943e9bcd17bebe6a030e780
tree99bc3ea2ad83388eb37752d0bf4fd136c692d2b6
parentd8d463790c25be2e2ac96060427c9cfb60218215
drm/amd/display: Reset link encoder assignments for GPU reset

[Why]
A warning appears in the log on GPU reset for
link_enc_cfg_link_encs_assign for the following condition:

ASSERT(state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].valid == false);

This is not expected behavior and may result in link encoders being
incorrectly assigned.

[How]
The dc->current_state is backed up into dm->cached_dc_state before
we commit 0 streams.

DC will clear link encoder assignments on the real state but the
changes won't propagate over to the copy we made before the
0 streams commit.

DC expects that link encoder assignments are *not* valid
when committing a state, so as a workaround it needs to be cleared
before passing it back into DC.

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