[Intel-gfx] [i-g-t 1/1] tests/gem_gtt_hog: Clear the parameters for GEM_CREATE ioctl

Sagar Arun Kamble sagar.a.kamble at intel.com
Mon Mar 20 06:02:15 UTC 2017


Due to garbage data seen by i915, gem_create_ioctl failed for gem obj
created with drmIoctl(GEM_CREATE) without properly initialized
parameters. Can be fixed by calling gem_create helper too.

Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg at intel.com>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
---
 tests/gem_gtt_hog.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/gem_gtt_hog.c b/tests/gem_gtt_hog.c
index a3dbfad..0696bdc 100644
--- a/tests/gem_gtt_hog.c
+++ b/tests/gem_gtt_hog.c
@@ -93,6 +93,7 @@ static void busy(data_t *data, uint32_t handle, int size, int loops)
 	gem_exec[0].handle = handle;
 	gem_exec[0].flags = EXEC_OBJECT_NEEDS_FENCE;
 
+	memset(&create, 0, sizeof(create));
 	create.handle = 0;
 	create.size = 4096;
 	drmIoctl(data->fd, DRM_IOCTL_I915_GEM_CREATE, &create);
-- 
1.9.1



More information about the Intel-gfx mailing list