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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Cc: Lukasz Kalamarz <lukasz.kalamarz@xxxxxxxxx>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@xxxxxxxxx>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux