From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Packard Subject: Re: [PATCH 7/8] drm/i915: Re-enable self-refresh Date: Fri, 18 Mar 2011 08:22:16 -0700 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: multipart/mixed; boundary="===============0209285762==" Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id 365E89E77A for ; Fri, 18 Mar 2011 08:22:20 -0700 (PDT) In-Reply-To: <1300435330-15934-8-git-send-email-chris@chris-wilson.co.uk> 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: Chris Wilson , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0209285762== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable 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) =3D=3D 0; > + return mask && (mask & -mask) =3D=3D mask; I think the form mask && (mask & (mask - 1)) =3D=3D 0 is easier to reason about. But, your fix is also correct as it finds the lowest bit set in 'mask' and checks to see if that is the same as mask. Reviewed-by: Keith Packard =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iD8DBQFNg3ioQp8BWwlsTdMRAswlAKClTJN1mwx9YwvHTXFe8lmi0fT+pQCgk1x8 IJJF02u13NLGVTr1uQV5RKY= =khbK -----END PGP SIGNATURE----- --=-=-=-- --===============0209285762== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0209285762==--