[Intel-gfx] [PATCH 1/5] drm/i915: clean up ring id/semaphore sync index magic
Ben Widawsky
ben at bwidawsk.net
Fri Sep 16 04:11:00 CEST 2011
On Thu, 15 Sep 2011 19:08:57 -0700
Ben Widawsky <ben at bwidawsk.net> wrote:
> From: Daniel Vetter <daniel.vetter at ffwll.ch>
>
> 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 <daniel.vetter at ffwll.ch>
Crap, I forgot:
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
More information about the Intel-gfx
mailing list