From: Daniel Vetter Subject: Re: Semaphore cleanups Date: Fri, 16 Sep 2011 09:39:06 +0200 Message-ID: <20110916073906.GA2873@phenom.ffwll.local> References: <1316138941-6537-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ww0-f43.google.com (mail-ww0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 7709F9F0FF for ; Fri, 16 Sep 2011 00:38:43 -0700 (PDT) Received: by wwf27 with SMTP id 27so4030467wwf.12 for ; Fri, 16 Sep 2011 00:38:42 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1316138941-6537-1-git-send-email-ben@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Sep 15, 2011 at 07:08:56PM -0700, Ben Widawsky wrote: > FWIW, I thought my original patch was the easiest to read, but this certainly > removes the most magic. These had a ton of input from Daniel Vetter, and Chris > Wilson. The goal is only to make the code more readable, and easier to veryify/debug. With the bloat gone: Reviewed-by: Daniel Vetter for patches 2-4 But in then end I think it boils down to having a bunch of magic values in a table or having a bunch or magic calculations in a few tiny functions. So after the ring->id cleanup (which imo is independant cleanup, albeit just a tiny improvement) I don't care with what approach we'll be going. And imo engineering for future products isn't a good idea either - we just don't know what they'll look like exactly. In the end it's likely just yet another function pointer with completely different code, and having less chipset specific magic constant in struct intel_ring_buffer might even help. Now for the trace patch, I definitely want that. But that has a tiny review comment ;-) -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48