projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3973a8d
)
drm/imagination: Convert to use time_before macro
author
Chen Yufan
<chenyufan@vivo.com>
Fri, 23 Aug 2024 09:39:24 +0000
(17:39 +0800)
committer
Matt Coster
<matt.coster@imgtec.com>
Fri, 30 Aug 2024 14:17:03 +0000
(15:17 +0100)
Use time_*() macros instead of using jiffies directly to handle overflow
issues.
Fixes:
cc1aeedb98ad
("drm/imagination: Implement firmware infrastructure and META FW support")
Signed-off-by: Chen Yufan <chenyufan@vivo.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20240823093925.9599-1-chenyufan@vivo.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
drivers/gpu/drm/imagination/pvr_ccb.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/imagination/pvr_ccb.c
b/drivers/gpu/drm/imagination/pvr_ccb.c
index
4deeac7
..
2bbdc05
100644
(file)
--- a/
drivers/gpu/drm/imagination/pvr_ccb.c
+++ b/
drivers/gpu/drm/imagination/pvr_ccb.c
@@
-321,7
+321,7
@@
static int pvr_kccb_reserve_slot_sync(struct pvr_device *pvr_dev)
bool reserved = false;
u32 retries = 0;
- while (
(jiffies - start_timestamp) < (u32)RESERVE_SLOT_TIMEOUT
||
+ while (
time_before(jiffies, start_timestamp + RESERVE_SLOT_TIMEOUT)
||
retries < RESERVE_SLOT_MIN_RETRIES) {
reserved = pvr_kccb_try_reserve_slot(pvr_dev);
if (reserved)