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
This commit is contained in:
parent
f3bc632acb
commit
b2fcaac98b
@ -275,8 +275,6 @@ obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
|
|||||||
# exclude some broken headers from the test coverage
|
# exclude some broken headers from the test coverage
|
||||||
no-header-test := \
|
no-header-test := \
|
||||||
display/intel_vbt_defs.h \
|
display/intel_vbt_defs.h \
|
||||||
gem/selftests/huge_gem_object.h \
|
|
||||||
gem/selftests/mock_gem_object.h \
|
|
||||||
gvt/execlist.h \
|
gvt/execlist.h \
|
||||||
gvt/fb_decoder.h \
|
gvt/fb_decoder.h \
|
||||||
gvt/gtt.h \
|
gvt/gtt.h \
|
||||||
@ -284,11 +282,7 @@ no-header-test := \
|
|||||||
gvt/interrupt.h \
|
gvt/interrupt.h \
|
||||||
gvt/mmio_context.h \
|
gvt/mmio_context.h \
|
||||||
gvt/mpt.h \
|
gvt/mpt.h \
|
||||||
gvt/scheduler.h \
|
gvt/scheduler.h
|
||||||
selftests/i915_live_selftests.h \
|
|
||||||
selftests/i915_mock_selftests.h \
|
|
||||||
selftests/i915_perf_selftests.h \
|
|
||||||
selftests/igt_live_test.h
|
|
||||||
|
|
||||||
extra-$(CONFIG_DRM_I915_WERROR) += \
|
extra-$(CONFIG_DRM_I915_WERROR) += \
|
||||||
$(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \
|
$(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \
|
||||||
|
@ -7,6 +7,12 @@
|
|||||||
#ifndef __HUGE_GEM_OBJECT_H
|
#ifndef __HUGE_GEM_OBJECT_H
|
||||||
#define __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 *
|
struct drm_i915_gem_object *
|
||||||
huge_gem_object(struct drm_i915_private *i915,
|
huge_gem_object(struct drm_i915_private *i915,
|
||||||
phys_addr_t phys_size,
|
phys_addr_t phys_size,
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#ifndef __MOCK_GEM_OBJECT_H__
|
#ifndef __MOCK_GEM_OBJECT_H__
|
||||||
#define __MOCK_GEM_OBJECT_H__
|
#define __MOCK_GEM_OBJECT_H__
|
||||||
|
|
||||||
|
#include "gem/i915_gem_object_types.h"
|
||||||
|
|
||||||
struct mock_object {
|
struct mock_object {
|
||||||
struct drm_i915_gem_object base;
|
struct drm_i915_gem_object base;
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* 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
|
* 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.
|
* a module parameter. It must be unique and legal for a C identifier.
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* 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
|
* 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.
|
* a module parameter. It must be unique and legal for a C identifier.
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0 */
|
/* 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
|
* 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.
|
* a module parameter. It must be unique and legal for a C identifier.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#ifndef IGT_LIVE_TEST_H
|
#ifndef IGT_LIVE_TEST_H
|
||||||
#define 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;
|
struct drm_i915_private;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user