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/execlists: Poison the CSB after use
Date: Tue, 30 Oct 2018 11:31:56 +0200 [thread overview]
Message-ID: <877ehzixv7.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20181029192613.13551-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> After reading the event status from the CSB, write back 0 (an invalid
> value) so we can detect if the HW should signal a new event without
> writing the event in the future.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=108315
> 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 | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 22b57b8926fc..126efe20d2d6 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -910,6 +910,9 @@ static void process_csb(struct intel_engine_cs *engine)
> execlists->active);
>
> status = buf[2 * head];
> + GEM_BUG_ON(!status);
Assuming we still have a timing issue in here, how about
we poll a little until status != 0 and then continue with warning?
We could recover by finding the 'bit late' status, instead of
oopsing out.
> + GEM_DEBUG_EXEC(WRITE_ONCE(*(u32 *)(buf + 2 * head), 0));
What I am afraid here is that we change the timing and cache dynamics
for our debug builds so that we bury the pesky thing.
Perhaps I am wandering too far but lets consider for the csb loop:
read head,tail;
rmb();
for_each_csb() {
64 bit read
64 bit write to zero it, unconditionally
act_on_it()
}
Too heavy?
Thanks,
Mika
> +
> if (status & (GEN8_CTX_STATUS_IDLE_ACTIVE |
> GEN8_CTX_STATUS_PREEMPTED))
> execlists_set_active(execlists,
> --
> 2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-10-30 9:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 19:26 [PATCH] drm/i915/execlists: Poison the CSB after use Chris Wilson
2018-10-29 21:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-10-30 3:09 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-30 9:31 ` Mika Kuoppala [this message]
2018-10-30 9:37 ` [PATCH] " Chris Wilson
2018-10-30 9:59 ` Mika Kuoppala
2018-10-30 10:29 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-10-30 11:21 ` Patchwork
-- strict thread matches above, loose matches on Subject: below --
2018-11-21 13:08 [PATCH] " Chris Wilson
2018-11-21 13:10 ` 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=877ehzixv7.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.