drm/i915: split out i915_gem_evict.h from i915_drv.h
authorJani Nikula <jani.nikula@intel.com>
Fri, 7 Jan 2022 13:20:45 +0000 (15:20 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 10 Jan 2022 13:43:12 +0000 (15:43 +0200)
We already have the i915_gem_evict.c file.

v2: Fixed commit message (Tvrtko)

Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ec666853171d04daeb21a93083940df36907c343.1641561552.git.jani.nikula@intel.com
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gt/selftest_hangcheck.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_evict.c
drivers/gpu/drm/i915/i915_gem_evict.h [new file with mode: 0644]
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_vma.c

index 333bb30e4a3274737cfb45b99b31eeff009837b3..1ff1b76d52061ee158b24fb5b3642b17ceb64d7c 100644 (file)
@@ -27,6 +27,7 @@
 #include "i915_drv.h"
 #include "i915_gem_clflush.h"
 #include "i915_gem_context.h"
+#include "i915_gem_evict.h"
 #include "i915_gem_ioctls.h"
 #include "i915_trace.h"
 #include "i915_user_extensions.h"
index 7e2d99dd012d816b7bd5801d6faecd7634169a79..32f8b4f96cfa3b82d84e4fec0cf7212aabc74c6b 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "gem/i915_gem_context.h"
 
+#include "i915_gem_evict.h"
 #include "intel_gt.h"
 #include "intel_engine_heartbeat.h"
 #include "intel_engine_pm.h"
index cff38a82b659de162267e8347723e90886d0ca62..faff3a17fcd725c0f56437d53b7de672fa02ac56 100644 (file)
@@ -1703,17 +1703,6 @@ i915_gem_vm_lookup(struct drm_i915_file_private *file_priv, u32 id)
        return vm;
 }
 
-/* i915_gem_evict.c */
-int __must_check i915_gem_evict_something(struct i915_address_space *vm,
-                                         u64 min_size, u64 alignment,
-                                         unsigned long color,
-                                         u64 start, u64 end,
-                                         unsigned flags);
-int __must_check i915_gem_evict_for_node(struct i915_address_space *vm,
-                                        struct drm_mm_node *node,
-                                        unsigned int flags);
-int i915_gem_evict_vm(struct i915_address_space *vm);
-
 /* i915_gem_internal.c */
 struct drm_i915_gem_object *
 i915_gem_object_create_internal(struct drm_i915_private *dev_priv,
index 2b73ddb11c66fc034b8e6e5425324fca0e216bee..24eee0c2055f3b491530b3e4e0c786d56e5ff8f6 100644 (file)
@@ -31,6 +31,7 @@
 #include "gt/intel_gt_requests.h"
 
 #include "i915_drv.h"
+#include "i915_gem_evict.h"
 #include "i915_trace.h"
 
 I915_SELFTEST_DECLARE(static struct igt_evict_ctl {
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.h b/drivers/gpu/drm/i915/i915_gem_evict.h
new file mode 100644 (file)
index 0000000..d4478b6
--- /dev/null
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2021 Intel Corporation
+ */
+
+#ifndef __I915_GEM_EVICT_H__
+#define __I915_GEM_EVICT_H__
+
+#include <linux/types.h>
+
+struct drm_mm_node;
+struct i915_address_space;
+
+int __must_check i915_gem_evict_something(struct i915_address_space *vm,
+                                         u64 min_size, u64 alignment,
+                                         unsigned long color,
+                                         u64 start, u64 end,
+                                         unsigned flags);
+int __must_check i915_gem_evict_for_node(struct i915_address_space *vm,
+                                        struct drm_mm_node *node,
+                                        unsigned int flags);
+int i915_gem_evict_vm(struct i915_address_space *vm);
+
+#endif /* __I915_GEM_EVICT_H__ */
index cd5f2348a18740bfb7a44119acf4eef636cc5838..8a7f0d92b56fd15d1818642bd3134f4bcd2a4c3a 100644 (file)
@@ -20,6 +20,7 @@
 #include "gt/intel_gt_requests.h"
 
 #include "i915_drv.h"
+#include "i915_gem_evict.h"
 #include "i915_scatterlist.h"
 #include "i915_trace.h"
 #include "i915_vgpu.h"
index bef795e265a66d515d6aeaf511b2adee6fe06b59..84ecaa59baddd459f358a93097f3c9103bd517f8 100644 (file)
@@ -34,6 +34,7 @@
 #include "gt/intel_gt_requests.h"
 
 #include "i915_drv.h"
+#include "i915_gem_evict.h"
 #include "i915_sw_fence_work.h"
 #include "i915_trace.h"
 #include "i915_vma.h"