All of 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 1/3] drm/i915: Prevent concurrent GGTT update and use on Braswell (again)
Date: Tue, 15 Jan 2019 09:04:47 +0000	[thread overview]
Message-ID: <6c7216ef-e4ad-1f9c-5b4e-f53b70bcfb2e@linux.intel.com> (raw)
In-Reply-To: <20190114211729.30352-1-chris@chris-wilson.co.uk>


On 14/01/2019 21:17, Chris Wilson wrote:
> On Braswell, under heavy stress, if we update the GGTT while
> simultaneously accessing another region inside the GTT, we are returned
> the wrong values. To prevent this we stop the machine to update the GGTT
> entries so that no memory traffic can occur at the same time.
> 
> This was first spotted in
> 
> commit 5bab6f60cb4d1417ad7c599166bcfec87529c1a2
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Fri Oct 23 18:43:32 2015 +0100
> 
>      drm/i915: Serialise updates to GGTT with access through GGTT on Braswell
> 
> but removed again in forlorn hope with
> 
> commit 4509276ee824bb967885c095c610767e42345c36
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Mon Feb 20 12:47:18 2017 +0000
> 
>      drm/i915: Remove Braswell GGTT update w/a
> 
> However, gem_concurrent_blit is once again only stable with the patch
> applied and CI is detecting the odd failure in forked gem_mmap_gtt tests
> (which smell like the same issue). Fwiw, a wide variety of CPU memory
> barriers (around GGTT flushing, fence updates, PTE updates) and GPU
> flushes/invalidates (between requests, after PTE updates) were tried as
> part of the investigation to find an alternate cause, nothing comes
> close to serialised GGTT updates.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105591
> Testcase: igt/gem_concurrent_blit
> Testcase: igt/gem_mmap_gtt/*forked*
> References: 5bab6f60cb4d ("drm/i915: Serialise updates to GGTT with access through GGTT on Braswell")
> References: 4509276ee824 ("drm/i915: Remove Braswell GGTT update w/a")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index dbea14bf67cc..f0d46366fb0b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3232,7 +3232,8 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt)
>   	ggtt->vm.insert_entries = gen8_ggtt_insert_entries;
>   
>   	/* Serialize GTT updates with aperture access on BXT if VT-d is on. */
> -	if (intel_ggtt_update_needs_vtd_wa(dev_priv)) {
> +	if (intel_ggtt_update_needs_vtd_wa(dev_priv) ||
> +	    IS_CHERRYVIEW(dev_priv) /* fails with concurrent use/update */) {
>   		ggtt->vm.insert_entries = bxt_vtd_ggtt_insert_entries__BKL;
>   		ggtt->vm.insert_page    = bxt_vtd_ggtt_insert_page__BKL;
>   		if (ggtt->vm.clear_range != nop_clear_range)
> 
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:[~2019-01-15  9:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14 21:17 [PATCH 1/3] drm/i915: Prevent concurrent GGTT update and use on Braswell (again) Chris Wilson
2019-01-14 21:17 ` [PATCH 2/3] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start Chris Wilson
2019-01-15  9:47   ` Tvrtko Ursulin
2019-01-15 10:00     ` Chris Wilson
2019-01-15 11:25       ` Tvrtko Ursulin
2019-01-15 11:54   ` Tvrtko Ursulin
2019-01-15 11:58     ` Chris Wilson
2019-01-14 21:17 ` [PATCH 3/3] drm/i915/userptr: Probe vma range before gup Chris Wilson
2019-01-15 10:19   ` Tvrtko Ursulin
2019-01-15 10:30     ` Chris Wilson
2019-01-15 10:40       ` Tvrtko Ursulin
2019-01-15 11:59         ` Chris Wilson
2019-01-15 10:27   ` Tvrtko Ursulin
2019-01-15 10:41     ` Chris Wilson
2019-01-15 10:52       ` Tvrtko Ursulin
2019-01-15 12:03         ` Chris Wilson
2019-01-14 21:32 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Prevent concurrent GGTT update and use on Braswell (again) Patchwork
2019-01-14 21:58 ` ✓ Fi.CI.BAT: success " Patchwork
2019-01-15  3:58 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-15  9:04 ` Tvrtko Ursulin [this message]
2019-01-15  9:28   ` [PATCH 1/3] " Chris Wilson

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=6c7216ef-e4ad-1f9c-5b4e-f53b70bcfb2e@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 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.