From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>, stable@vger.kernel.org
Subject: [PATCH] drm/i915: Increase context alignment requirement for Sandybridge
Date: Tue, 22 Mar 2016 14:07:24 +0000 [thread overview]
Message-ID: <1458655644-10968-1-git-send-email-chris@chris-wilson.co.uk> (raw)
In bugzilla, there are some very weird bugs on SNB GT1 whereby the
seqno stop being written, but the GPU is otherwise functional, well the
command streamer at least! However, since the seqno were not being
updated any waits upon rendering results hung, triggering the GPU hang
detector.
I found a very similar hang when running igt/gem_exec_whisper on a SNB
GT1 and after playing around came to the conclusion that:
(a) it depends on timing, enabling debug and other slowdowns masks the
bug;
(b) it was not context size, as increasing the allocation to 128KiB made
no difference;
(c) it depended upon placement as restricting the binding to the
mappable region works;
(d) it depended upon alignment of the context binding, though the bspec
still only lists the restriction as 4k
Changing the alignment constrainst seems to be least intrusive, and
though I have not been able to reproduce this on snb-gt2 and all the
recent bugs to the best of my knowledge have been snb-gt1, it is safer
to apply the constraint to all snb. Though I am still a little wary that
is merely a side-effect that is papering over the issue (for example, it
may be placement of the context next to another object that is causng
the issue, or it may be finding the new alignment slows down context
switches enough etc).
Testcase: igt/gem_exec_whisper/render-contexts-interruptible #snb-gt1
References: (e.g.) https://bugs.freedesktop.org/show_bug.cgi?id=93262
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 394e525e55f1..f0883a968e11 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -94,7 +94,7 @@
* I've seen in a spec to date, and that was a workaround for a non-shipping
* part. It should be safe to decrease this, but it's more future proof as is.
*/
-#define GEN6_CONTEXT_ALIGN (64<<10)
+#define GEN6_CONTEXT_ALIGN (256<<10)
#define GEN7_CONTEXT_ALIGN 4096
static size_t get_context_alignment(struct drm_device *dev)
--
2.8.0.rc3
next reply other threads:[~2016-03-22 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 14:07 Chris Wilson [this message]
2016-03-22 15:05 ` ✗ Fi.CI.BAT: failure for drm/i915: Increase context alignment requirement for Sandybridge Patchwork
2016-03-23 22:42 ` [PATCH] " 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=1458655644-10968-1-git-send-email-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stable@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).