]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Decrement refcount of dc_sink before reassignment
authorVictor Lu <victorchengchi.lu@amd.com>
Fri, 15 Jan 2021 16:02:48 +0000 (11:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Feb 2021 17:12:02 +0000 (12:12 -0500)
commit45a04ef1cbb18eacedc30b78ed0ba5af0557de20
tree835624007019c7ec5272d0bfa1972eee86134a56
parent92bed9086502ac322be553b4abf0a7dd11dfdfbb
drm/amd/display: Decrement refcount of dc_sink before reassignment

[why]
An old dc_sink state is causing a memory leak because it is missing a
dc_sink_release before a new dc_sink is assigned back to
aconnector->dc_sink.

[how]
Decrement the dc_sink refcount before reassigning it to a new dc_sink.

Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@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