Skip to content

Commit d968f2c

Browse files
Chen Yufangregkh
authored andcommitted
drm/imagination: Convert to use time_before macro
[ Upstream commit 7a5115b ] Use time_*() macros instead of using jiffies directly to handle overflow issues. Fixes: cc1aeed ("drm/imagination: Implement firmware infrastructure and META FW support") Signed-off-by: Chen Yufan <[email protected]> Reviewed-by: Matt Coster <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Matt Coster <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent b52718d commit d968f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/imagination/pvr_ccb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int pvr_kccb_reserve_slot_sync(struct pvr_device *pvr_dev)
321321
bool reserved = false;
322322
u32 retries = 0;
323323

324-
while ((jiffies - start_timestamp) < (u32)RESERVE_SLOT_TIMEOUT ||
324+
while (time_before(jiffies, start_timestamp + RESERVE_SLOT_TIMEOUT) ||
325325
retries < RESERVE_SLOT_MIN_RETRIES) {
326326
reserved = pvr_kccb_try_reserve_slot(pvr_dev);
327327
if (reserved)

0 commit comments

Comments
 (0)