]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config
authorJean Delvare <jdelvare@suse.de>
Mon, 28 Sep 2020 09:10:37 +0000 (11:10 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 29 Sep 2020 21:09:22 +0000 (17:09 -0400)
commitf7a3f1bc2c13d4840176abc199ff5ce459c9fbf3
treefc3f8c3f32b5a8ee8d5d3f9e433c8dbaffd2b332
parent9580c6e4ddf644f09c3e7a9c5e05a143da099afe
drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config

A recent attempt to fix a ref count leak in
amdgpu_display_crtc_set_config() turned out to be doing too much and
"fixed" an intended decrease as if it were a leak. Undo that part to
restore the proper balance. This is the very nature of this function
to increase or decrease the power reference count depending on the
situation.

Consequences of this bug is that the power reference would
eventually get down to 0 while the display was still in use,
resulting in that display switching off unexpectedly.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: cf70b50ce4b3 ("drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config")
Cc: stable@vger.kernel.org
Cc: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c