From: "Christian König" <deathsimple@vodafone.de>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 2/9] drm/radeon: fix pm handling in radeon_gpu_reset
Date: Tue, 26 Aug 2014 18:35:03 +0200 [thread overview]
Message-ID: <1409070910-2549-2-git-send-email-deathsimple@vodafone.de> (raw)
In-Reply-To: <1409070910-2549-1-git-send-email-deathsimple@vodafone.de>
From: Alex Deucher <alexander.deucher@amd.com>
pm_suspend is handled in the radeon_suspend callbacks.
pm_resume has special handling depending on whether
dpm or legacy pm is enabled. Change radeon_gpu_reset
to mirror the behavior in the suspend and resume
pathes.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/radeon/radeon_device.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 152181d..d2ff12e 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1682,7 +1682,6 @@ int radeon_gpu_reset(struct radeon_device *rdev)
radeon_save_bios_scratch_regs(rdev);
/* block TTM */
resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev);
- radeon_pm_suspend(rdev);
radeon_suspend(rdev);
for (i = 0; i < RADEON_NUM_RINGS; ++i) {
@@ -1728,9 +1727,24 @@ retry:
}
}
- radeon_pm_resume(rdev);
+ if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled) {
+ /* do dpm late init */
+ r = radeon_pm_late_init(rdev);
+ if (r) {
+ rdev->pm.dpm_enabled = false;
+ DRM_ERROR("radeon_pm_late_init failed, disabling dpm\n");
+ }
+ } else {
+ /* resume old pm late */
+ radeon_pm_resume(rdev);
+ }
+
drm_helper_resume_force_mode(rdev->ddev);
+ /* set the power state here in case we are a PX system or headless */
+ if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled)
+ radeon_pm_compute_clocks(rdev);
+
ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched);
if (r) {
/* bad news, how to tell it to userspace ? */
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-08-26 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 16:35 [PATCH 1/9] drm/radeon: wake up all fences on manual reset Christian König
2014-08-26 16:35 ` Christian König [this message]
2014-08-26 16:35 ` [PATCH 3/9] drm/radeon: fix display handling in radeon_gpu_reset Christian König
2014-08-26 16:35 ` [PATCH 4/9] drm/radeon: force fence completion only on problematic rings Christian König
2014-08-26 16:35 ` [PATCH 5/9] drm/radeon: take exclusive_lock in read mode during ring tests, v4 Christian König
2014-08-26 16:35 ` [PATCH 6/9] drm/radeon: handle lockup in delayed work, v5 Christian König
2014-08-26 16:35 ` [PATCH 7/9] drm/radeon: add timeout argument to, radeon_fence_wait_seq v2 Christian König
2014-08-26 16:35 ` [PATCH 8/9] drm/radeon: drop RADEON_FENCE_SIGNALED_SEQ v2 Christian König
2014-08-26 16:35 ` [PATCH 9/9] drm/radeon: drop doing resets in a work item Christian König
2014-08-27 3:33 ` [PATCH 1/9] drm/radeon: wake up all fences on manual reset Michel Dänzer
-- strict thread matches above, loose matches on Subject: below --
2014-08-27 13:21 drm/radeon: reset patches and common fence preparation Christian König
2014-08-27 13:21 ` [PATCH 2/9] drm/radeon: fix pm handling in radeon_gpu_reset Christian König
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=1409070910-2549-2-git-send-email-deathsimple@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox