On Thu, 15 Sep 2011 10:13:36 +0200, Daniel Vetter <[email protected]> 
wrote:
> The calculation of the semaphore sync register index is obfuscated
> by some pointer calculation to get at the ring id (RCS, VCS and BCS).
> Now we already have a ring->id field, but that contains a flag value
> usefull for ORing together multiple rings - that's what the flushing
> code as the user of this field needs.
> 
> So change the meaning of ring->id to be the real id, add a tiny
> helper for those that actually want a flag and use ring->id in the
> semaphore index calculations.
> 
> Also extract the inverse function intel_sync_index_to_ring_id and
> move it right next to intel_ring_sync_index.
> 
> v2: Simplify RING_SYNC macro as suggested by Chris Wilson.
> 
> Signed-off-by: Daniel Vetter <[email protected]>

I do like the cleanup of the naming scheme for the rings, and it is a
good incremental improvement to the innards of the semaphore code.

Reviewed-by: Chris Wilson <[email protected]>

Ben, can you use this a base for further improvements?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to