]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: use drm_fb helper for console_(un)lock
authorShirish S <shirish.s@amd.com>
Fri, 20 Jul 2018 11:56:50 +0000 (17:26 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 20 Jul 2018 19:24:18 +0000 (14:24 -0500)
This patch removes the usage of console_(un)lock
by replacing drm_fb_helper_set_suspend() to
drm_fb_helper_set_suspend_unlocked() which locks and
unlocks the console instead of locking ourselves.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c

index fddf54773a6ea8eadda94b3e9a66730087a50f61..e57f90f444c593a777f677bc2652ea4edb1bedf2 100644 (file)
@@ -2691,11 +2691,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
                        DRM_ERROR("amdgpu asic reset failed\n");
        }
 
-       if (fbcon) {
-               console_lock();
+       if (fbcon)
                amdgpu_fbdev_set_suspend(adev, 1);
-               console_unlock();
-       }
+
        return 0;
 }
 
@@ -2780,9 +2778,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
                        }
                        drm_modeset_unlock_all(dev);
                }
-               console_lock();
                amdgpu_fbdev_set_suspend(adev, 0);
-               console_unlock();
        }
 
        drm_kms_helper_poll_enable(dev);
index d44b76455e896a539d9c859914059746fe70d25b..69c5d22f29bdf96fb44aba06111d7a347c91f533 100644 (file)
@@ -373,8 +373,8 @@ void amdgpu_fbdev_fini(struct amdgpu_device *adev)
 void amdgpu_fbdev_set_suspend(struct amdgpu_device *adev, int state)
 {
        if (adev->mode_info.rfbdev)
-               drm_fb_helper_set_suspend(&adev->mode_info.rfbdev->helper,
-                       state);
+               drm_fb_helper_set_suspend_unlocked(&adev->mode_info.rfbdev->helper,
+                                                  state);
 }
 
 int amdgpu_fbdev_total_size(struct amdgpu_device *adev)