linux/drivers/gpu/drm/i915/selftests/i915_selftest.c

/*
 * Copyright © 2016 Intel Corporation
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

#include <linux/random.h>

#include "gt/intel_gt_pm.h"
#include "gt/uc/intel_gsc_fw.h"

#include "i915_driver.h"
#include "i915_drv.h"
#include "i915_selftest.h"

#include "igt_flush_test.h"

struct i915_selftest i915_selftest __read_mostly =;

int i915_mock_sanitycheck(void)
{}

int i915_live_sanitycheck(struct drm_i915_private *i915)
{}

enum {};

enum {};

enum {};

struct selftest {};

#define selftest
static struct selftest mock_selftests[] =;
#undef selftest

#define selftest
static struct selftest live_selftests[] =;
#undef selftest

#define selftest
static struct selftest perf_selftests[] =;
#undef selftest

/* Embed the line number into the parameter name so that we can order tests */
#define selftest
#define param
#define selftest_0
#include "i915_mock_selftests.h"
#undef selftest_0
#undef param

#define param
#define selftest_0
#include "i915_live_selftests.h"
#undef selftest_0
#undef param

#define param
#define selftest_0
#include "i915_perf_selftests.h"
#undef selftest_0
#undef param
#undef selftest

static void set_default_test_all(struct selftest *st, unsigned int count)
{}

static bool
__gsc_proxy_init_progressing(struct intel_gsc_uc *gsc)
{}

static void
__wait_gsc_proxy_completed(struct drm_i915_private *i915)
{}

static void
__wait_gsc_huc_load_completed(struct drm_i915_private *i915)
{}

static int __run_selftests(const char *name,
			   struct selftest *st,
			   unsigned int count,
			   void *data)
{}

#define run_selftests(x, data)

int i915_mock_selftests(void)
{}

int i915_live_selftests(struct pci_dev *pdev)
{}

int i915_perf_selftests(struct pci_dev *pdev)
{}

static bool apply_subtest_filter(const char *caller, const char *name)
{}

int __i915_nop_setup(void *data)
{}

int __i915_nop_teardown(int err, void *data)
{}

int __i915_live_setup(void *data)
{}

int __i915_live_teardown(int err, void *data)
{}

int __intel_gt_live_setup(void *data)
{}

int __intel_gt_live_teardown(int err, void *data)
{}

int __i915_subtests(const char *caller,
		    int (*setup)(void *data),
		    int (*teardown)(int err, void *data),
		    const struct i915_subtest *st,
		    unsigned int count,
		    void *data)
{}

bool __igt_timeout(unsigned long timeout, const char *fmt, ...)
{}

void igt_hexdump(const void *buf, size_t len)
{}

module_param_named(st_random_seed, i915_selftest.random_seed, uint, 0400);
module_param_named(st_timeout, i915_selftest.timeout_ms, uint, 0400);
module_param_named(st_filter, i915_selftest.filter, charp, 0400);

module_param_named_unsafe(mock_selftests, i915_selftest.mock, int, 0400);
MODULE_PARM_DESC();

module_param_named_unsafe(live_selftests, i915_selftest.live, int, 0400);
MODULE_PARM_DESC();

module_param_named_unsafe(perf_selftests, i915_selftest.perf, int, 0400);
MODULE_PARM_DESC();