public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Antonio Argenziano <antonio.argenziano@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Switch bach to gem_set_domain()
Date: Tue, 19 Feb 2019 13:22:09 -0800	[thread overview]
Message-ID: <b2014e17-2760-6ed8-5869-4df764b8b09d@intel.com> (raw)
In-Reply-To: <20190217181619.31986-1-chris@chris-wilson.co.uk>



On 17/02/19 10:16, Chris Wilson wrote:
> The write hazard lies extend also to the cache-dirty tracking; as we
> purposefully do not tell the kernel we are writing to the bo, it fails
> to note the CPU cache as dirty and so the gem_read() may not
> sufficiently flush the caches prior to reading back from the GPU.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Antonio Argenziano <antonio.argenziano@intel.com>

LGTM.

Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>

Antonio

> ---
>   tests/i915/gem_exec_schedule.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
> index 59102b6bc..a9383000a 100644
> --- a/tests/i915/gem_exec_schedule.c
> +++ b/tests/i915/gem_exec_schedule.c
> @@ -54,7 +54,8 @@ uint32_t __sync_read_u32(int fd, uint32_t handle, uint64_t offset)
>   {
>   	uint32_t value;
>   
> -	gem_sync(fd, handle); /* No write hazard lies! */
> +	gem_set_domain(fd, handle, /* No write hazard lies! */
> +		       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
>   	gem_read(fd, handle, offset, &value, sizeof(value));
>   
>   	return value;
> @@ -63,7 +64,8 @@ uint32_t __sync_read_u32(int fd, uint32_t handle, uint64_t offset)
>   static inline
>   void __sync_read_u32_count(int fd, uint32_t handle, uint32_t *dst, uint64_t size)
>   {
> -	gem_sync(fd, handle); /* No write hazard lies! */
> +	gem_set_domain(fd, handle, /* No write hazard lies! */
> +		       I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
>   	gem_read(fd, handle, 0, dst, size);
>   }
>   
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2019-02-19 21:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17 18:16 [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Switch bach to gem_set_domain() Chris Wilson
2019-02-17 18:38 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-18  0:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-02-19 21:22 ` Antonio Argenziano [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=b2014e17-2760-6ed8-5869-4df764b8b09d@intel.com \
    --to=antonio.argenziano@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --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