]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/compat: reduce i915_utils.[ch]
authorJani Nikula <jani.nikula@intel.com>
Wed, 22 Oct 2025 15:17:14 +0000 (18:17 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 31 Oct 2025 11:24:28 +0000 (13:24 +0200)
Reduce the compat i915_utils.h to only cover the requirements of
MISSING_CASE() in soc/ and the few i915_inject_probe_failure()
instances, instead of including the entire i915_utils.h from i915. This
prevents new users for the utilities from cropping up.

With this, we can remove the xe/display/ext/i915_utils.c altogether.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://patch.msgid.link/c02f82e45f31caf95bd1339080b9099c3b7190be.1761146196.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/compat-i915-headers/i915_utils.h
drivers/gpu/drm/xe/display/ext/i915_utils.c [deleted file]

index 016b566ff04f1e98bf630aa7117121294bfa2540..25a2f7b578029905406a23d74e1d64486ad0b941 100644 (file)
@@ -201,7 +201,6 @@ $(obj)/i915-display/%.o: $(srctree)/drivers/gpu/drm/i915/display/%.c FORCE
 # Display code specific to xe
 xe-$(CONFIG_DRM_XE_DISPLAY) += \
        display/ext/i915_irq.o \
-       display/ext/i915_utils.o \
        display/intel_bo.o \
        display/intel_fb_bo.o \
        display/intel_fbdev_fb.o \
index 1d7c4360e5c0a9be3ad1c4263ced85849f2dd83b..bcd441dc0fce50d36d72c286f492c70b4afb5c9b 100644 (file)
@@ -3,4 +3,11 @@
  * Copyright © 2023 Intel Corporation
  */
 
-#include "../../i915/i915_utils.h"
+/* for soc/ */
+#ifndef MISSING_CASE
+#define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
+                            __stringify(x), (long)(x))
+#endif
+
+/* for a couple of users under i915/display */
+#define i915_inject_probe_failure(unused) ((unused) && 0)
diff --git a/drivers/gpu/drm/xe/display/ext/i915_utils.c b/drivers/gpu/drm/xe/display/ext/i915_utils.c
deleted file mode 100644 (file)
index af9ec2a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: MIT
-/*
- * Copyright © 2023 Intel Corporation
- */
-
-#include "i915_utils.h"
-
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
-
-/* i915 specific, just put here for shutting it up */
-int __i915_inject_probe_error(struct drm_i915_private *i915, int err,
-                             const char *func, int line)
-{
-       return 0;
-}
-
-#endif