All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Matthew Auld <matthew.william.auld@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 2/4] drm/i915: Use maximum write flush for pwrite_gtt
Date: Thu, 18 Jul 2019 20:19:08 +0100	[thread overview]
Message-ID: <156347754810.24728.7304494028374635459@skylake-alporthouse-com> (raw)
In-Reply-To: <20190718182843.GG5942@intel.com>

Quoting Ville Syrjälä (2019-07-18 19:28:43)
> On Thu, Jul 18, 2019 at 03:54:05PM +0100, Chris Wilson wrote:
> > As recently disovered by forcing big-core (!llc) machines to use the GTT
> > paths, we need our full GTT write flush before manipulating the GTT PTE
> > or else the writes may be directed to the wrong page.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Matthew Auld <matthew.william.auld@gmail.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: stable@vger.kernel.org
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index fed0bc421a55..c6ba350e6e4f 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -610,7 +610,8 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_gem_object *obj,
> >               unsigned int page_length = PAGE_SIZE - page_offset;
> >               page_length = remain < page_length ? remain : page_length;
> >               if (node.allocated) {
> > -                     wmb(); /* flush the write before we modify the GGTT */
> > +                     /* flush the write before we modify the GGTT */
> > +                     intel_gt_flush_ggtt_writes(ggtt->vm.gt);
> 
> Matches the story told by intel_gt_flush_ggtt_writes().
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Ta, pushed to dinq. Hopefully, this may explain some mystery fails!
(Not that any sane userspace does for(;;) { gem_write(); gem_read(); })
-Chris

  reply	other threads:[~2019-07-18 19:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18 14:54 [PATCH 1/4] drm/i915: Drop wmb() inside pread_gtt Chris Wilson
2019-07-18 14:54 ` [PATCH 2/4] drm/i915: Use maximum write flush for pwrite_gtt Chris Wilson
2019-07-18 18:28   ` Ville Syrjälä
2019-07-18 19:19     ` Chris Wilson [this message]
2019-07-19  0:45   ` Sasha Levin
2019-07-18 14:54 ` [PATCH 3/4] drm/i915: Flush all user surfaces prior to first use Chris Wilson
2019-07-19 10:01   ` Joonas Lahtinen
2019-07-19 10:18   ` Lionel Landwerlin
2019-07-19 10:21     ` Chris Wilson
2019-07-19 22:55       ` Jason Ekstrand
2019-07-20 10:49         ` Chris Wilson
2019-07-24 20:37   ` Francisco Jerez
2019-11-12  9:38     ` Chris Wilson
2019-11-12  9:38       ` [Intel-gfx] " Chris Wilson
2019-11-12 19:58       ` Francisco Jerez
2019-11-12 19:58         ` [Intel-gfx] " Francisco Jerez
2019-07-18 14:54 ` [PATCH 4/4] drm/i915: Flush stale cachelines on set-cache-level Chris Wilson
2019-07-19 10:03   ` Joonas Lahtinen
2019-07-19 10:03     ` Joonas Lahtinen
2019-11-12  9:09   ` [Intel-gfx] " Daniel Vetter
2019-11-12  9:09     ` Daniel Vetter
2019-11-12  9:09     ` Daniel Vetter
2019-11-12  9:42     ` Chris Wilson
2019-11-12  9:42       ` Chris Wilson
2019-11-12 10:57       ` Daniel Vetter
2019-11-12 10:57         ` Daniel Vetter
2019-11-12 12:08         ` Daniel Vetter
2019-11-12 12:08           ` Daniel Vetter
2019-07-18 15:35 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Drop wmb() inside pread_gtt Patchwork
2019-07-18 16:22 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-18 17:29 ` ✓ Fi.CI.IGT: " Patchwork
2019-07-18 18:23 ` [PATCH 1/4] " Ville Syrjälä

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=156347754810.24728.7304494028374635459@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=matthew.william.auld@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=ville.syrjala@linux.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 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.