#include "i915_selftest.h"
#include "gt/intel_context.h"
#include "gt/intel_engine_regs.h"
#include "gt/intel_engine_user.h"
#include "gt/intel_gpu_commands.h"
#include "gt/intel_gt.h"
#include "gt/intel_gt_regs.h"
#include "gem/i915_gem_lmem.h"
#include "gem/selftests/igt_gem_utils.h"
#include "selftests/igt_flush_test.h"
#include "selftests/mock_drm.h"
#include "selftests/i915_random.h"
#include "huge_gem_object.h"
#include "mock_context.h"
#define OW_SIZE …
#define F_SUBTILE_SIZE …
#define F_TILE_WIDTH …
#define F_TILE_HEIGHT …
#define F_SUBTILE_WIDTH …
#define F_SUBTILE_HEIGHT …
static int linear_x_y_to_ftiled_pos(int x, int y, u32 stride, int bpp)
{ … }
enum client_tiling { … };
#define WIDTH …
#define HEIGHT …
struct blit_buffer { … };
struct tiled_blits { … };
static bool fastblit_supports_x_tiling(const struct drm_i915_private *i915)
{ … }
static bool fast_blit_ok(const struct blit_buffer *buf)
{ … }
static int prepare_blit(const struct tiled_blits *t,
struct blit_buffer *dst,
struct blit_buffer *src,
struct drm_i915_gem_object *batch)
{ … }
static void tiled_blits_destroy_buffers(struct tiled_blits *t)
{ … }
static struct i915_vma *
__create_vma(struct tiled_blits *t, size_t size, bool lmem)
{ … }
static struct i915_vma *create_vma(struct tiled_blits *t, bool lmem)
{ … }
static int tiled_blits_create_buffers(struct tiled_blits *t,
int width, int height,
struct rnd_state *prng)
{ … }
static void fill_scratch(struct tiled_blits *t, u32 *vaddr, u32 val)
{ … }
static u64 swizzle_bit(unsigned int bit, u64 offset)
{ … }
static u64 tiled_offset(const struct intel_gt *gt,
u64 v,
unsigned int stride,
enum client_tiling tiling,
int x_pos, int y_pos)
{ … }
static const char *repr_tiling(enum client_tiling tiling)
{ … }
static int verify_buffer(const struct tiled_blits *t,
struct blit_buffer *buf,
struct rnd_state *prng)
{ … }
static int pin_buffer(struct i915_vma *vma, u64 addr)
{ … }
static int
tiled_blit(struct tiled_blits *t,
struct blit_buffer *dst, u64 dst_addr,
struct blit_buffer *src, u64 src_addr)
{ … }
static struct tiled_blits *
tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng)
{ … }
static void tiled_blits_destroy(struct tiled_blits *t)
{ … }
static int tiled_blits_prepare(struct tiled_blits *t,
struct rnd_state *prng)
{ … }
static int tiled_blits_bounce(struct tiled_blits *t, struct rnd_state *prng)
{ … }
static int __igt_client_tiled_blits(struct intel_engine_cs *engine,
struct rnd_state *prng)
{ … }
static bool has_bit17_swizzle(int sw)
{ … }
static bool bad_swizzling(struct drm_i915_private *i915)
{ … }
static int igt_client_tiled_blits(void *arg)
{ … }
int i915_gem_client_blt_live_selftests(struct drm_i915_private *i915)
{ … }