From: Jesse Barnes Subject: Re: [PATCH 1/4] drm/i915: PLL macro cleanup and pipe assertion check Date: Wed, 5 Oct 2011 11:48:45 -0700 Message-ID: <20111005114845.4d7b183c@jbarnes-desktop> References: <1317835521-10183-1-git-send-email-jbarnes@virtuousgeek.org> <1317835521-10183-2-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0618855782==" Return-path: Received: from oproxy8-pub.bluehost.com (oproxy8-pub.bluehost.com [69.89.22.20]) by gabe.freedesktop.org (Postfix) with SMTP id AD1069E930 for ; Wed, 5 Oct 2011 11:48:50 -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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0618855782== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/XaWdDAK7gxAp3e6fs_6PkQu"; protocol="application/pgp-signature" --Sig_/XaWdDAK7gxAp3e6fs_6PkQu Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 05 Oct 2011 19:43:53 +0100 Chris Wilson wrote: > On Wed, 5 Oct 2011 10:25:18 -0700, Jesse Barnes wrote: > > Add a macro for accessing the two pipe PLLs and add a check to make sure > > we don't access a non-existent one in the enable/disable functions. > >=20 > > Signed-off-by: Jesse Barnes > > --- > > drivers/gpu/drm/i915/i915_reg.h | 6 +++--- > > drivers/gpu/drm/i915/intel_display.c | 6 ++++++ > > 2 files changed, 9 insertions(+), 3 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i91= 5_reg.h > > index 542453f..7659075 100644 > > --- a/drivers/gpu/drm/i915/i915_reg.h > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > @@ -2945,15 +2945,15 @@ > > =20 > > #define _PCH_DPLL_A 0xc6014 > > #define _PCH_DPLL_B 0xc6018 > > -#define PCH_DPLL(pipe) _PIPE(pipe, _PCH_DPLL_A, _PCH_DPLL_B) > > +#define PCH_DPLL(pipe) (pipe =3D=3D 0 ? _PCH_DPLL_A : _PCH_DPLL_B) >=20 > If you check that pipe !=3D 2 elsewhere why change these macros? What > might be a good addition is to use a compile-time assert in case we do > feed these an invalid enum pipe. Belt & suspenders; I added the checks and fixes at different times too. But a compile time check would be good for this one. In future PCH parts we'll have more PLLs to drive pipes, but they'll be at a different offset so we'll need new macro anyway. --=20 Jesse Barnes, Intel Open Source Technology Center --Sig_/XaWdDAK7gxAp3e6fs_6PkQu Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJOjKaNAAoJEIEoDkX4Qk9hlGkP/iRRDgyugrBwgJiBYrmA7Cij YhPfuCl9CaQi1rnJBFRyDy49DOGnHEvOpFD0unWwMwZV4qavnNEBUHiB4IgAT+Ps NlcUZ6yXQo0i+Jy4yJstxKTx0F63npdLLCB29wWiSQnMC6zibr7DxzhslnR9qbw1 byq+XnWM76tYnRVpDAw3U2NZKKrxR0rqsChfp6kw0siviyDFsjARk5Ub48c1fNOi Ji7m/hskoxGkruBRNOVGKjFZxqNIfF3JBGoGr/Cd87vYVwAk6pF1ZC5xz3Ay5wCK /y3iwPpdcZ7qPWFrxoAIdtMGUTGT7R+lfz3wBHHFgac4Cl4kJEqOtdWxXwbHQCcf UYEXL1QGZGTOx4n2NJFPgLM9xxW/wDZcCqvCW3QVmpY//cK3Bjvh8b6TX/26zHwP cVL44eDLgFfb+kUopamwL/xsjzWHu3EyGCPwWx5H4NssLFwIX7bQFvHUWOfsi+uM 67mU9wh1dmqD6f2Oht447F2CHZByp6eprMeK5hU2l5tpmCLKYPTLEB3BGOFGAoxx V5+vdWcl457bw08SuoQf1eCGR6tlbQLI4b5FfB5XVqWbJwwaRmJdG/rriU76f/PX XIr+xTnXpKPNKGqY7WEt13nFQvfOBbKZ8pK0rr87SatXPgiT70hxb2wbvAngFqtq E8beFc8SB4Qvig3VHTs5 =DuAy -----END PGP SIGNATURE----- --Sig_/XaWdDAK7gxAp3e6fs_6PkQu-- --===============0618855782== 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 --===============0618855782==--