drm/amdgpu: fix uninitialized return value
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix uninitialized return value
The amdgpu_display_suspend_helper() function uses an uninitialized
variable as its return value, causing a failure to suspend/resume on a
Radeon R7 240/340 GPU, with the following error in dmesg:
[drm:amdgpu_device_ip_suspend_phase1 [amdgpu]] *ERROR* suspend of IP block <dce_v6_0> failed 118489088
Initialize the variable to 0.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
@@ -1544,7 +1544,7 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev)struct drm_crtc *crtc;struct drm_connector *connector;struct drm_connector_list_iter iter; -int r; +int r =0 ;/* turn off display hw */ drm_modeset_lock_all (dev);
--
2.31.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 9 lines · On Tue, May 11, 2021 at 1:25 PM ts8060 <[email protected]> wrote:
The
amdgpu_display_suspend_helper()function uses an uninitialized
variable as its return value, causing a failure to suspend/resume on a
Radeon R7 240/340 GPU, with the following error in dmesg:
[drm:amdgpu_device_ip_suspend_phase1 [amdgpu]] *ERROR* suspend of IP block <dce_v6_0> failed 118489088Initialize the variable to 0.
Signed-off-by Tim Saunders <[email protected]>
Already fixed here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4b12ee6f426e5e36396501a58f3a1af5b92a7e06
Alex
Quoted 18 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1
-2@@ -1544,7 +1544,7 @@ int amdgpu_display_suspend_helper(struct amdgpu_device *adev)struct drm_crtc *crtc;struct drm_connector *connector;struct drm_connector_list_iter iter; -int r; +int r =0 ;/* turn off display hw */ drm_modeset_lock_all (dev); --
Quoted 5 lines
2.31.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx