mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
accel/ivpu: Add one jiffy to bo_wait_ioctl timeout value
Add one jiffy to ensure wait function never times out before intended timeout value, which could happen if absolute timeout value is less than (1s / CONFIG_HZ) in the future. Signed-off-by: Karol Wachowski <karol.wachowski@intel.com> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-16-jacek.lawrynowicz@linux.intel.com Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
This commit is contained in:
parent
9f3814e822
commit
707542dd1a
|
|
@ -384,6 +384,9 @@ int ivpu_bo_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file
|
|||
|
||||
timeout = drm_timeout_abs_to_jiffies(args->timeout_ns);
|
||||
|
||||
/* Add 1 jiffy to ensure the wait function never times out before intended timeout_ns */
|
||||
timeout += 1;
|
||||
|
||||
obj = drm_gem_object_lookup(file, args->handle);
|
||||
if (!obj)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user