diff options
author | Karol Wachowski <karol.wachowski@intel.com> | 2024-09-30 21:53:06 +0200 |
---|---|---|
committer | Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | 2024-10-11 12:44:38 +0200 |
commit | 707542dd1a56d23387dbf978bf107793840310cc (patch) | |
tree | 74b24b53395944e65a2e7890f81b52af6deccff2 /drivers/accel | |
parent | accel/ivpu: Allow reading dvfs_mode debugfs file (diff) | |
download | linux-707542dd1a56d23387dbf978bf107793840310cc.tar.xz linux-707542dd1a56d23387dbf978bf107793840310cc.zip |
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>
Diffstat (limited to 'drivers/accel')
-rw-r--r-- | drivers/accel/ivpu/ivpu_gem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c index 1b409dbd332d..d8e97a760fbc 100644 --- a/drivers/accel/ivpu/ivpu_gem.c +++ b/drivers/accel/ivpu/ivpu_gem.c @@ -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; |