* [PATCH] drm/amdgpu: use drm_fb helper for console_(un)lock @ 2018-07-20 12:30 Shirish S [not found] ` <1532089848-31023-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Shirish S @ 2018-07-20 12:30 UTC (permalink / raw) To: alexander.deucher-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo, michel-otUistvHUpPR7s880joybQ Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Shirish S 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> --- 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(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 022c136..a759b74 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -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); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c index d44b764..69c5d22 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c @@ -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) -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1532089848-31023-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: use drm_fb helper for console_(un)lock [not found] ` <1532089848-31023-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org> @ 2018-07-20 13:57 ` Michel Dänzer 2018-07-20 15:26 ` Harry Wentland 1 sibling, 0 replies; 3+ messages in thread From: Michel Dänzer @ 2018-07-20 13:57 UTC (permalink / raw) To: Shirish S, alexander.deucher-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On 2018-07-20 02:30 PM, Shirish S wrote: > 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> > --- > 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(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 022c136..a759b74 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -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); > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c > index d44b764..69c5d22 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c > @@ -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. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: use drm_fb helper for console_(un)lock [not found] ` <1532089848-31023-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org> 2018-07-20 13:57 ` Michel Dänzer @ 2018-07-20 15:26 ` Harry Wentland 1 sibling, 0 replies; 3+ messages in thread From: Harry Wentland @ 2018-07-20 15:26 UTC (permalink / raw) To: Shirish S, alexander.deucher-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo, michel-otUistvHUpPR7s880joybQ Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On 2018-07-20 08:30 AM, Shirish S wrote: > 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: Harry Wentland <harry.wentland@amd.com> Harry > --- > 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(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 022c136..a759b74 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -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); > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c > index d44b764..69c5d22 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c > @@ -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 amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-20 15:26 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-07-20 12:30 [PATCH] drm/amdgpu: use drm_fb helper for console_(un)lock Shirish S [not found] ` <1532089848-31023-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org> 2018-07-20 13:57 ` Michel Dänzer 2018-07-20 15:26 ` Harry Wentland
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.