[Intel-gfx] [PATCH 1/2] drm/i915: Dumb down the semaphore logic
daniel at ffwll.ch
Thu Sep 8 00:52:36 PDT 2011
On Wed, Sep 07, 2011 at 04:12:41PM -0700, Ben Widawsky wrote:
> While I think the previous code is correct, it was hard to follow and
> hard to debug. Since we already have a ring abstraction, might as well
> use it to handle the semaphore updates and compares.
> I don't expect this code to make semaphores better or worse, but you
> never know...
I kinda start to like this ;-)
While you stare at this, two things I'm pondering:
- Would it make sense to also move the !semaphores ring_sync_to case into
the ringbuffer abstraction?
- Can we have a basic testcase for the magic values (and semaphores in
general), please? I'm thinking of submitting a batchbuffer with a dummy
r/w render relocation (hide it e.g. in the val field of
MI_FLUSH_DW/PIPE_CONTROL without setting the write post-sync-op), and
then randomly moving around the buffer to another ring. That should
decently exercise the semaphores code in the kernel and sync hw in the
gpu without (hopefully) anything else interfering.
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48
More information about the Intel-gfx