From 8ad24eeacb56dbbe1948c41250d03cfcd7383ca8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 21 Sep 2016 12:48:14 +0100 Subject: igt/prime_vgem: Initialise pfd for both parent/child commit 4337091f6af6 moved the initialisation of the pollfd into the child, forgetting that it was also used in the parent as a sanity check. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97885 Signed-off-by: Chris Wilson --- tests/prime_vgem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/prime_vgem.c') diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c index e78e074a..5f8a4dd5 100644 --- a/tests/prime_vgem.c +++ b/tests/prime_vgem.c @@ -629,7 +629,7 @@ static void flip_to_vgem(int i915, int vgem, const char *name) { const struct timespec tv = { 1, 0 }; - struct pollfd pfd; + struct pollfd pfd = { i915, POLLIN }; struct drm_event_vblank vbl; uint32_t fence; @@ -641,8 +641,6 @@ static void flip_to_vgem(int i915, int vgem, kill(getppid(), SIGHUP); /* Check we don't flip before the fence is ready */ - pfd.fd = i915; - pfd.events = POLLIN; for (int n = 0; n < 5; n++) { igt_assert_f(poll(&pfd, 1, 0) == 0, "flip to %s completed whilst busy\n", -- cgit v1.2.3