Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH igt] igt/gem_exec_await: Flush the WCB before attempting to queue more work
Date: Fri, 22 Dec 2017 17:03:46 +0000	[thread overview]
Message-ID: <bde4e166-7f90-40ea-4345-2b35a5a3d136@linux.intel.com> (raw)
In-Reply-To: <20171221154823.23766-1-chris@chris-wilson.co.uk>


On 21/12/2017 15:48, Chris Wilson wrote:
> Ensure that the terminating write into WC-memory is flushed before we
> might trigger a wait for ring space.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/gem_exec_await.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/gem_exec_await.c b/tests/gem_exec_await.c
> index 9c4467922..28b280ff6 100644
> --- a/tests/gem_exec_await.c
> +++ b/tests/gem_exec_await.c
> @@ -222,6 +222,7 @@ static void wide(int fd, int ring_size, int timeout, unsigned int flags)
>   
>   		for (unsigned e = 0; e < nengine; e++)
>   			exec[e].cmd[0] = MI_BATCH_BUFFER_END;
> +		__sync_synchronize();
>   	}
>   
>   	igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
> 

In case someone is reading from the same uneducated situation as I was, 
__sync_synchronize emits an mfence instructions which indeed forces a 
flush of the write combine buffer.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

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

      parent reply	other threads:[~2017-12-22 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21 15:48 [PATCH igt] igt/gem_exec_await: Flush the WCB before attempting to queue more work Chris Wilson
2017-12-21 16:05 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-21 16:56 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-12-22 17:03 ` Tvrtko Ursulin [this message]

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=bde4e166-7f90-40ea-4345-2b35a5a3d136@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox