From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 7/8] drm/i915: Re-enable self-refresh Date: Fri, 18 Mar 2011 17:48:10 +0000 Message-ID: References: <1300435330-15934-1-git-send-email-chris@chris-wilson.co.uk> <1300435330-15934-8-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 649399E77A for ; Fri, 18 Mar 2011 10:48:13 -0700 (PDT) In-Reply-To: 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: Keith Packard , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 18 Mar 2011 08:22:16 -0700, Keith Packard wrote: > On Fri, 18 Mar 2011 08:02:09 +0000, Chris Wilson wrote: > > > A broken implementation of is_pot() prevented the detection of when a > > singular pipe was enabled. > > > - return mask && (mask & -mask) == 0; > > + return mask && (mask & -mask) == mask; > > I think the form > > mask && (mask & (mask - 1)) == 0 > > is easier to reason about. I've reassigned authorship to Yuanhan and gone with your preferred form. -Chris -- Chris Wilson, Intel Open Source Technology Centre