[PATCH 2/6] drm/radeon: ATOM Endian fix for atombios_crtc_program_pll()

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Jul 13 14:40:44 PDT 2011


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 <alexander.deucher at amd.com>
> 
> 
> >                        args.v6.ucRefDiv = ref_div;
> >                        args.v6.usFbDiv = cpu_to_le16(fb_div);
> >                        args.v6.ulFbDivDecFrac = cpu_to_le32(frac_fb_div * 100000);
> >
> >
> >
> >




More information about the dri-devel mailing list