From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Daniel Vetter <daniel@ffwll.ch>,
Chris Wilson <chris@chris-wilson.co.uk>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Serialise updates to GGTT with access through GGTT on Braswell
Date: Wed, 18 Nov 2015 15:08:47 -0800 [thread overview]
Message-ID: <564D04FF.10300@virtuousgeek.org> (raw)
In-Reply-To: <20151117163702.GL16848@phenom.ffwll.local>
On 11/17/2015 08:37 AM, Daniel Vetter wrote:
> On Fri, Oct 30, 2015 at 04:58:41PM +0000, Chris Wilson wrote:
>> On Fri, Oct 30, 2015 at 05:14:21PM +0100, Daniel Vetter wrote:
>>> On Fri, Oct 23, 2015 at 06:43:32PM +0100, Chris Wilson wrote:
>>>> When accessing through the GTT from one CPU whilst concurrently updating
>>>> the GGTT PTEs in another thread, the hardware likes to return random
>>>> data. As we have strong serialisation prevent us from modifying the PTE
>>>> of an active GTT mmapping, we have to conclude that it whilst modifying
>>>> other PTE's that error occurs. (I have not looked for any pattern such
>>>> as modifying PTE within the same page or cacheline as active PTE -
>>>> though checking whether revoking neighbouring objects should be enough
>>>> to test that theory.) The corruption also seems restricted to Braswell
>>>> and disappears with maxcpus=0. This patch stops all access through the
>>>> GTT by other CPUs when we update any PTE by stopping the machine around
>>>> the GGTT update.
>>>>
>>>> Testcase: igt/gem_concurrent_blit
>>>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89079
>>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>>
>>> Wild guess, since it wouldn't be the first time hw engineers screwed this
>>> up.
>>>
>>> Cheers, Daniel
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
>>> index d1c5cf89fe77..de983c8e6e54 100644
>>> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
>>> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
>>> @@ -2337,12 +2337,8 @@ int i915_gem_gtt_prepare_object(struct drm_i915_gem_object *obj)
>>>
>>> static void gen8_set_pte(void __iomem *addr, gen8_pte_t pte)
>>> {
>>> -#ifdef writeq
>>> - writeq(pte, addr);
>>> -#else
>>> iowrite32((u32)pte, addr);
>>> iowrite32(pte >> 32, addr + 4);
>>> -#endif
>>
>> Tried:
>> static void gen8_set_pte(void __iomem *addr, gen8_pte_t pte)
>> {
>> -#ifdef writeq
>> - writeq(pte, addr);
>> -#else
>> - iowrite32((u32)pte, addr);
>> - iowrite32(pte >> 32, addr + 4);
>> -#endif
>> + iowrite32(0, addr);
>> + wmb();
>> + iowrite32(upper_32_bits(pte), addr + 4);
>> + iowrite32(lower_32_bits(pte), addr);
>> + wmb();
>> }
>>
>> and just the plain iowrite(lower), iowrite(upper), neither helps.
>
> Added a note about this and applied to dinq. Yay for awesome hw.
I thought Ville explained how this wasn't necessary?
Jesse
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-11-18 23:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 17:43 [PATCH 1/2] drm/i915/execlists: HWS is uncached on !llc platforms Chris Wilson
2015-10-23 17:43 ` [PATCH 2/2] drm/i915: Serialise updates to GGTT with access through GGTT on Braswell Chris Wilson
2015-10-23 19:45 ` Chris Wilson
2015-10-30 16:14 ` Daniel Vetter
2015-10-30 16:58 ` Chris Wilson
2015-11-17 16:37 ` Daniel Vetter
2015-11-18 23:08 ` Jesse Barnes [this message]
2015-11-19 9:14 ` Daniel Vetter
2015-11-19 9:35 ` Chris Wilson
2015-11-19 16:35 ` Jesse Barnes
2015-10-23 17:50 ` [PATCH 1/2] drm/i915/execlists: HWS is uncached on !llc platforms Ville Syrjälä
2015-10-23 17:56 ` Chris Wilson
2015-10-23 18:22 ` Ville Syrjälä
2015-10-23 18:29 ` Chris Wilson
2015-10-23 18:41 ` Ville Syrjälä
2015-10-23 19:08 ` Chris Wilson
2015-10-23 19:36 ` 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=564D04FF.10300@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--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