]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/i915/selftests: Make headers self-contained
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 3 Jan 2020 10:45:16 +0000 (10:45 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 3 Jan 2020 13:33:36 +0000 (13:33 +0000)
Include the types used by the headers to they can be compiled
standalone.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200103104516.1757103-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/gem/selftests/huge_gem_object.h
drivers/gpu/drm/i915/gem/selftests/mock_gem_object.h
drivers/gpu/drm/i915/selftests/i915_live_selftests.h
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h
drivers/gpu/drm/i915/selftests/i915_perf_selftests.h
drivers/gpu/drm/i915/selftests/igt_live_test.h

index 5992ef800534a7624a2d0a525a0df03ef276e9df..0b1d8d36a50afa34baf30f59af8a94479c436505 100644 (file)
@@ -275,8 +275,6 @@ obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
 # exclude some broken headers from the test coverage
 no-header-test := \
        display/intel_vbt_defs.h \
-       gem/selftests/huge_gem_object.h \
-       gem/selftests/mock_gem_object.h \
        gvt/execlist.h \
        gvt/fb_decoder.h \
        gvt/gtt.h \
@@ -284,11 +282,7 @@ no-header-test := \
        gvt/interrupt.h \
        gvt/mmio_context.h \
        gvt/mpt.h \
-       gvt/scheduler.h \
-       selftests/i915_live_selftests.h \
-       selftests/i915_mock_selftests.h \
-       selftests/i915_perf_selftests.h \
-       selftests/igt_live_test.h
+       gvt/scheduler.h
 
 extra-$(CONFIG_DRM_I915_WERROR) += \
        $(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \
index 549c1394bcdc6ea5c99576a4bd8294491253ea26..b8cf31b7bf146a2e329073b6b8712e42bd037b7d 100644 (file)
@@ -7,6 +7,12 @@
 #ifndef __HUGE_GEM_OBJECT_H
 #define __HUGE_GEM_OBJECT_H
 
+#include <linux/types.h>
+
+#include "gem/i915_gem_object_types.h"
+
+struct drm_i915_private;
+
 struct drm_i915_gem_object *
 huge_gem_object(struct drm_i915_private *i915,
                phys_addr_t phys_size,
index 370360b4a1481518a8264cbc596a5f45109442a6..688511afa88398ef04b6378d58c5a9df24d9071a 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef __MOCK_GEM_OBJECT_H__
 #define __MOCK_GEM_OBJECT_H__
 
+#include "gem/i915_gem_object_types.h"
+
 struct mock_object {
        struct drm_i915_gem_object base;
 };
index 476fba2ed8bb1150b9b958248f38778847ffa317..34138c7bdd150b5d2b147c01ca542f0e403a0a03 100644 (file)
@@ -1,5 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/* List each unit test as selftest(name, function)
+
+#ifndef selftest
+#define selftest(x, y)
+#endif
+
+/*
+ * List each unit test as selftest(name, function)
  *
  * The name is used as both an enum and expanded as subtest__name to create
  * a module parameter. It must be unique and legal for a C identifier.
index aa5a0e7f5d9eb3d5379d91c5a0f0fe4c5fed323f..5b39bab4da1d0cb3246392dd64a19c9837889bfb 100644 (file)
@@ -1,5 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/* List each unit test as selftest(name, function)
+
+#ifndef selftest
+#define selftest(x, y)
+#endif
+
+/*
+ * List each unit test as selftest(name, function)
  *
  * The name is used as both an enum and expanded as subtest__name to create
  * a module parameter. It must be unique and legal for a C identifier.
index f7129a243daaa720b1e0ed42dddb0ae4fd7975ad..5a577a1332f59e00f072caec872b5fe9b536c7e4 100644 (file)
@@ -1,5 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-/* List each unit test as selftest(name, function)
+
+#ifndef selftest
+#define selftest(x, y)
+#endif
+
+/*
+ * List each unit test as selftest(name, function)
  *
  * The name is used as both an enum and expanded as subtest__name to create
  * a module parameter. It must be unique and legal for a C identifier.
index c0e9f99d50def50a2b4754ade8539f06741030b3..36ed42736c52169e1a4f407ce3de97fbebbde3c5 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef IGT_LIVE_TEST_H
 #define IGT_LIVE_TEST_H
 
-#include "../i915_gem.h"
+#include "gt/intel_engine.h" /* for I915_NUM_ENGINES */
 
 struct drm_i915_private;