[Intel-gfx] [PATCH] drm/i915/debugfs: Increment return value of gt.next_seqno

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 24 12:49:01 UTC 2016


On Thu, Nov 24, 2016 at 02:15:07PM +0200, Joonas Lahtinen wrote:
> On to, 2016-11-24 at 09:47 +0000, Chris Wilson wrote:
> > The i915_next_seqno read value is to be the next seqno used by the
> > kernel. However, in the conversion to atomics ops for gt.next_seqno, in
> > commit 28176ef4cfa5 ("drm/i915: Reserve space in the global seqno during
> > request allocation"), this was changed from a post-increment to a
> > pre-increment. This increment was missed from the value reported by
> > debugfs, so in effect it was reporting the current seqno (last
> > assigned), not the next seqno.
> > 
> > Fixes: 28176ef4cfa5 ("drm/i915: Reserve space in the global seqno during request allocation")
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81209
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> 
> <SNIP>
> 
> > @@ -1026,7 +1026,7 @@ i915_next_seqno_get(void *data, u64 *val)
> >  {
> >  	struct drm_i915_private *dev_priv = data;
> >  
> > -	*val = atomic_read(&dev_priv->gt.global_timeline.next_seqno);
> > +	*val = 1 + atomic_read(&dev_priv->gt.global_timeline.next_seqno);
> 
> The variable name really should be last_seqno or so...
> 
> But as a hotfix;
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Thanks, pushed and another (albeit recent) bug closed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list