diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-03-22 13:31:08 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 04:21:10 -0400 |
commit | 58e21dff53b9063563e7bb5f5a795ab2d8f61dda (patch) | |
tree | e583e93b5685a8904058820f191048198c73a87f /drivers/gpu/drm/radeon/radeon_pm.c | |
parent | 79daedc942813c0417ff5e277da6f7f35705cde5 (diff) |
drm/radeon/kms/pm: restore default power state on exit
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 87814eb8a1b4..23b79ebce6c1 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -125,6 +125,15 @@ int radeon_pm_init(struct radeon_device *rdev) | |||
125 | 125 | ||
126 | void radeon_pm_fini(struct radeon_device *rdev) | 126 | void radeon_pm_fini(struct radeon_device *rdev) |
127 | { | 127 | { |
128 | if (rdev->pm.state != PM_STATE_DISABLED) { | ||
129 | /* cancel work */ | ||
130 | cancel_delayed_work_sync(&rdev->pm.idle_work); | ||
131 | /* reset default clocks */ | ||
132 | rdev->pm.state = PM_STATE_DISABLED; | ||
133 | rdev->pm.planned_action = PM_ACTION_DEFAULT; | ||
134 | radeon_pm_set_clocks(rdev); | ||
135 | } | ||
136 | |||
128 | if (rdev->pm.i2c_bus) | 137 | if (rdev->pm.i2c_bus) |
129 | radeon_i2c_destroy(rdev->pm.i2c_bus); | 138 | radeon_i2c_destroy(rdev->pm.i2c_bus); |
130 | } | 139 | } |