summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-11-16 15:18:24 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-11-20 17:37:05 +0100
commit10c983077a782ff9d02b6e5c47281039830fe6fb (patch)
treec91ced2d113943a4e11dde0dcafd581163027152 /tests
parentfdcdfa1e220c5070072d5dac9523cd105e7406c2 (diff)
lib/batchbuffer: Set bpp in igt_buf.
We want to allow bpp = 8 or 16, so make sure we set the bpp in igt_buf. This way we can extend rendercopy to support other values for bpp. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Fix double ;; (Ville] Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/i915/gem_concurrent_all.c2
-rw-r--r--tests/i915/gem_gpgpu_fill.c1
-rw-r--r--tests/i915/gem_media_fill.c1
-rw-r--r--tests/i915/gem_ppgtt.c2
-rw-r--r--tests/i915/gem_read_read_speed.c2
-rw-r--r--tests/i915/gem_render_copy.c2
-rw-r--r--tests/i915/gem_render_copy_redux.c1
-rw-r--r--tests/i915/gem_render_linear_blits.c6
-rw-r--r--tests/i915/gem_render_tiled_blits.c2
-rw-r--r--tests/i915/gem_ring_sync_copy.c1
-rw-r--r--tests/i915/gem_stress.c1
-rw-r--r--tests/kms_psr.c1
-rw-r--r--tests/perf.c1
-rw-r--r--tests/pm_sseu.c1
14 files changed, 24 insertions, 0 deletions
diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
index 4ac08c1b..6049372d 100644
--- a/tests/i915/gem_concurrent_all.c
+++ b/tests/i915/gem_concurrent_all.c
@@ -854,11 +854,13 @@ static void render_copy_bo(struct buffers *b, drm_intel_bo *dst, drm_intel_bo *s
.size = b->npixels * 4,
.num_tiles = b->npixels * 4,
.stride = b->width * 4,
+ .bpp = 32,
}, s = {
.bo = src,
.size = b->npixels * 4,
.num_tiles = b->npixels * 4,
.stride = b->width * 4,
+ .bpp = 32,
};
uint32_t swizzle;
diff --git a/tests/i915/gem_gpgpu_fill.c b/tests/i915/gem_gpgpu_fill.c
index dfb58165..68918c3e 100644
--- a/tests/i915/gem_gpgpu_fill.c
+++ b/tests/i915/gem_gpgpu_fill.c
@@ -78,6 +78,7 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
buf->stride = stride;
buf->tiling = I915_TILING_NONE;
buf->size = SIZE;
+ buf->bpp = 32;
}
static void
diff --git a/tests/i915/gem_media_fill.c b/tests/i915/gem_media_fill.c
index 109af129..a7d7708c 100644
--- a/tests/i915/gem_media_fill.c
+++ b/tests/i915/gem_media_fill.c
@@ -81,6 +81,7 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
buf->stride = stride;
buf->tiling = I915_TILING_NONE;
buf->size = SIZE;
+ buf->bpp = 32;
}
static void
diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
index 86fe59f2..c2e4ca67 100644
--- a/tests/i915/gem_ppgtt.c
+++ b/tests/i915/gem_ppgtt.c
@@ -76,6 +76,7 @@ static void scratch_buf_init(struct igt_buf *buf,
buf->stride = STRIDE;
buf->tiling = I915_TILING_NONE;
buf->size = SIZE;
+ buf->bpp = 32;
}
static void scratch_buf_fini(struct igt_buf *buf)
@@ -132,6 +133,7 @@ static void fork_rcs_copy(int target, drm_intel_bo **dst, int count, unsigned fl
buf.stride = STRIDE;
buf.tiling = I915_TILING_NONE;
buf.size = SIZE;
+ buf.bpp = 32;
for (int i = 0; i <= target; i++) {
struct igt_buf src;
diff --git a/tests/i915/gem_read_read_speed.c b/tests/i915/gem_read_read_speed.c
index 3dcf440c..5f1356eb 100644
--- a/tests/i915/gem_read_read_speed.c
+++ b/tests/i915/gem_read_read_speed.c
@@ -56,11 +56,13 @@ static drm_intel_bo *rcs_copy_bo(drm_intel_bo *dst, drm_intel_bo *src)
.size = width * height * 4,
.num_tiles = width * height * 4,
.stride = width * 4,
+ .bpp = 32,
}, s = {
.bo = src,
.size = width * height * 4,
.num_tiles = width * height * 4,
.stride = width * 4,
+ .bpp = 32,
};
uint32_t swizzle;
drm_intel_bo *bo = batch->bo;
diff --git a/tests/i915/gem_render_copy.c b/tests/i915/gem_render_copy.c
index 17a66564..0cd4e50f 100644
--- a/tests/i915/gem_render_copy.c
+++ b/tests/i915/gem_render_copy.c
@@ -287,6 +287,7 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
buf->stride = ALIGN(width * 4, 128);
buf->size = buf->stride * height;
buf->tiling = tiling;
+ buf->bpp = 32;
aux_width = scratch_buf_aux_width(buf);
aux_height = scratch_buf_aux_height(buf);
@@ -309,6 +310,7 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
buf->stride = pitch;
buf->tiling = tiling;
buf->size = pitch * height;
+ buf->bpp = 32;
}
igt_assert(igt_buf_width(buf) == width);
diff --git a/tests/i915/gem_render_copy_redux.c b/tests/i915/gem_render_copy_redux.c
index a861862d..24b838ba 100644
--- a/tests/i915/gem_render_copy_redux.c
+++ b/tests/i915/gem_render_copy_redux.c
@@ -109,6 +109,7 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf,
buf->stride = stride;
buf->tiling = I915_TILING_NONE;
buf->size = SIZE;
+ buf->bpp = 32;
}
static void scratch_buf_fini(data_t *data, struct igt_buf *buf)
diff --git a/tests/i915/gem_render_linear_blits.c b/tests/i915/gem_render_linear_blits.c
index a1a7e033..667ee872 100644
--- a/tests/i915/gem_render_linear_blits.c
+++ b/tests/i915/gem_render_linear_blits.c
@@ -111,11 +111,13 @@ static void run_test (int fd, int count)
src.stride = STRIDE;
src.tiling = I915_TILING_NONE;
src.size = SIZE;
+ src.bpp = 32;
dst.bo = bo[(i + 1) % count];
dst.stride = STRIDE;
dst.tiling = I915_TILING_NONE;
dst.size = SIZE;
+ dst.bpp = 32;
render_copy(batch, NULL, &src, 0, 0, WIDTH, HEIGHT, &dst, 0, 0);
start_val[(i + 1) % count] = start_val[i % count];
@@ -134,11 +136,13 @@ static void run_test (int fd, int count)
src.stride = STRIDE;
src.tiling = I915_TILING_NONE;
src.size = SIZE;
+ src.bpp = 32;
dst.bo = bo[i % count];
dst.stride = STRIDE;
dst.tiling = I915_TILING_NONE;
dst.size = SIZE;
+ dst.bpp = 32;
render_copy(batch, NULL, &src, 0, 0, WIDTH, HEIGHT, &dst, 0, 0);
start_val[i % count] = start_val[(i + 1) % count];
@@ -159,11 +163,13 @@ static void run_test (int fd, int count)
src.stride = STRIDE;
src.tiling = I915_TILING_NONE;
src.size = SIZE;
+ src.bpp = 32;
dst.bo = bo[d];
dst.stride = STRIDE;
dst.tiling = I915_TILING_NONE;
dst.size = SIZE;
+ dst.bpp = 32;
render_copy(batch, NULL, &src, 0, 0, WIDTH, HEIGHT, &dst, 0, 0);
start_val[d] = start_val[s];
diff --git a/tests/i915/gem_render_tiled_blits.c b/tests/i915/gem_render_tiled_blits.c
index ef81c787..12950061 100644
--- a/tests/i915/gem_render_tiled_blits.c
+++ b/tests/i915/gem_render_tiled_blits.c
@@ -69,6 +69,7 @@ check_bo(struct intel_batchbuffer *batch, struct igt_buf *buf, uint32_t val)
tmp.stride = STRIDE;
tmp.tiling = I915_TILING_NONE;
tmp.size = SIZE;
+ tmp.bpp = 32;
render_copy(batch, NULL, buf, 0, 0, WIDTH, HEIGHT, &tmp, 0, 0);
if (snoop) {
@@ -134,6 +135,7 @@ static void run_test (int fd, int count)
buf[i].stride = pitch;
buf[i].tiling = tiling;
buf[i].size = SIZE;
+ buf[i].bpp = 32;
start_val[i] = start;
diff --git a/tests/i915/gem_ring_sync_copy.c b/tests/i915/gem_ring_sync_copy.c
index 8d372355..1e5728bc 100644
--- a/tests/i915/gem_ring_sync_copy.c
+++ b/tests/i915/gem_ring_sync_copy.c
@@ -137,6 +137,7 @@ static void scratch_buf_init_from_bo(struct igt_buf *buf, drm_intel_bo *bo)
buf->stride = 4 * WIDTH;
buf->tiling = I915_TILING_NONE;
buf->size = 4 * WIDTH * HEIGHT;
+ buf->bpp = 32;
}
static void scratch_buf_init(data_t *data, struct igt_buf *buf,
diff --git a/tests/i915/gem_stress.c b/tests/i915/gem_stress.c
index 225f283e..ef8316f2 100644
--- a/tests/i915/gem_stress.c
+++ b/tests/i915/gem_stress.c
@@ -485,6 +485,7 @@ static void init_buffer(struct igt_buf *buf, unsigned size)
igt_assert(buf->bo);
buf->tiling = I915_TILING_NONE;
buf->stride = 4096;
+ buf->bpp = 32;
sanitize_stride(buf);
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index 9767f475..d00e552f 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -153,6 +153,7 @@ static void scratch_buf_init(struct igt_buf *buf, drm_intel_bo *bo,
buf->stride = stride;
buf->tiling = I915_TILING_X;
buf->size = size;
+ buf->bpp = 32;
}
static void fill_render(data_t *data, uint32_t handle, unsigned char color)
diff --git a/tests/perf.c b/tests/perf.c
index 72e00132..48b323e5 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -501,6 +501,7 @@ scratch_buf_init(drm_intel_bufmgr *bufmgr,
buf->stride = stride;
buf->tiling = I915_TILING_NONE;
buf->size = size;
+ buf->bpp = 32;
}
static void
diff --git a/tests/pm_sseu.c b/tests/pm_sseu.c
index 5fdcbef2..252df7d3 100644
--- a/tests/pm_sseu.c
+++ b/tests/pm_sseu.c
@@ -303,6 +303,7 @@ gem_init(void)
gem.buf.tiling = I915_TILING_NONE;
gem.buf.size = gem.buf.stride;
gem.buf.bo = drm_intel_bo_alloc(gem.bufmgr, "", gem.buf.size, 4096);
+ gem.buf.bpp = 32;
igt_assert(gem.buf.bo);
gem.init = 4;