From: Paulo Zanoni Date: Thu, 7 Aug 2014 19:03:08 +0000 (-0300) Subject: tests/pm_rpm: add wait_for_suspended() calls to test_one_plane X-Git-Tag: intel-gpu-tools-1.8~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6ffa3ca7f6d845d76cad95e2d5f0f8fdd84932a;p=platform%2Fupstream%2Fintel-gpu-tools.git tests/pm_rpm: add wait_for_suspended() calls to test_one_plane Make sure we do all operations while really runtime suspended, so we can actually test things. Signed-off-by: Paulo Zanoni --- diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 0a4bc76..5e73144 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -1638,16 +1638,19 @@ static void test_one_plane(bool dpms, uint32_t plane_id, 0 << 16, 0 << 16, plane_fb1.width << 16, plane_fb1.height << 16); igt_assert(rc == 0); + igt_assert(wait_for_suspended()); /* Unset, then change the plane. */ rc = drmModeSetPlane(drm_fd, plane_id, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); igt_assert(rc == 0); + igt_assert(wait_for_suspended()); rc = drmModeSetPlane(drm_fd, plane_id, crtc_id, plane_fb2.fb_id, 0, crtc_x, crtc_y, plane_fb2.width, plane_fb2.height, 0 << 16, 0 << 16, plane_fb2.width << 16, plane_fb2.height << 16); igt_assert(rc == 0); + igt_assert(wait_for_suspended()); /* Now change the plane without unsetting first. */ rc = drmModeSetPlane(drm_fd, plane_id, crtc_id, plane_fb1.fb_id, 0, @@ -1655,10 +1658,12 @@ static void test_one_plane(bool dpms, uint32_t plane_id, 0 << 16, 0 << 16, plane_fb1.width << 16, plane_fb1.height << 16); igt_assert(rc == 0); + igt_assert(wait_for_suspended()); /* Make sure nothing remains for the other tests. */ rc = drmModeSetPlane(drm_fd, plane_id, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); igt_assert(rc == 0); + igt_assert(wait_for_suspended()); } /* This one also triggered WARNs on our driver at some point in time. */