drm/amd/display: Fix stream->link_enc unassigned during stream removal
PATCH 1/1 drm/amd/display: Fix stream->link_enc unassigned during stream removal
From: Nicholas Kazlauskas <[email protected]>
[Why]
Found when running igt@kms_atomic.
Userspace attempts to do a TEST_COMMIT when 0 streams which calls dc_remove_stream_from_ctx. This in turn calls link_enc_unassign which ends up modifying stream->link = NULL directly, causing the global link_enc to be removed preventing further link activity and future link validation from passing.
[How]
We take care of link_enc unassignment at the start of link_enc_cfg_link_encs_assign so this call is no longer necessary.
Fixes global state from being modified while unlocked.
---
Please apply this for 5.15.y.
This was already targeted to stable and 5.16.y picked it up but doesn't apply cleanly on 5.15.y. This problem exists in 5.15 as well but the nearby #if defined(CONFIG_DRM_AMD_DC_DCN) from DP 2.0 support
hasn't been introduced in 5.15.y.
drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +0 -3
@@ -1799,9 +1799,6 @@ enum dc_status dc_remove_stream_from_ctx( dc->res_pool, del_pipe->stream_res.stream_enc, false); -/* Release link encoder from stream in new dc_state. */ -if (dc->res_pool->funcs->link_enc_unassign) - dc->res_pool->funcs->link_enc_unassign (new_ctx, del_pipe->stream);if (del_pipe->stream_res.audio) update_audio_usage(
Signature · 1 line
2.34.1