[Intel-gfx] [PATCH 1/2] drm/i915: Dumb down the semaphore logic

Ben Widawsky ben at bwidawsk.net
Sun Sep 11 05:44:47 CEST 2011


On Thu, 8 Sep 2011 09:52:36 +0200
Daniel Vetter <daniel at ffwll.ch> wrote:

> 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 ;-)

As I said, I am biased. To me it is much simpler to understand, but it's
definitely more code, and more abstraction.

> 
> 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?

That is an excellent idea. I will work on it with the other
recommendations from Keith.

> - Can we have a basic testcase for the magic values (and semaphores in
>   general), please?

I really like what you've done with the test case after the fixes
discussed on IRC. I will update my commit message to mention it if you
manage to push that before I fix up the other things.

Ben



More information about the Intel-gfx mailing list