linux/drivers/gpu/drm/i915/gt/selftest_migrate.c

// SPDX-License-Identifier: MIT
/*
 * Copyright © 2020 Intel Corporation
 */

#include <linux/sort.h>

#include "gem/i915_gem_internal.h"
#include "gem/i915_gem_lmem.h"

#include "selftests/igt_spinner.h"
#include "selftests/i915_random.h"

static const unsigned int sizes[] =;

static struct drm_i915_gem_object *
create_lmem_or_internal(struct drm_i915_private *i915, size_t size)
{}

static int copy(struct intel_migrate *migrate,
		int (*fn)(struct intel_migrate *migrate,
			  struct i915_gem_ww_ctx *ww,
			  struct drm_i915_gem_object *src,
			  struct drm_i915_gem_object *dst,
			  struct i915_request **out),
		u32 sz, struct rnd_state *prng)
{}

static int intel_context_copy_ccs(struct intel_context *ce,
				  const struct i915_deps *deps,
				  struct scatterlist *sg,
				  unsigned int pat_index,
				  bool write_to_ccs,
				  struct i915_request **out)
{}

static int
intel_migrate_ccs_copy(struct intel_migrate *m,
		       struct i915_gem_ww_ctx *ww,
		       const struct i915_deps *deps,
		       struct scatterlist *sg,
		       unsigned int pat_index,
		       bool write_to_ccs,
		       struct i915_request **out)
{}

static int clear(struct intel_migrate *migrate,
		 int (*fn)(struct intel_migrate *migrate,
			   struct i915_gem_ww_ctx *ww,
			   struct drm_i915_gem_object *obj,
			   u32 value,
			   struct i915_request **out),
		 u32 sz, struct rnd_state *prng)
{}

static int __migrate_copy(struct intel_migrate *migrate,
			  struct i915_gem_ww_ctx *ww,
			  struct drm_i915_gem_object *src,
			  struct drm_i915_gem_object *dst,
			  struct i915_request **out)
{}

static int __global_copy(struct intel_migrate *migrate,
			 struct i915_gem_ww_ctx *ww,
			 struct drm_i915_gem_object *src,
			 struct drm_i915_gem_object *dst,
			 struct i915_request **out)
{}

static int
migrate_copy(struct intel_migrate *migrate, u32 sz, struct rnd_state *prng)
{}

static int
global_copy(struct intel_migrate *migrate, u32 sz, struct rnd_state *prng)
{}

static int __migrate_clear(struct intel_migrate *migrate,
			   struct i915_gem_ww_ctx *ww,
			   struct drm_i915_gem_object *obj,
			   u32 value,
			   struct i915_request **out)
{}

static int __global_clear(struct intel_migrate *migrate,
			  struct i915_gem_ww_ctx *ww,
			  struct drm_i915_gem_object *obj,
			  u32 value,
			  struct i915_request **out)
{}

static int
migrate_clear(struct intel_migrate *migrate, u32 sz, struct rnd_state *prng)
{}

static int
global_clear(struct intel_migrate *migrate, u32 sz, struct rnd_state *prng)
{}

static int live_migrate_copy(void *arg)
{}

static int live_migrate_clear(void *arg)
{}

struct spinner_timer {};

static void spinner_kill(struct timer_list *timer)
{}

static int live_emit_pte_full_ring(void *arg)
{}

struct threaded_migrate {};

static int threaded_migrate(struct intel_migrate *migrate,
			    int (*fn)(void *arg),
			    unsigned int flags)
{}

static int __thread_migrate_copy(void *arg)
{}

static int thread_migrate_copy(void *arg)
{}

static int __thread_global_copy(void *arg)
{}

static int thread_global_copy(void *arg)
{}

static int __thread_migrate_clear(void *arg)
{}

static int __thread_global_clear(void *arg)
{}

static int thread_migrate_clear(void *arg)
{}

static int thread_global_clear(void *arg)
{}

int intel_migrate_live_selftests(struct drm_i915_private *i915)
{}

static struct drm_i915_gem_object *
create_init_lmem_internal(struct intel_gt *gt, size_t sz, bool try_lmem)
{}

static int wrap_ktime_compare(const void *A, const void *B)
{}

static int __perf_clear_blt(struct intel_context *ce,
			    struct scatterlist *sg,
			    unsigned int pat_index,
			    bool is_lmem,
			    size_t sz)
{}

static int perf_clear_blt(void *arg)
{}

static int __perf_copy_blt(struct intel_context *ce,
			   struct scatterlist *src,
			   unsigned int src_pat_index,
			   bool src_is_lmem,
			   struct scatterlist *dst,
			   unsigned int dst_pat_index,
			   bool dst_is_lmem,
			   size_t sz)
{}

static int perf_copy_blt(void *arg)
{}

int intel_migrate_perf_selftests(struct drm_i915_private *i915)
{}