Re: [PATCH v2 19/29] drm/i915: Add functions to emit register offsets to the ring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 05, 2015 at 12:01:51PM +0000, Chris Wilson wrote:
> On Thu, Nov 05, 2015 at 01:44:08PM +0200, Ville Syrjälä wrote:
> > On Thu, Nov 05, 2015 at 11:03:38AM +0000, Chris Wilson wrote:
> > > On Wed, Nov 04, 2015 at 11:20:07PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> > > > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > > > 
> > > > When register type safety happens, we can't just try to emit the
> > > > register itself to the ring. Instead we'll need to extract the
> > > > offset from it first. Add some convenience functions that will do
> > > > that.
> > > > 
> > > > v2: Convert MOCS setup too
> > > > 
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > > 
> > > The only insane thing about this patch is the stupid ring emission API.
> > 
> > One extra idea just popped to my mind. Should I maybe make the
> > emit_reg() take the value too and emit both the reg offset and value?
> > They always come in pairs after all.
> 
> Uncertain. I think no. You need to do LRI and SRM separately (so that we
> don't get confused between the register value to load and the memory
> address to write to). But the more important factor for me, is that I
> don't want to hide the individual calls to emit() - as they need to be
> easily reviewed and checked against the count given to ring_begin().

Indeed, that's a good reason for keeping it separate.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux