summary refs log tree commit diff
diff options
context:
space:
mode:
authorYu Zhe <yuzhe@nfschina.com>2022-08-25 10:38:48 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-08-25 13:35:18 -0400
commit2387e21243ba8a2734322610daaf1eeaf1a146b4 (patch)
tree8c7d2006c0e3292f1c91176ef4c9783e55b66182
parent638bc30f8579bf4e0fda42a0c271149c6ab9c893 (diff)
downloadlinux-2387e21243ba8a2734322610daaf1eeaf1a146b4.tar.gz
drm/radeon: use time_after(a,b) to replace "a>b"
time_after() deals with timer wrapping correctly.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index e765abcb3b01..04c693ca419a 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -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);
 		}