Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915: split out i915_list_util.h

Move list related utilities from i915_utils.h to separate new file
i915_list_util.h. Clean up related includes.

Note: Arguably none of this should exist in i915 in the first place. At
least isolate it better.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/d7526809735194137116682f37cfa126a6a87ec9.1757582214.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

+26 -15
+1
drivers/gpu/drm/i915/gt/intel_execlists_submission.c
··· 112 112 113 113 #include "gen8_engine_cs.h" 114 114 #include "i915_drv.h" 115 + #include "i915_list_util.h" 115 116 #include "i915_reg.h" 116 117 #include "i915_timer_util.h" 117 118 #include "i915_trace.h"
+1
drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c
··· 7 7 #include "gem/i915_gem_object.h" 8 8 9 9 #include "i915_drv.h" 10 + #include "i915_list_util.h" 10 11 #include "intel_engine_pm.h" 11 12 #include "intel_gt_buffer_pool.h" 12 13
+1 -1
drivers/gpu/drm/i915/gt/intel_timeline.h
··· 9 9 #include <linux/lockdep.h> 10 10 11 11 #include "i915_active.h" 12 + #include "i915_list_util.h" 12 13 #include "i915_syncmap.h" 13 - #include "i915_utils.h" 14 14 #include "intel_timeline_types.h" 15 15 16 16 struct drm_printer;
+23
drivers/gpu/drm/i915/i915_list_util.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + /* Copyright © 2025 Intel Corporation */ 3 + 4 + #ifndef __I915_LIST_UTIL_H__ 5 + #define __I915_LIST_UTIL_H__ 6 + 7 + #include <linux/list.h> 8 + #include <asm/rwonce.h> 9 + 10 + static inline void __list_del_many(struct list_head *head, 11 + struct list_head *first) 12 + { 13 + first->prev = head; 14 + WRITE_ONCE(head->next, first); 15 + } 16 + 17 + static inline int list_is_last_rcu(const struct list_head *list, 18 + const struct list_head *head) 19 + { 20 + return READ_ONCE(list->next) == head; 21 + } 22 + 23 + #endif /* __I915_LIST_UTIL_H__ */
-14
drivers/gpu/drm/i915/i915_utils.h
··· 25 25 #ifndef __I915_UTILS_H 26 26 #define __I915_UTILS_H 27 27 28 - #include <linux/list.h> 29 28 #include <linux/overflow.h> 30 29 #include <linux/sched.h> 31 30 #include <linux/string_helpers.h> ··· 98 99 static inline bool is_power_of_2_u64(u64 n) 99 100 { 100 101 return (n != 0 && ((n & (n - 1)) == 0)); 101 - } 102 - 103 - static inline void __list_del_many(struct list_head *head, 104 - struct list_head *first) 105 - { 106 - first->prev = head; 107 - WRITE_ONCE(head->next, first); 108 - } 109 - 110 - static inline int list_is_last_rcu(const struct list_head *list, 111 - const struct list_head *head) 112 - { 113 - return READ_ONCE(list->next) == head; 114 102 } 115 103 116 104 static inline unsigned long msecs_to_jiffies_timeout(const unsigned int m)