[Intel-gfx] [PATCH 21/31] drm/i915: Convert engine->write_tail to operate on a request

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Jul 28 07:52:46 UTC 2016


On to, 2016-07-28 at 08:12 +0100, Chris Wilson wrote:
> On Thu, Jul 28, 2016 at 09:41:14AM +0300, Joonas Lahtinen wrote:
> > 
> > On ke, 2016-07-27 at 13:30 +0100, Chris Wilson wrote:
> > > 
> > > On Wed, Jul 27, 2016 at 12:53:25PM +0100, Dave Gordon wrote:
> > > > 
> > > > 
> > > > On 25/07/16 08:44, Chris Wilson wrote:
> > > > > 
> > > > > 
> > > > > +static void i9xx_submit_request(struct drm_i915_gem_request *request)
> > > > > +{
> > > > > +	struct drm_i915_private *dev_priv = request->i915;
> > > > > +
> > > > > +	I915_WRITE_TAIL(request->engine,
> > > > > +			request->tail % (request->ring->size - 1));
> > > > > +}
> > > > Another "modulo ringsize-1" here too.
> > > Because the original code included that safe guard against known GPU
> > > hangs.
> > I think a comment would be justified.
> Hmm, I do beg your pardon, at this point in the tree
> intel_ring_advance() still exists and is applying the modulus on every
> command packet.

I'd add a comment there too. Just to reduce confusion in future. Or
provide an unified modulo wrapper with the comment.

Regards, Joonas

> -Chris
> 
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list