drm/amdgpu: use drm_fb helper for console_(un)lock
Subsystems (2)
PATCH 1/1 drm/amdgpu: use drm_fb helper for console_(un)lock
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++------ drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -6
@@ -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 ; }
@@ -2784,9 +2782,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);
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +2 -2
@@ -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)
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1532089848-31023-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org
Michel Dänzer
Reviewed-byQuoted 45 lines · Shirish S
This patch removes the usage of console_(un)lock by replacing
drm_fb_helper_set_suspend()todrm_fb_helper_set_suspend_unlocked()which locks and unlocks the console instead of locking ourselves.Signed-off-by Shirish S <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++------ drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-6@@ -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 ; }@@ -2784,9 +2782,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);drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c void amdgpu_fbdev_fini(struct amdgpu_device *adev) · line 380
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +2
-2@@ -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)
Thanks for doing this, looks good.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Harry Wentland
Reviewed-byQuoted 6 lines · Shirish S
This patch removes the usage of console_(un)lock by replacing
drm_fb_helper_set_suspend()todrm_fb_helper_set_suspend_unlocked()which locks and unlocks the console instead of locking ourselves.Signed-off-by Shirish S <[email protected]>
Harry
Quoted 39 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++------ drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-6@@ -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 ; }@@ -2784,9 +2782,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);drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c void amdgpu_fbdev_fini(struct amdgpu_device *adev) · line 380
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +2
-2@@ -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)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx