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");
}
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");
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");
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);
}