<div class="gmail_quote">On Wed, Feb 8, 2012 at 16:06, Chris Wilson <span dir="ltr"><<a href="mailto:chris@chris-wilson.co.uk" target="_blank">chris@chris-wilson.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


--- a/drivers/gpu/drm/i915/i915_gem.c<br>
+++ b/drivers/gpu/drm/i915/i915_gem.c<br>
@@ -1784,12 +1784,20 @@ i915_add_request(struct intel_ring_buffer *ring,<br>
 {<br>
        drm_i915_private_t *dev_priv = ring->dev->dev_private;<br>
        uint32_t seqno;<br>
+       u32 request_ring_position;<br>
        int was_empty;<br>
        int ret;<br>
<br>
        BUG_ON(request == NULL);<br>
        seqno = i915_gem_next_request_seqno(ring);<br>
<br>
+       /* Record the position of the start of the request so that<br>
+        * should we detect the updated seqno part-way through the<br>
+        * GPU processing the request, we never over-estimate the<br>
+        * position of the head.<br>
+        */<br>
+       request_ring_position = intel_ring_get_tail(ring);<br></blockquote><div><br><br>Perhaps a stupid question within the bikeshedding spirit, but why do we need intel_ring_get_tail()? Wouldn't just:<br><br>request_ring_position = ring->tail;<br>


<br>be self-explainable? Or some additional logic could be involved there at some point?<br></div></div><br>But in overall, I like this, so:<br>Reviewed-by: Eugeni Dodonov <<a href="mailto:eugeni.dodonov@intel.com">eugeni.dodonov@intel.com</a>><br clear="all">

<br>-- <br>Eugeni Dodonov<a href="http://eugeni.dodonov.net/" target="_blank"><br></a><br>