From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 2/6] drm/radeon: ATOM Endian fix for atombios_crtc_program_pll() Date: Thu, 14 Jul 2011 07:40:44 +1000 Message-ID: <1310593244.4968.263.camel@pasglop> References: <1310538495.4968.92.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: Alex Deucher 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, 2011-07-13 at 10:38 -0400, Alex Deucher wrote: > > case 6: > > - args.v6.ulCrtcPclkFreq.ucCRTC = crtc_id; > > - args.v6.ulCrtcPclkFreq.ulPixelClock = cpu_to_le32(clock / 10); > > + args.v6.ulDispEngClkFreq = 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. Cheers, Ben. > Other than that, > > Reviewed-by: Alex Deucher > > > > args.v6.ucRefDiv = ref_div; > > args.v6.usFbDiv = cpu_to_le16(fb_div); > > args.v6.ulFbDivDecFrac = cpu_to_le32(frac_fb_div * 100000); > > > > > > > >