summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_jiffies.h
blob: 18a4eaea897ad97f4059ba06911ffe84270c0084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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__ */