From: jimqu <Jim.Qu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: jimqu <Jim.Qu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH] drm/amd/amdgpu: S3 resume fail
Date: Wed, 10 Aug 2016 11:04:01 +0800 [thread overview]
Message-ID: <1470798241-30117-1-git-send-email-Jim.Qu@amd.com> (raw)
Doing S3 stress test, sometimes, driver can not get console lock. So use
console_trylock() to instead it.
Change-Id: I50177f3d7dbb923cb4f602a11ea51c397b12b3e6
Signed-off-by: JimQu <Jim.Qu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 087e520..bd5387d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1889,9 +1889,6 @@ int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon)
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
- if (fbcon) {
- console_lock();
- }
if (resume) {
pci_set_power_state(dev->pdev, PCI_D0);
pci_restore_state(dev->pdev);
@@ -1989,6 +1986,8 @@ int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon)
#endif
if (fbcon) {
+ if (!console_trylock())
+ return 0;
amdgpu_fbdev_set_suspend(adev, 0);
console_unlock();
}
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2016-08-10 3:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-10 3:04 jimqu [this message]
[not found] ` <1470798241-30117-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2016-08-10 3:24 ` [PATCH] drm/amd/amdgpu: S3 resume fail Michel Dänzer
[not found] ` <efcd0456-211f-25cf-e173-a7a71ff8d2a6-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-10 3:28 ` Michel Dänzer
[not found] ` <5873b905-5835-0b33-7814-43d9cb377a29-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-10 4:39 ` 答复: " Qu, Jim
[not found] ` <BY2PR12MB06141D01D607DB4D7FE2B155991D0-K//h7OWB4q5SmL+xRiD5tgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-08-10 6:54 ` Michel Dänzer
[not found] ` <0638514e-e893-f21d-64bf-85399b542453-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-13 6:56 ` 答复: " Qu, Jim
[not found] ` <BY2PR12MB0614C7B2175A68AA49B966EE99100-K//h7OWB4q5SmL+xRiD5tgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-08-13 8:51 ` Christian König
[not found] ` <3f9fbabd-53ba-6c7a-ca55-6c9ad78791cf-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-15 1:47 ` 答复: " Qu, Jim
2016-08-15 0:44 ` Michel Dänzer
[not found] ` <05b699c4-d38d-b38b-2c30-4b1ca99fecb1-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-15 1:48 ` 答复: " Qu, Jim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1470798241-30117-1-git-send-email-Jim.Qu@amd.com \
--to=jim.qu-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.