This is a note to let you know that I've just added the patch titled drm/imagination: Convert to use time_before macro to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-imagination-convert-to-use-time_before-macro.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 41c6d3cab2c1fb12c5913bb8f10dbda1e4bbde62 Author: Chen Yufan <chenyufan@xxxxxxxx> Date: Fri Aug 23 17:39:24 2024 +0800 drm/imagination: Convert to use time_before macro [ Upstream commit 7a5115ba1d691bd14db91d2fcc3ce0b056574ce9 ] 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@xxxxxxxx> Reviewed-by: Matt Coster <matt.coster@xxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20240823093925.9599-1-chenyufan@xxxxxxxx Signed-off-by: Matt Coster <matt.coster@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/gpu/drm/imagination/pvr_ccb.c b/drivers/gpu/drm/imagination/pvr_ccb.c index 4deeac7ed40a4..2bbdc05a3b977 100644 --- 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)