Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196516
b: refs/heads/master
c: 58e21df
h: refs/heads/master
v: v3
  • Loading branch information
Alex Deucher authored and Dave Airlie committed May 18, 2010
1 parent e390410 commit 7153c71
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 79daedc942813c0417ff5e277da6f7f35705cde5
refs/heads/master: 58e21dff53b9063563e7bb5f5a795ab2d8f61dda
4 changes: 4 additions & 0 deletions trunk/drivers/gpu/drm/radeon/r100.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ void r100_get_power_state(struct radeon_device *rdev,
rdev->pm.current_power_state_index + 1;
}
break;
case PM_ACTION_DEFAULT:
rdev->pm.requested_power_state_index = rdev->pm.default_power_state_index;
rdev->pm.can_upclock = false;
break;
case PM_ACTION_NONE:
default:
DRM_ERROR("Requested mode for not defined action\n");
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/gpu/drm/radeon/r600.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ void r600_get_power_state(struct radeon_device *rdev,
}
rdev->pm.requested_clock_mode_index = 0;
break;
case PM_ACTION_DEFAULT:
rdev->pm.requested_power_state_index = rdev->pm.default_power_state_index;
rdev->pm.requested_clock_mode_index = 0;
rdev->pm.can_upclock = false;
break;
case PM_ACTION_NONE:
default:
DRM_ERROR("Requested mode for not defined action\n");
Expand Down Expand Up @@ -221,6 +226,11 @@ void r600_get_power_state(struct radeon_device *rdev,
rdev->pm.can_upclock = false;
}
break;
case PM_ACTION_DEFAULT:
rdev->pm.requested_power_state_index = rdev->pm.default_power_state_index;
rdev->pm.requested_clock_mode_index = 0;
rdev->pm.can_upclock = false;
break;
case PM_ACTION_NONE:
default:
DRM_ERROR("Requested mode for not defined action\n");
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/gpu/drm/radeon/radeon.h
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,8 @@ enum radeon_pm_action {
PM_ACTION_NONE,
PM_ACTION_MINIMUM,
PM_ACTION_DOWNCLOCK,
PM_ACTION_UPCLOCK
PM_ACTION_UPCLOCK,
PM_ACTION_DEFAULT
};

enum radeon_voltage_type {
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/gpu/drm/radeon/radeon_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ int radeon_pm_init(struct radeon_device *rdev)

void radeon_pm_fini(struct radeon_device *rdev)
{
if (rdev->pm.state != PM_STATE_DISABLED) {
/* cancel work */
cancel_delayed_work_sync(&rdev->pm.idle_work);
/* reset default clocks */
rdev->pm.state = PM_STATE_DISABLED;
rdev->pm.planned_action = PM_ACTION_DEFAULT;
radeon_pm_set_clocks(rdev);
}

if (rdev->pm.i2c_bus)
radeon_i2c_destroy(rdev->pm.i2c_bus);
}
Expand Down

0 comments on commit 7153c71

Please sign in to comment.