From: Daniel Vetter <daniel@ffwll.ch>
To: Dave Gordon <david.s.gordon@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 2/2] drm/i915: Consolidate ring freespace calculations
Date: Fri, 28 Nov 2014 18:51:11 +0100 [thread overview]
Message-ID: <20141128175111.GG32117@phenom.ffwll.local> (raw)
In-Reply-To: <1417087369-22767-3-git-send-email-david.s.gordon@intel.com>
On Thu, Nov 27, 2014 at 11:22:49AM +0000, Dave Gordon wrote:
> There are numerous places in the code where the driver's idea of
> how much space is left in a ring is updated using the driver's
> latest notions of the positions of 'head' and 'tail' for the ring.
> Among them are some that update one or both of these values before
> (re)doing the calculation. In particular, there are four different
> places in the code where 'last_retired_head' is copied to 'head'
> and then set to -1; and two of these do not have a guard to check
> that it has actually been updated since last time it was consumed,
> leaving the possibility that the dummy -1 can be transferred from
> 'last_retired_head' to 'head', causing the space calculation to
> produce 'impossible' results (previously seen on Android/VLV).
>
> This code therefore consolidates all the calculation and updating of
> these values, such that there is only one place where the ring space
> is updated, and it ALWAYS uses (and consumes) 'last_retired_head' if
> (and ONLY if) it has been updated since the last call.
>
> Signed-off-by: Dave Gordon <david.s.gordon@intel.com>
Both applied, thanks.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2014-11-28 17:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 13:29 [PATCH] drm/i915: Bug fixes to ring 'head' updating Dave Gordon
2014-11-03 20:59 ` Chris Wilson
2014-11-04 14:17 ` Dave Gordon
2014-11-17 16:31 ` Daniel Vetter
2014-11-18 4:43 ` akash goel
2014-11-18 8:02 ` Daniel Vetter
2014-11-24 9:35 ` Daniel Vetter
2014-11-18 15:00 ` Deepak S
2014-11-18 19:53 ` Dave Gordon
2014-11-18 20:07 ` [PATCH v2 0/3] " Dave Gordon
2014-11-18 20:07 ` [PATCH v2 1/3] drm/i915: Check for matching ringbuffer in logical_ring_wait_request() Dave Gordon
2014-11-25 4:14 ` Deepak S
2014-11-18 20:07 ` [PATCH v2 2/3] drm/i915: Don't read 'HEAD' MMIO register in LRC mode Dave Gordon
2014-11-25 7:57 ` Deepak S
2014-11-18 20:07 ` [PATCH v2 3/3] drm/i915: Consolidate ring freespace calculations Dave Gordon
2014-11-24 10:04 ` Daniel Vetter
2014-11-24 14:32 ` Dave Gordon
2014-11-25 11:41 ` Daniel Vetter
2014-11-25 11:47 ` Chris Wilson
2014-11-25 7:59 ` Deepak S
2014-11-27 11:22 ` [PATCH v3 0/2] Updates to " Dave Gordon
2014-11-27 11:22 ` [PATCH v3 1/2] drm/i915: Make ring freespace calculation more robust Dave Gordon
2014-11-27 11:22 ` [PATCH v3 2/2] drm/i915: Consolidate ring freespace calculations Dave Gordon
2014-11-27 19:20 ` [PATCH v3 2/2] drm/i915: Consolidate ring freespace shuang.he
2014-11-28 17:51 ` Daniel Vetter [this message]
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=20141128175111.GG32117@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=david.s.gordon@intel.com \
--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