From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Flush the CSB pointer reset
Date: Fri, 12 Apr 2019 15:42:30 +0300 [thread overview]
Message-ID: <87h8b35r9l.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <155507213488.26471.6206165818702258304@skylake-alporthouse-com>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Quoting Mika Kuoppala (2019-04-12 13:22:12)
>> Chris Wilson <chris@chris-wilson.co.uk> writes:
>>
>> > The HW resets it CSB tail pointer on resetting the engine. Most of the
>> > time. In case it doesn't (and for system resume) we write the expected
>> > value anyway. For extra paranoia, flush the write before we invalidate
>> > the cacheline.
>> >
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> > ---
>> > drivers/gpu/drm/i915/intel_lrc.c | 1 +
>> > 1 file changed, 1 insertion(+)
>> >
>> > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
>> > index 3cb788a223ef..4e0a351bfbca 100644
>> > --- a/drivers/gpu/drm/i915/intel_lrc.c
>> > +++ b/drivers/gpu/drm/i915/intel_lrc.c
>> > @@ -1866,6 +1866,7 @@ static void reset_csb_pointers(struct intel_engine_execlists *execlists)
>> > */
>> > execlists->csb_head = reset_value;
>> > WRITE_ONCE(*execlists->csb_write, reset_value);
>> > + wmb(); /* Make sure this is visible to HW (paranoia?) */
>>
>> As alternative tho, how about we invalidate not only the csb portion
>> but the all things included in hswp.
>
> We only pull the CSB into the cache. Easy excuse.
>
>> Then read the the mmio tail/head,
>> assert they are pointing correctly and match hwsp, if not, correct
>> and log?
>
> We've just reset the GPU, we know the mmio are garbage (powercontext)
> until the first interrupt after execlists submission. Remember the fun
> we used to have with tracking the interrupt before reading the mmio?
True, the mmio is useless. We could fortify the debugs so
that we expect first csb write to 0. Not that we detected
it anyway.
I was thinking the smb_store_mb() but I like the wmb() better
in this case. Everything before this sync point instead of
this variable.
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-04-12 12:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-12 11:01 [PATCH] drm/i915: Flush the CSB pointer reset Chris Wilson
2019-04-12 12:22 ` Mika Kuoppala
2019-04-12 12:28 ` Chris Wilson
2019-04-12 12:42 ` Mika Kuoppala [this message]
2019-04-12 14:32 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-04-12 16:30 ` ✓ 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=87h8b35r9l.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@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.