From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: Dumb down the semaphore logic Date: Fri, 02 Sep 2011 09:54:32 +0100 Message-ID: References: <1314935735-5451-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 mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 70F369E8F5 for ; Fri, 2 Sep 2011 01:54:39 -0700 (PDT) In-Reply-To: <1314935735-5451-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: intel-gfx@lists.freedesktop.org Cc: Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org On Thu, 1 Sep 2011 20:55:35 -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... So "dumbing it down" means using macros instead of small functions and putting magic values into the ring structure. I'm not sure if that's an improvement to readability at all. -Chris -- Chris Wilson, Intel Open Source Technology Centre