From: Yu Zhe Date: Thu, 25 Aug 2022 02:38:48 +0000 (+0800) Subject: drm/radeon: use time_after(a,b) to replace "a>b" X-Git-Tag: v6.1-rc5~176^2~19^2~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2387e21243ba8a2734322610daaf1eeaf1a146b4;p=platform%2Fkernel%2Flinux-starfive.git drm/radeon: use time_after(a,b) to replace "a>b" time_after() deals with timer wrapping correctly. Signed-off-by: Yu Zhe Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index e765abc..04c693c 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); }