time_after() deals with timer wrapping correctly.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* to false since we want to wait for vbl to avoid flicker.
*/
if (rdev->pm.dynpm_planned_action != DYNPM_ACTION_NONE &&
* to false since we want to wait for vbl to avoid flicker.
*/
if (rdev->pm.dynpm_planned_action != DYNPM_ACTION_NONE &&
- jiffies > rdev->pm.dynpm_action_timeout) {
+ time_after(jiffies, rdev->pm.dynpm_action_timeout)) {
radeon_pm_get_dynpm_state(rdev);
radeon_pm_set_clocks(rdev);
}
radeon_pm_get_dynpm_state(rdev);
radeon_pm_set_clocks(rdev);
}