Commit b2fcaac9 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/selftests: Make headers self-contained



Include the types used by the headers to they can be compiled
standalone.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200103104516.1757103-2-chris@chris-wilson.co.uk
parent f3bc632a
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -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), \
+6 −0
Original line number Diff line number Diff line
@@ -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,
+2 −0
Original line number Diff line number Diff line
@@ -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;
};
+7 −1
Original line number Diff line number Diff line
/* 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.
+7 −1
Original line number Diff line number Diff line
/* 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.
Loading