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.

-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to