#include <linux/prime_numbers.h>
#include "gem/i915_gem_context.h"
#include "gem/i915_gem_internal.h"
#include "gem/selftests/mock_context.h"
#include "i915_scatterlist.h"
#include "i915_selftest.h"
#include "mock_gem_device.h"
#include "mock_gtt.h"
static bool assert_vma(struct i915_vma *vma,
struct drm_i915_gem_object *obj,
struct i915_gem_context *ctx)
{ … }
static struct i915_vma *
checked_vma_instance(struct drm_i915_gem_object *obj,
struct i915_address_space *vm,
const struct i915_gtt_view *view)
{ … }
static int create_vmas(struct drm_i915_private *i915,
struct list_head *objects,
struct list_head *contexts)
{ … }
static int igt_vma_create(void *arg)
{ … }
struct pin_mode { … };
static bool assert_pin_valid(const struct i915_vma *vma,
const struct pin_mode *mode,
int result)
{ … }
__maybe_unused
static bool assert_pin_enospc(const struct i915_vma *vma,
const struct pin_mode *mode,
int result)
{ … }
__maybe_unused
static bool assert_pin_einval(const struct i915_vma *vma,
const struct pin_mode *mode,
int result)
{ … }
static int igt_vma_pin1(void *arg)
{ … }
static unsigned long rotated_index(const struct intel_rotation_info *r,
unsigned int n,
unsigned int x,
unsigned int y)
{ … }
static struct scatterlist *
assert_rotated(struct drm_i915_gem_object *obj,
const struct intel_rotation_info *r, unsigned int n,
struct scatterlist *sg)
{ … }
static unsigned long remapped_index(const struct intel_remapped_info *r,
unsigned int n,
unsigned int x,
unsigned int y)
{ … }
static struct scatterlist *
assert_remapped(struct drm_i915_gem_object *obj,
const struct intel_remapped_info *r, unsigned int n,
struct scatterlist *sg)
{ … }
static unsigned int remapped_size(enum i915_gtt_view_type view_type,
const struct intel_remapped_plane_info *a,
const struct intel_remapped_plane_info *b)
{ … }
static int igt_vma_rotate_remap(void *arg)
{ … }
static bool assert_partial(struct drm_i915_gem_object *obj,
struct i915_vma *vma,
unsigned long offset,
unsigned long size)
{ … }
static bool assert_pin(struct i915_vma *vma,
struct i915_gtt_view *view,
u64 size,
const char *name)
{ … }
static int igt_vma_partial(void *arg)
{ … }
int i915_vma_mock_selftests(void)
{ … }
static int igt_vma_remapped_gtt(void *arg)
{ … }
int i915_vma_live_selftests(struct drm_i915_private *i915)
{ … }