From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Deucher Subject: Re: [PATCH 2/6] drm/radeon: ATOM Endian fix for atombios_crtc_program_pll() Date: Wed, 13 Jul 2011 22:21:53 -0400 Message-ID: References: <1310538495.4968.92.camel@pasglop> <1310593244.4968.263.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-iy0-f177.google.com (mail-iy0-f177.google.com [209.85.210.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 7289D9E9CD for ; Wed, 13 Jul 2011 19:21:54 -0700 (PDT) Received: by iyn15 with SMTP id 15so7112508iyn.36 for ; Wed, 13 Jul 2011 19:21:54 -0700 (PDT) In-Reply-To: <1310593244.4968.263.camel@pasglop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Benjamin Herrenschmidt Cc: xorg-driver-ati@lists.x.org, dri-devel@lists.freedesktop.org, =?ISO-8859-1?Q?C=E9dric_Cano?= List-Id: dri-devel@lists.freedesktop.org On Wed, Jul 13, 2011 at 5:40 PM, Benjamin Herrenschmidt wrote: > On Wed, 2011-07-13 at 10:38 -0400, Alex Deucher wrote: > >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case 6: >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 args.v6.ulCrtcPclkFreq.u= cCRTC =3D crtc_id; >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 args.v6.ulCrtcPclkFreq.u= lPixelClock =3D cpu_to_le32(clock / 10); >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 args.v6.ulDispEngClkFreq= =3D cpu_to_le32(crtc_id << 24 | clock / 10); >> >> For clarity (i can never remember op precedence), you might put: >> >> cpu_to_le32((crtc_id << 24) | (clock / 10)); > > I can't either but I have a nice chart printed on my wall :-) > > I can respin if you really want but the above is correct. That's fine as is then. Alex > > Cheers, > Ben. > >> Other than that, >> >> Reviewed-by: Alex Deucher >> >> >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0args.v6.ucRefDiv =3D re= f_div; >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0args.v6.usFbDiv =3D cpu= _to_le16(fb_div); >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0args.v6.ulFbDivDecFrac = =3D cpu_to_le32(frac_fb_div * 100000); >> > >> > >> > >> > > > >