diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_jiffies.h')
| -rw-r--r-- | drivers/gpu/drm/i915/i915_jiffies.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_jiffies.h b/drivers/gpu/drm/i915/i915_jiffies.h new file mode 100644 index 000000000000..18a4eaea897a --- /dev/null +++ b/drivers/gpu/drm/i915/i915_jiffies.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright © 2025 Intel Corporation */ + +#ifndef __I915_JIFFIES_H__ +#define __I915_JIFFIES_H__ + +#include <linux/jiffies.h> + +static inline unsigned long msecs_to_jiffies_timeout(const unsigned int m) +{ + unsigned long j = msecs_to_jiffies(m); + + return min_t(unsigned long, MAX_JIFFY_OFFSET, j + 1); +} + +#endif /* __I915_JIFFIES_H__ */ |
