FILE
i915_timer_util.h
File preview with syntax highlighting.
linux-6.19.14/drivers/gpu/drm/i915/i915_timer_util.h
1/* SPDX-License-Identifier: MIT */ 2/* Copyright © 2025 Intel Corporation */ 3 4#ifndef __I915_TIMER_UTIL_H__ 5#define __I915_TIMER_UTIL_H__ 6 7#include <linux/timer.h> 8#include <asm/rwonce.h> 9 10void cancel_timer(struct timer_list *t); 11void set_timer_ms(struct timer_list *t, unsigned long timeout); 12 13static inline bool timer_active(const struct timer_list *t) 14{ 15 return READ_ONCE(t->expires); 16} 17 18static inline bool timer_expired(const struct timer_list *t) 19{ 20 return timer_active(t) && !timer_pending(t); 21} 22 23#endif /* __I915_TIMER_UTIL_H__ */
~/
Read-only file preview.