From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, matthew.auld@intel.com
Subject: Re: [PATCH] drm/i915: Flush the WCB following a WC write
Date: Fri, 6 Jul 2018 09:52:35 -0700 [thread overview]
Message-ID: <20180706165235.GC2848@intel.com> (raw)
In-Reply-To: <20180706115402.18547-1-chris@chris-wilson.co.uk>
On Fri, Jul 06, 2018 at 12:54:02PM +0100, Chris Wilson wrote:
> If we have just completed a WC write, we must ensure that the WCB (Write
> Combining Buffer) is flushed out to main memory before we can expect to
> see the results. This is especially important when mixing WC with GTT as
> the physical paths are different and cachelines are not naturally flushed.
>
> Testcase: igt/drv_selftests/live_coherency #gdg
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 0c0a1a959d0b..be63e8bbb6d2 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -837,6 +837,10 @@ flush_write_domain(struct drm_i915_gem_object *obj, unsigned int flush_domains)
> }
> break;
>
> + case I915_GEM_DOMAIN_WC:
> + wmb();
> + break;
> +
> case I915_GEM_DOMAIN_CPU:
> i915_gem_clflush_object(obj, I915_CLFLUSH_SYNC);
> break;
> --
> 2.18.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-07-06 16:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 11:54 [PATCH] drm/i915: Flush the WCB following a WC write Chris Wilson
2018-07-06 12:07 ` Matthew Auld
2018-07-06 12:32 ` Tvrtko Ursulin
2018-07-06 12:44 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-07-06 13:00 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-06 16:52 ` Rodrigo Vivi [this message]
2018-07-07 5:20 ` ✗ Fi.CI.IGT: failure " Patchwork
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=20180706165235.GC2848@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).