From: Ben Widawsky <ben@bwidawsk.net>
To: Sean Paul <seanpaul@chromium.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Add wait_for in init_ring_common
Date: Fri, 16 Mar 2012 18:34:41 +0000 [thread overview]
Message-ID: <20120316183441.GA26888@cloud01> (raw)
In-Reply-To: <1331916202-20638-3-git-send-email-seanpaul@chromium.org>
On Fri, Mar 16, 2012 at 12:43:22PM -0400, Sean Paul wrote:
> I have seen a number of "blt ring initialization failed" messages
> where the ctl or start registers are not the correct value. Upon further
> inspection, if the code just waited a little bit, it would read the
> correct value. Adding the wait_for to these reads should eliminate the
> issue.
>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 8357822..d95f0f9 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -298,9 +298,9 @@ static int init_ring_common(struct intel_ring_buffer *ring)
> | RING_REPORT_64K | RING_VALID);
>
> /* If the head is still not zero, the ring is dead */
> - if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||
> - I915_READ_START(ring) != obj->gtt_offset ||
> - (I915_READ_HEAD(ring) & HEAD_ADDR) != 0) {
> + if (wait_for((I915_READ_CTL(ring) & RING_VALID) != 0 &&
> + I915_READ_START(ring) == obj->gtt_offset &&
> + (I915_READ_HEAD(ring) & HEAD_ADDR) == 0, 50)) {
> DRM_ERROR("%s initialization failed "
> "ctl %08x head %08x tail %08x start %08x\n",
> ring->name,
> --
> 1.7.7.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2012-03-16 18:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 16:43 [PATCH 0/2] Two patches relating to ring initialization failure Sean Paul
2012-03-16 16:43 ` [PATCH 1/2] drm/i915: Add BUG_ON when ring->private is NULL Sean Paul
2012-03-18 18:09 ` Daniel Vetter
2012-03-18 20:33 ` Sean Paul
2012-03-16 16:43 ` [PATCH 2/2] drm/i915: Add wait_for in init_ring_common Sean Paul
2012-03-16 18:34 ` Ben Widawsky [this message]
2012-03-18 17:53 ` Daniel Vetter
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=20120316183441.GA26888@cloud01 \
--to=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=seanpaul@chromium.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.