linux/drivers/gpu/drm/i915/gt/uc/selftest_guc.c

// SPDX-License-Identifier: MIT
/*
 * Copyright �� 2021 Intel Corporation
 */

#include "gt/intel_gt_print.h"
#include "intel_guc_print.h"
#include "selftests/igt_spinner.h"
#include "selftests/intel_scheduler_helpers.h"

static int request_add_spin(struct i915_request *rq, struct igt_spinner *spin)
{}

static struct i915_request *nop_user_request(struct intel_context *ce,
					     struct i915_request *from)
{}

static int intel_guc_scrub_ctbs(void *arg)
{}

/*
 * intel_guc_steal_guc_ids - Test to exhaust all guc_ids and then steal one
 *
 * This test creates a spinner which is used to block all subsequent submissions
 * until it completes. Next, a loop creates a context and a NOP request each
 * iteration until the guc_ids are exhausted (request creation returns -EAGAIN).
 * The spinner is ended, unblocking all requests created in the loop. At this
 * point all guc_ids are exhausted but are available to steal. Try to create
 * another request which should successfully steal a guc_id. Wait on last
 * request to complete, idle GPU, verify a guc_id was stolen via a counter, and
 * exit the test. Test also artificially reduces the number of guc_ids so the
 * test runs in a timely manner.
 */
static int intel_guc_steal_guc_ids(void *arg)
{}

/*
 * Send a context schedule H2G message with an invalid context id.
 * This should generate a GUC_RESULT_INVALID_CONTEXT response.
 */
static int bad_h2g(struct intel_guc *guc)
{}

/*
 * Set a spinner running to make sure the system is alive and active,
 * then send a bad but asynchronous H2G command and wait to see if an
 * error response is returned. If no response is received or if the
 * spinner dies then the test will fail.
 */
#define FAST_RESPONSE_TIMEOUT_MS
static int intel_guc_fast_request(void *arg)
{}

int intel_guc_live_selftests(struct drm_i915_private *i915)
{}