diff options
-rw-r--r-- | lib/intel_batchbuffer.h | 18 | ||||
-rw-r--r-- | tests/gem_gpgpu_fill.c | 2 | ||||
-rw-r--r-- | tests/gem_media_fill.c | 2 | ||||
-rw-r--r-- | tests/gem_ppgtt.c | 4 | ||||
-rw-r--r-- | tests/gem_render_copy.c | 2 | ||||
-rw-r--r-- | tests/gem_render_copy_redux.c | 2 | ||||
-rw-r--r-- | tests/gem_render_linear_blits.c | 6 | ||||
-rw-r--r-- | tests/gem_render_tiled_blits.c | 2 | ||||
-rw-r--r-- | tests/gem_ring_sync_copy.c | 2 | ||||
-rw-r--r-- | tests/gem_stress.c | 2 | ||||
-rw-r--r-- | tests/kms_psr_sink_crc.c | 2 | ||||
-rw-r--r-- | tests/perf.c | 2 | ||||
-rw-r--r-- | tests/pm_sseu.c | 2 |
13 files changed, 35 insertions, 13 deletions
diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h index 8acfdbbf..2dcb09ce 100644 --- a/lib/intel_batchbuffer.h +++ b/lib/intel_batchbuffer.h @@ -223,13 +223,17 @@ void intel_copy_bo(struct intel_batchbuffer *batch, * fill functions. */ struct igt_buf { - drm_intel_bo *bo; - uint32_t stride; - uint32_t tiling; - uint32_t *data; - uint32_t size; - /*< private >*/ - unsigned num_tiles; + drm_intel_bo *bo; + uint32_t stride; + uint32_t tiling; + uint32_t *data; + uint32_t size; + struct { + uint32_t offset; + uint32_t stride; + } aux; + /*< private >*/ + unsigned num_tiles; }; unsigned igt_buf_width(const struct igt_buf *buf); diff --git a/tests/gem_gpgpu_fill.c b/tests/gem_gpgpu_fill.c index df9e86f6..8ef05a3f 100644 --- a/tests/gem_gpgpu_fill.c +++ b/tests/gem_gpgpu_fill.c @@ -72,6 +72,8 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf, gem_write(data->drm_fd, bo->handle, 0, data->linear, sizeof(data->linear)); + memset(buf, 0, sizeof(*buf)); + buf->bo = bo; buf->stride = stride; buf->tiling = I915_TILING_NONE; diff --git a/tests/gem_media_fill.c b/tests/gem_media_fill.c index e3564e8b..109af129 100644 --- a/tests/gem_media_fill.c +++ b/tests/gem_media_fill.c @@ -75,6 +75,8 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf, gem_write(data->drm_fd, bo->handle, 0, data->linear, sizeof(data->linear)); + memset(buf, 0, sizeof(*buf)); + buf->bo = bo; buf->stride = stride; buf->tiling = I915_TILING_NONE; diff --git a/tests/gem_ppgtt.c b/tests/gem_ppgtt.c index 575b0e9d..af5e3e07 100644 --- a/tests/gem_ppgtt.c +++ b/tests/gem_ppgtt.c @@ -66,6 +66,8 @@ static void scratch_buf_init(struct igt_buf *buf, drm_intel_bufmgr *bufmgr, uint32_t pixel) { + memset(buf, 0, sizeof(*buf)); + buf->bo = create_bo(bufmgr, pixel); buf->stride = STRIDE; buf->tiling = I915_TILING_NONE; @@ -109,7 +111,7 @@ static void fork_rcs_copy(int target, drm_intel_bo **dst, int count, unsigned fl igt_fork(child, count) { struct intel_batchbuffer *batch; - struct igt_buf buf; + struct igt_buf buf = {}; batch = intel_batchbuffer_alloc(dst[child]->bufmgr, devid); diff --git a/tests/gem_render_copy.c b/tests/gem_render_copy.c index 2efec078..956f83f4 100644 --- a/tests/gem_render_copy.c +++ b/tests/gem_render_copy.c @@ -206,6 +206,8 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf, bo = drm_intel_bo_alloc(data->bufmgr, "", size, 4096); + memset(buf, 0, sizeof(*buf)); + buf->bo = bo; buf->stride = stride; buf->tiling = I915_TILING_NONE; diff --git a/tests/gem_render_copy_redux.c b/tests/gem_render_copy_redux.c index 95d1f975..27098ea6 100644 --- a/tests/gem_render_copy_redux.c +++ b/tests/gem_render_copy_redux.c @@ -103,6 +103,8 @@ static void scratch_buf_init(data_t *data, struct igt_buf *buf, gem_write(data->fd, bo->handle, 0, data->linear, sizeof(data->linear)); + memset(buf, 0, sizeof(*buf)); + buf->bo = bo; buf->stride = stride; buf->tiling = I915_TILING_NONE; diff --git a/tests/gem_render_linear_blits.c b/tests/gem_render_linear_blits.c index db34d427..a1a7e033 100644 --- a/tests/gem_render_linear_blits.c +++ b/tests/gem_render_linear_blits.c @@ -105,7 +105,7 @@ static void run_test (int fd, int count) igt_info("Cyclic blits, forward...\n"); for (i = 0; i < count * 4; i++) { - struct igt_buf src, dst; + struct igt_buf src = {}, dst = {}; src.bo = bo[i % count]; src.stride = STRIDE; @@ -128,7 +128,7 @@ static void run_test (int fd, int count) igt_info("Cyclic blits, backward...\n"); for (i = 0; i < count * 4; i++) { - struct igt_buf src, dst; + struct igt_buf src = {}, dst = {}; src.bo = bo[(i + 1) % count]; src.stride = STRIDE; @@ -148,7 +148,7 @@ static void run_test (int fd, int count) igt_info("Random blits...\n"); for (i = 0; i < count * 4; i++) { - struct igt_buf src, dst; + struct igt_buf src = {}, dst = {}; int s = random() % count; int d = random() % count; diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c index b2cc7a0c..3484d561 100644 --- a/tests/gem_render_tiled_blits.c +++ b/tests/gem_render_tiled_blits.c @@ -61,7 +61,7 @@ static int snoop; static void check_bo(struct intel_batchbuffer *batch, struct igt_buf *buf, uint32_t val) { - struct igt_buf tmp; + struct igt_buf tmp = {}; uint32_t *ptr; int i; diff --git a/tests/gem_ring_sync_copy.c b/tests/gem_ring_sync_copy.c index a949753d..8d372355 100644 --- a/tests/gem_ring_sync_copy.c +++ b/tests/gem_ring_sync_copy.c @@ -131,6 +131,8 @@ static void bo_check(data_t *data, drm_intel_bo *bo, uint32_t val) static void scratch_buf_init_from_bo(struct igt_buf *buf, drm_intel_bo *bo) { + memset(buf, 0, sizeof(*buf)); + buf->bo = bo; buf->stride = 4 * WIDTH; buf->tiling = I915_TILING_NONE; diff --git a/tests/gem_stress.c b/tests/gem_stress.c index 4d0de5c4..225f283e 100644 --- a/tests/gem_stress.c +++ b/tests/gem_stress.c @@ -478,6 +478,8 @@ static void sanitize_stride(struct igt_buf *buf) static void init_buffer(struct igt_buf *buf, unsigned size) { + memset(buf, 0, sizeof(*buf)); + buf->bo = drm_intel_bo_alloc(bufmgr, "tiled bo", size, 4096); buf->size = size; igt_assert(buf->bo); diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c index 28818e25..3115a5de 100644 --- a/tests/kms_psr_sink_crc.c +++ b/tests/kms_psr_sink_crc.c @@ -150,6 +150,8 @@ static void fill_blt(data_t *data, uint32_t handle, unsigned char color) static void scratch_buf_init(struct igt_buf *buf, drm_intel_bo *bo, int size, int stride) { + memset(buf, 0, sizeof(*buf)); + buf->bo = bo; buf->stride = stride; buf->tiling = I915_TILING_X; diff --git a/tests/perf.c b/tests/perf.c index 2736918f..25a6bf19 100644 --- a/tests/perf.c +++ b/tests/perf.c @@ -495,6 +495,8 @@ scratch_buf_init(drm_intel_bufmgr *bufmgr, scratch_buf_memset(bo, width, height, color); + memset(buf, 0, sizeof(*buf)); + buf->bo = bo; buf->stride = stride; buf->tiling = I915_TILING_NONE; diff --git a/tests/pm_sseu.c b/tests/pm_sseu.c index 9a7daa56..1274e1fa 100644 --- a/tests/pm_sseu.c +++ b/tests/pm_sseu.c @@ -35,7 +35,7 @@ IGT_TEST_DESCRIPTION("Tests slice/subslice/EU power gating functionality.\n"); -struct { +static struct { int init; int drm_fd; int devid; |