* [PATCH] drm/radeon: use time_after(a,b) to replace "a>b"
@ 2022-08-25 2:38 Yu Zhe
2022-08-25 15:45 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Yu Zhe @ 2022-08-25 2:38 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel
Cc: liqiong, Yu Zhe, dri-devel, amd-gfx
time_after() deals with timer wrapping correctly.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
drivers/gpu/drm/radeon/radeon_pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/radeon: use time_after(a,b) to replace "a>b"
2022-08-25 2:38 [PATCH] drm/radeon: use time_after(a,b) to replace "a>b" Yu Zhe
@ 2022-08-25 15:45 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2022-08-25 15:45 UTC (permalink / raw)
To: Yu Zhe
Cc: airlied, Xinhui.Pan, dri-devel, liqiong, amd-gfx,
alexander.deucher, christian.koenig
Applied. Thanks!
Alex
On Wed, Aug 24, 2022 at 10:40 PM Yu Zhe <yuzhe@nfschina.com> wrote:
>
> time_after() deals with timer wrapping correctly.
>
> Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
> ---
> drivers/gpu/drm/radeon/radeon_pm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
> }
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-25 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 2:38 [PATCH] drm/radeon: use time_after(a,b) to replace "a>b" Yu Zhe
2022-08-25 15:45 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).