Skip to content

Commit

Permalink
drm/amd/display: Call dc_stream_release for remove link enc assignment
Browse files Browse the repository at this point in the history
[ Upstream commit f2bde83 ]

[Why]
A porting error resulted in the stream assignment for the link
being retained without being released - a memory leak.

[How]
Fix the porting error by adding back the dc_stream_release() intended
as part of the original patch.

Fixes: 0bb2455 ("drm/amd/display: retain/release at proper places in link_enc assignment")

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Nicholas Kazlauskas authored and gregkh committed Apr 8, 2022
1 parent ff4b32f commit a28b7b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
Expand Up @@ -122,6 +122,7 @@ static void remove_link_enc_assignment(
stream->link_enc = NULL;
state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].eng_id = ENGINE_ID_UNKNOWN;
state->res_ctx.link_enc_cfg_ctx.link_enc_assignments[i].stream = NULL;
dc_stream_release(stream);
break;
}
}
Expand Down

0 comments on commit a28b7b6

Please sign in to comment.