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

drm/i915/selftests: Make headers self-contained

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

+31 -11
+1 -7
drivers/gpu/drm/i915/Makefile
··· 275 275 # exclude some broken headers from the test coverage 276 276 no-header-test := \ 277 277 display/intel_vbt_defs.h \ 278 - gem/selftests/huge_gem_object.h \ 279 - gem/selftests/mock_gem_object.h \ 280 278 gvt/execlist.h \ 281 279 gvt/fb_decoder.h \ 282 280 gvt/gtt.h \ ··· 282 284 gvt/interrupt.h \ 283 285 gvt/mmio_context.h \ 284 286 gvt/mpt.h \ 285 - gvt/scheduler.h \ 286 - selftests/i915_live_selftests.h \ 287 - selftests/i915_mock_selftests.h \ 288 - selftests/i915_perf_selftests.h \ 289 - selftests/igt_live_test.h 287 + gvt/scheduler.h 290 288 291 289 extra-$(CONFIG_DRM_I915_WERROR) += \ 292 290 $(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \
+6
drivers/gpu/drm/i915/gem/selftests/huge_gem_object.h
··· 7 7 #ifndef __HUGE_GEM_OBJECT_H 8 8 #define __HUGE_GEM_OBJECT_H 9 9 10 + #include <linux/types.h> 11 + 12 + #include "gem/i915_gem_object_types.h" 13 + 14 + struct drm_i915_private; 15 + 10 16 struct drm_i915_gem_object * 11 17 huge_gem_object(struct drm_i915_private *i915, 12 18 phys_addr_t phys_size,
+2
drivers/gpu/drm/i915/gem/selftests/mock_gem_object.h
··· 7 7 #ifndef __MOCK_GEM_OBJECT_H__ 8 8 #define __MOCK_GEM_OBJECT_H__ 9 9 10 + #include "gem/i915_gem_object_types.h" 11 + 10 12 struct mock_object { 11 13 struct drm_i915_gem_object base; 12 14 };
+7 -1
drivers/gpu/drm/i915/selftests/i915_live_selftests.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* List each unit test as selftest(name, function) 2 + 3 + #ifndef selftest 4 + #define selftest(x, y) 5 + #endif 6 + 7 + /* 8 + * List each unit test as selftest(name, function) 3 9 * 4 10 * The name is used as both an enum and expanded as subtest__name to create 5 11 * a module parameter. It must be unique and legal for a C identifier.
+7 -1
drivers/gpu/drm/i915/selftests/i915_mock_selftests.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* List each unit test as selftest(name, function) 2 + 3 + #ifndef selftest 4 + #define selftest(x, y) 5 + #endif 6 + 7 + /* 8 + * List each unit test as selftest(name, function) 3 9 * 4 10 * The name is used as both an enum and expanded as subtest__name to create 5 11 * a module parameter. It must be unique and legal for a C identifier.
+7 -1
drivers/gpu/drm/i915/selftests/i915_perf_selftests.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* List each unit test as selftest(name, function) 2 + 3 + #ifndef selftest 4 + #define selftest(x, y) 5 + #endif 6 + 7 + /* 8 + * List each unit test as selftest(name, function) 3 9 * 4 10 * The name is used as both an enum and expanded as subtest__name to create 5 11 * a module parameter. It must be unique and legal for a C identifier.
+1 -1
drivers/gpu/drm/i915/selftests/igt_live_test.h
··· 7 7 #ifndef IGT_LIVE_TEST_H 8 8 #define IGT_LIVE_TEST_H 9 9 10 - #include "../i915_gem.h" 10 + #include "gt/intel_engine.h" /* for I915_NUM_ENGINES */ 11 11 12 12 struct drm_i915_private; 13 13