* [PATCH igt] tests/kms_flip: Move EBUSY to a new busy-flip subtest
@ 2014-06-04 12:56 ville.syrjala
2014-06-04 16:14 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: ville.syrjala @ 2014-06-04 12:56 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The EBUSY checking is very fragile currently in case there's any kind
extra delay in the test loop. At least the flip-vs-rmfb fails reliably
on my IVB.
So to make the test less fragile remove the EBUSY check from all the
current flip tests, and instead add a specific busy-flip test. To
better guarantee that we get the EBUSY add a blocking vblank wait just
before we issue the first flip. This maximizes the time we have to
submit two flips during one frame.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_flip.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 6711f09..46ce2ed 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -894,6 +894,12 @@ static unsigned int run_test_step(struct test_output *o)
igt_assert_f(hang, "failed to exercise page flip hang recovery\n");
}
+ /* try to make sure we can issue two flips during the same frame */
+ if (do_flip && (o->flags & TEST_EBUSY)) {
+ struct vblank_reply reply;
+ igt_assert(__wait_for_vblank(TEST_VBLANK_BLOCK, o->pipe, 1, 0, &reply) == 0);
+ }
+
if (do_flip)
do_or_die(do_page_flip(o, new_fb_id, !(o->flags & TEST_NOEVENT)));
@@ -1536,12 +1542,13 @@ int main(int argc, char **argv)
{ 60, TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_RCS,
"rcs-wf_vblank-vs-modeset" },
- { 30, TEST_FLIP | TEST_EBUSY , "plain-flip" },
+ { 30, TEST_FLIP , "plain-flip" },
+ { 30, TEST_FLIP | TEST_EBUSY , "busy-flip" },
{ 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
- { 30, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain-flip-ts-check" },
- { 30, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY | TEST_FB_RECREATE,
+ { 30, TEST_FLIP | TEST_CHECK_TS, "plain-flip-ts-check" },
+ { 30, TEST_FLIP | TEST_CHECK_TS | TEST_FB_RECREATE,
"plain-flip-fb-recreate" },
- { 30, TEST_FLIP | TEST_EBUSY | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
+ { 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
{ 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_BCS, "bcs-flip-vs-dpms" },
{ 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_RCS, "rcs-flip-vs-dpms" },
--
1.8.5.5
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH igt] tests/kms_flip: Move EBUSY to a new busy-flip subtest
2014-06-04 12:56 [PATCH igt] tests/kms_flip: Move EBUSY to a new busy-flip subtest ville.syrjala
@ 2014-06-04 16:14 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-06-04 16:14 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
On Wed, Jun 04, 2014 at 03:56:19PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The EBUSY checking is very fragile currently in case there's any kind
> extra delay in the test loop. At least the flip-vs-rmfb fails reliably
> on my IVB.
>
> So to make the test less fragile remove the EBUSY check from all the
> current flip tests, and instead add a specific busy-flip test. To
> better guarantee that we get the EBUSY add a blocking vblank wait just
> before we issue the first flip. This maximizes the time we have to
> submit two flips during one frame.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Yeah, no need to test api error cases in funky special situations.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> tests/kms_flip.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index 6711f09..46ce2ed 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -894,6 +894,12 @@ static unsigned int run_test_step(struct test_output *o)
> igt_assert_f(hang, "failed to exercise page flip hang recovery\n");
> }
>
> + /* try to make sure we can issue two flips during the same frame */
> + if (do_flip && (o->flags & TEST_EBUSY)) {
> + struct vblank_reply reply;
> + igt_assert(__wait_for_vblank(TEST_VBLANK_BLOCK, o->pipe, 1, 0, &reply) == 0);
> + }
> +
> if (do_flip)
> do_or_die(do_page_flip(o, new_fb_id, !(o->flags & TEST_NOEVENT)));
>
> @@ -1536,12 +1542,13 @@ int main(int argc, char **argv)
> { 60, TEST_VBLANK | TEST_MODESET | TEST_WITH_DUMMY_RCS,
> "rcs-wf_vblank-vs-modeset" },
>
> - { 30, TEST_FLIP | TEST_EBUSY , "plain-flip" },
> + { 30, TEST_FLIP , "plain-flip" },
> + { 30, TEST_FLIP | TEST_EBUSY , "busy-flip" },
> { 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
> - { 30, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY , "plain-flip-ts-check" },
> - { 30, TEST_FLIP | TEST_CHECK_TS | TEST_EBUSY | TEST_FB_RECREATE,
> + { 30, TEST_FLIP | TEST_CHECK_TS, "plain-flip-ts-check" },
> + { 30, TEST_FLIP | TEST_CHECK_TS | TEST_FB_RECREATE,
> "plain-flip-fb-recreate" },
> - { 30, TEST_FLIP | TEST_EBUSY | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
> + { 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
> { 60, TEST_FLIP | TEST_DPMS | TEST_EINVAL, "flip-vs-dpms" },
> { 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_BCS, "bcs-flip-vs-dpms" },
> { 60, TEST_FLIP | TEST_DPMS | TEST_WITH_DUMMY_RCS, "rcs-flip-vs-dpms" },
> --
> 1.8.5.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-04 16:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04 12:56 [PATCH igt] tests/kms_flip: Move EBUSY to a new busy-flip subtest ville.syrjala
2014-06-04 16:14 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox