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

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 5:40 PM, Benjamin Herrenschmidt wrote: > 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_t

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

2011-07-13 Thread Benjamin Herrenschmidt
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.ulDispEngClkFre

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

2011-07-13 Thread Benjamin Herrenschmidt
v6 of the structure was programmed incorrectly: args.v6.ulCrtcPclkFreq.ulPixelClock = cpu_to_le32(clock / 10); ulPixelClock is a 24-bit bitfield. This statement would thus do a 32-bit swap of (clock / 10) and drop the top 8 bits which are ... the LSB. Not what we want. Instead use masks & shift

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

2011-07-13 Thread Benjamin Herrenschmidt
v6 of the structure was programmed incorrectly: args.v6.ulCrtcPclkFreq.ulPixelClock = cpu_to_le32(clock / 10); ulPixelClock is a 24-bit bitfield. This statement would thus do a 32-bit swap of (clock / 10) and drop the top 8 bits which are ... the LSB. Not what we want. Instead use masks & shift

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

2011-07-13 Thread Alex Deucher
On Wed, Jul 13, 2011 at 2:28 AM, Benjamin Herrenschmidt wrote: > v6 of the structure was programmed incorrectly: > >  args.v6.ulCrtcPclkFreq.ulPixelClock = cpu_to_le32(clock / 10); > > ulPixelClock is a 24-bit bitfield. This statement would thus > do a 32-bit swap of (clock / 10) and drop the top