All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [i-g-t PATCH v10 4/5] igt/kms_flip: Use new igt_spin_batch
Date: Wed, 23 Nov 2016 11:35:36 +0000	[thread overview]
Message-ID: <20161123113536.GE19956@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20161123105943.5157-5-abdiel.janulgue@linux.intel.com>

On Wed, Nov 23, 2016 at 12:59:42PM +0200, Abdiel Janulgue wrote:
> @@ -933,8 +755,13 @@ static unsigned int run_test_step(struct test_output *o)
>  	if (o->flags & TEST_MODESET)
>  		igt_assert(set_mode(o, o->fb_ids[o->current_fb_id], 0, 0) == 0);
>  
> -	if (o->flags & TEST_DPMS)
> +	if (o->flags & TEST_DPMS) {
> +		if (spin_rcs)
> +			igt_spin_batch_end(spin_rcs);
> +		if (spin_bcs)
> +			igt_spin_batch_end(spin_bcs);
>  		set_dpms(o, DRM_MODE_DPMS_ON);

This is subtly different as the set_dpms() is now called with an idle
bo. Now, set_dpms() may or may not block so calling it first then
igt_spin_batch_end() may deadlock, so this requires a set_timeout first
followed by end afterwards.
> +	}
>  
>  	if (o->flags & TEST_VBLANK_RACE) {
>  		struct vblank_reply reply;
> @@ -967,8 +794,13 @@ static unsigned int run_test_step(struct test_output *o)
>  		igt_assert(__wait_for_vblank(TEST_VBLANK_BLOCK, o->pipe, 1, 0, &reply) == 0);
>  	}
>  
> -	if (do_flip)
> +	if (do_flip) {
>  		do_or_die(do_page_flip(o, new_fb_id, !(o->flags & TEST_NOEVENT)));
> +		if (spin_rcs)
> +			igt_spin_batch_end(spin_rcs);
> +		if (spin_bcs)
> +			igt_spin_batch_end(spin_bcs);

Hmm, these need new_fb_id to be busy (separate tests for current /
both), I think you made current busy instead.

Order is good here (i.e. queue flip whilst busy). However, better would
be to delay the batch completion for a vblank just to stress the code
that little bit harder. (Even an assert that flip / bo are still busy as
we handle the vblank and complete the batch.)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-23 11:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 10:59 i-g-t dummyload/spin batch v10 Abdiel Janulgue
2016-11-23 10:59 ` [i-g-t PATCH v10 1/5] lib: Make signal helper definitions reusable Abdiel Janulgue
2016-11-23 10:59 ` [i-g-t PATCH v10 2/5] lib: add igt_dummyload Abdiel Janulgue
2016-11-23 11:47   ` Chris Wilson
2016-11-23 15:53     ` [i-g-t PATCH v11 " Abdiel Janulgue
2016-11-23 16:17       ` Chris Wilson
2016-11-24 10:16         ` [i-g-t PATCH v12 " Abdiel Janulgue
2016-11-25  9:17           ` Chris Wilson
2016-11-25 11:40             ` [i-g-t PATCH 2/6] igt_aux: Add some list helpers from the kernel Abdiel Janulgue
2016-11-25 11:40               ` [i-g-t PATCH v13 3/6] lib: add igt_dummyload Abdiel Janulgue
2016-11-25 11:52               ` [i-g-t PATCH 2/6] igt_aux: Add some list helpers from the kernel Chris Wilson
2016-11-25 11:54               ` Chris Wilson
2016-11-25 14:41                 ` [i-g-t PATCH 2/6] igt_aux: Add some list helpers from wayland Abdiel Janulgue
2016-11-25 14:41                   ` [i-g-t PATCH v14 3/6] lib: add igt_dummyload Abdiel Janulgue
2016-11-25 15:19                     ` Chris Wilson
2016-11-28  7:37                       ` [i-g-t PATCH v15 " Abdiel Janulgue
2016-11-23 10:59 ` [i-g-t PATCH v10 3/5] igt/gem_wait: Use new igt_spin_batch Abdiel Janulgue
2016-11-23 10:59 ` [i-g-t PATCH v10 4/5] igt/kms_flip: " Abdiel Janulgue
2016-11-23 11:35   ` Chris Wilson [this message]
2016-11-23 10:59 ` [i-g-t PATCH v10 5/5] igt/kms_busy.c: " Abdiel Janulgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161123113536.GE19956@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=abdiel.janulgue@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.