Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/i915/gtt: Trust the uncached store to flush wcb
Date: Fri, 11 May 2018 16:23:14 +0300	[thread overview]
Message-ID: <87bmdm9vi5.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <152578120150.24602.16670880505366229154@mail.alporthouse.com>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Quoting Mika Kuoppala (2018-05-08 13:03:13)
>> Not all architectures guarantee that uncached read will
>> flush the write combining buffer. So marking it explicitly
>> is recommended [1].
>> 
>> However we know the architecture we are operating on
>> and can avoid wmb as the UC store will flush the wcb [2].
>> 
>> Omit the wmb() before invalidate as redudant.
>> 
>> v2: squash combining and removal (Chris)
>> 
>> References: http://yarchive.net/comp/linux/write_combining.html [1]
>> References: http://download.intel.com/design/PentiumII/applnots/24442201.pdf [2]
>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Matthew Auld <matthew.auld@intel.com>
>> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>>  drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
>> index c879bfd9294f..2126358761a5 100644
>> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
>> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
>> @@ -110,7 +110,8 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma);
>>  
>>  static void gen6_ggtt_invalidate(struct drm_i915_private *dev_priv)
>>  {
>> -       /* Note that as an uncached mmio write, this should flush the
>> +       /*
>> +        * Note that as an uncached mmio write, this will flush the
>>          * WCB of the writes into the GGTT before it triggers the invalidate.
>>          */
>>         I915_WRITE(GFX_FLSH_CNTL_GEN6, GFX_FLSH_CNTL_EN);
>> @@ -2418,8 +2419,6 @@ static void gen8_ggtt_insert_entries(struct i915_address_space *vm,
>>         for_each_sgt_dma(addr, sgt_iter, vma->pages)
>>                 gen8_set_pte(gtt_entries++, pte_encode | addr);
>>  
>> -       wmb();
>> -
>>         /* This next bit makes the above posting read even more important. We
>
> Yeah, we should rewrite this comment as well; just skip the first
> obsolete sentence.

v3 pushed. Thanks for review.

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

  parent reply	other threads:[~2018-05-11 13:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08 12:03 [PATCH] drm/i915/gtt: Trust the uncached store to flush wcb Mika Kuoppala
2018-05-08 12:06 ` Chris Wilson
2018-05-08 12:41   ` Mika Kuoppala
2018-05-11 13:23   ` Mika Kuoppala [this message]
2018-05-08 14:56 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gtt: Trust the uncached store to flush wcb (rev2) Patchwork
2018-05-08 15:11 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-08 17:33 ` ✓ Fi.CI.IGT: " 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=87bmdm9vi5.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.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