Skip to content

Commit

Permalink
drm/radeon: use time_after(a,b) to replace "a>b"
Browse files Browse the repository at this point in the history
time_after() deals with timer wrapping correctly.

Signed-off-by: Yu Zhe <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
yuzhenfschina authored and alexdeucher committed Aug 25, 2022
1 parent 638bc30 commit 2387e21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,7 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work)
* 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);
}
Expand Down

0 comments on commit 2387e21

Please sign in to comment.