diff mbox series

[1/2] drm/xe/compat: refactor compat i915_drv.h

Message ID 20250228142539.3216960-1-jani.nikula@intel.com (mailing list archive)
State New
Headers show
Series [1/2] drm/xe/compat: refactor compat i915_drv.h | expand

Commit Message

Jani Nikula Feb. 28, 2025, 2:25 p.m. UTC
The compat i915_drv.h contains things that aren't there in the original
i915_drv.h. Split out gem/i915_gem_object.h and i915_scheduler_types.h,
moving the corresponding pieces out, including FORCEWAKE_ALL to
intel_uncore.h.

Technically I915_PRIORITY_DISPLAY should be in i915_priolist_types.h,
but it's a bit overkill to split out another file just for
that. i915_scheduler_types.h shall do.

With this, the compat i915_drv.h becomes a strict subset of the
original.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic_plane.c |  4 +++-
 .../xe/compat-i915-headers/gem/i915_gem_object.h  | 15 +++++++++++++++
 drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h |  8 --------
 .../xe/compat-i915-headers/i915_scheduler_types.h | 13 +++++++++++++
 .../gpu/drm/xe/compat-i915-headers/intel_uncore.h |  2 ++
 5 files changed, 33 insertions(+), 9 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
 create mode 100644 drivers/gpu/drm/xe/compat-i915-headers/i915_scheduler_types.h

Comments

kernel test robot Feb. 28, 2025, 7:16 p.m. UTC | #1
Hi Jani,

kernel test robot noticed the following build warnings:

[auto build test WARNING on next-20250228]
[also build test WARNING on linus/master v6.14-rc4]
[cannot apply to drm-xe/drm-xe-next v6.14-rc4 v6.14-rc3 v6.14-rc2]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jani-Nikula/drm-i915-plane-convert-intel_atomic_plane-ch-to-struct-intel_display/20250228-222835
base:   next-20250228
patch link:    https://lore.kernel.org/r/20250228142539.3216960-1-jani.nikula%40intel.com
patch subject: [PATCH 1/2] drm/xe/compat: refactor compat i915_drv.h
config: arm-randconfig-003-20250301 (https://download.01.org/0day-ci/archive/20250301/202503010231.ZOOOjLUU-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 14170b16028c087ca154878f5ed93d3089a965c6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250301/202503010231.ZOOOjLUU-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503010231.ZOOOjLUU-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/display/intel_atomic_plane.c:37:
   In file included from include/drm/drm_atomic_helper.h:31:
   In file included from include/drm/drm_crtc.h:32:
   In file included from include/drm/drm_modes.h:33:
   In file included from include/drm/drm_connector.h:32:
   In file included from include/drm/drm_util.h:36:
   In file included from include/linux/kgdb.h:19:
   In file included from include/linux/kprobes.h:28:
   In file included from include/linux/ftrace.h:13:
   In file included from include/linux/kallsyms.h:13:
   In file included from include/linux/mm.h:2287:
   include/linux/vmstat.h:507:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     507 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/gpu/drm/i915/display/intel_atomic_plane.c:43:
>> drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:4:9: warning: '__I915_GEM_OBJECT_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard]
       4 | #ifndef __I915_GEM_OBJECT_H__
         |         ^~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:5:9: note: '__i915_GEM_OBJECT_H__' is defined here; did you mean '__I915_GEM_OBJECT_H__'?
       5 | #define __i915_GEM_OBJECT_H__
         |         ^~~~~~~~~~~~~~~~~~~~~
         |         __I915_GEM_OBJECT_H__
   2 warnings generated.


vim +/__I915_GEM_OBJECT_H__ +4 drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h

     3	
   > 4	#ifndef __I915_GEM_OBJECT_H__
     5	#define __i915_GEM_OBJECT_H__
     6
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index 05dcfa3bea73..181ad7468d85 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -40,8 +40,10 @@ 
 #include <drm/drm_gem.h>
 #include <drm/drm_gem_atomic_helper.h>
 
-#include "i915_drv.h"
+#include "gem/i915_gem_object.h"
 #include "i915_config.h"
+#include "i915_drv.h"
+#include "i915_scheduler_types.h"
 #include "i9xx_plane_regs.h"
 #include "intel_atomic_plane.h"
 #include "intel_cdclk.h"
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
new file mode 100644
index 000000000000..03f35dce7b93
--- /dev/null
+++ b/drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h
@@ -0,0 +1,15 @@ 
+/* SPDX-License-Identifier: MIT */
+/* Copyright © 2025 Intel Corporation */
+
+#ifndef __I915_GEM_OBJECT_H__
+#define __i915_GEM_OBJECT_H__
+
+struct dma_fence;
+struct i915_sched_attr;
+
+static inline void i915_gem_fence_wait_priority(struct dma_fence *fence,
+						const struct i915_sched_attr *attr)
+{
+}
+
+#endif
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
index 84b0991b35b3..dfec5108d2c3 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h
@@ -95,14 +95,6 @@  static inline struct drm_i915_private *to_i915(const struct drm_device *dev)
 
 #define HAS_128_BYTE_Y_TILING(xe) (xe || 1)
 
-#define I915_PRIORITY_DISPLAY 0
-struct i915_sched_attr {
-	int priority;
-};
-#define i915_gem_fence_wait_priority(fence, attr) do { (void) attr; } while (0)
-
-#define FORCEWAKE_ALL XE_FORCEWAKE_ALL
-
 #ifdef CONFIG_ARM64
 /*
  * arm64 indirectly includes linux/rtc.h,
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_scheduler_types.h b/drivers/gpu/drm/xe/compat-i915-headers/i915_scheduler_types.h
new file mode 100644
index 000000000000..c11130440d31
--- /dev/null
+++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_scheduler_types.h
@@ -0,0 +1,13 @@ 
+/* SPDX-License-Identifier: MIT */
+/* Copyright © 2025 Intel Corporation */
+
+#ifndef __I915_SCHEDULER_TYPES_H__
+#define __I915_SCHEDULER_TYPES_H__
+
+#define I915_PRIORITY_DISPLAY 0
+
+struct i915_sched_attr {
+	int priority;
+};
+
+#endif
diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h
index 4fc3e535de91..0c1e88e36a1e 100644
--- a/drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h
+++ b/drivers/gpu/drm/xe/compat-i915-headers/intel_uncore.h
@@ -10,6 +10,8 @@ 
 #include "xe_device_types.h"
 #include "xe_mmio.h"
 
+#define FORCEWAKE_ALL XE_FORCEWAKE_ALL
+
 static inline struct intel_uncore *to_intel_uncore(struct drm_device *drm)
 {
 	return &to_xe_device(drm)->uncore;