summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-11-19 12:03:22 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-11-19 14:39:59 +0100
commitc27aaca295d3ca2a38521e571c012449371e4bb5 (patch)
tree886f2c2b833e1330c7a3ec6eaf73742b79a83e0e
parent8b35410771c7bcb75c3702673a81a282447ff810 (diff)
tests/i915/gem_render_tiled_blits: Make sure igt_buf is initially zero'd
gen8_bind_buf looks at buf->aux.stride/offset, which is not set by the test. When I added the bpp field, it was enough to make the test fail, fix this by making sure that the buf is initially zero'd explicitly, which fixes the test to run reliably 100% of the time. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> #irc
-rw-r--r--tests/i915/gem_render_tiled_blits.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/i915/gem_render_tiled_blits.c b/tests/i915/gem_render_tiled_blits.c
index 3484d561..ef81c787 100644
--- a/tests/i915/gem_render_tiled_blits.c
+++ b/tests/i915/gem_render_tiled_blits.c
@@ -120,7 +120,7 @@ static void run_test (int fd, int count)
igt_info("Using a snoop linear buffer for comparisons\n");
}
- buf = malloc(sizeof(*buf)*count);
+ buf = calloc(sizeof(*buf), count);
start_val = malloc(sizeof(*start_val)*count);
for (i = 0; i < count; i++) {