Problems with ati driver on Tibook
Alex Deucher
alexdeucher at gmail.com
Mon Jan 4 08:11:08 PST 2010
On Sat, Jan 2, 2010 at 8:53 PM, John R. Dunning <jrd at jrd.org> wrote:
> From: "John R. Dunning" <jrd at jrd.org>
> Date: Mon, 28 Dec 2009 16:11:38 -0500
>
> [...]
>
> I debugged it further.
>
> The difficulty seems to show up in the code which enables/disables
> LVDS. I looked at the more or less analogous code in the kernel
> radeon-fb driver, and cribbed what appeared to be the relevant
> sequence, resulting in the patch which is appended. With this patch
> in place, the screen no longer does the bizarre "bloom" of backlight
> effects, and seems to behave the way I expect w/r/t the screen saver
> and powersave modes.
>
> Looking at the code, my surmise is that the problem centers around
> RADEON_LVDS_BLON vs RADEON_LVDS_BL_MOD_EN. If I'm reading it right,
> the former is doing something I don't understand, whereas the latter
> is actually controlling the backlight, and maybe some other stuff. I
> didn't look super hard for doc on this chipset, so I'm guessing.
>
> In any event, this seems to work for me, so I'll continue to run with
> it until further notice. Hope it's of some use. Thanks again for
> your help...
I'm not sure if this sequence will cause any problems on PC laptops or
not, I suppose it depends on the oem, so I've made the patch
mac-specific for now. If the attached patch works for you, I'll go
ahead and commit it.
Thanks,
Alex
>
>
> --- xf86-video-ati-6.12.4-orig/work/xf86-video-ati-6.12.4/src/legacy_output.c 2009-09-09 22:58:47.000000000 -0400
> +++ xf86-video-ati-6.12.4/work/xf86-video-ati-6.12.4/src/legacy_output.c 2010-01-02 20:39:44.000000000 -0500
> @@ -912,6 +912,7 @@
> ErrorF("enable LVDS\n");
> tmp = INREG(RADEON_LVDS_GEN_CNTL);
> tmp |= (RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
> + tmp |= (RADEON_LVDS_BL_MOD_EN);
> tmp &= ~(RADEON_LVDS_DISPLAY_DIS);
> usleep (lvds->PanelPwrDly * 1000);
> OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
> @@ -994,6 +995,9 @@
> case ENCODER_OBJECT_ID_INTERNAL_LVDS:
> {
> unsigned long tmpPixclksCntl = INPLL(pScrn, RADEON_PIXCLKS_CNTL);
> +
> + tmp = INREG(RADEON_LVDS_GEN_CNTL);
> +
> ErrorF("disable LVDS\n");
> if (info->IsMobility || info->IsIGP) {
> /* Asic bug, when turning off LVDS_ON, we have to make sure
> @@ -1001,10 +1005,19 @@
> */
> OUTPLLP(pScrn, RADEON_PIXCLKS_CNTL, 0, ~RADEON_PIXCLK_LVDS_ALWAYS_ONb);
> }
> - tmp = INREG(RADEON_LVDS_GEN_CNTL);
> +
> tmp |= RADEON_LVDS_DISPLAY_DIS;
> - tmp &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
> +
> + /* zzz jrd cf kernel code */
> + tmp &= ~(RADEON_LVDS_BL_MOD_EN);
> OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
> +
> + usleep(100);
> +
> + tmp &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN);
> +
> + OUTREG(RADEON_LVDS_GEN_CNTL, tmp);
> +
> save->lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS;
> save->lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN);
> if (info->IsMobility || info->IsIGP) {
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-radeon-fix-LVDS-power-sequence-on-Mac-cards.patch
Type: application/mbox
Size: 2236 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-driver-ati/attachments/20100104/7f9dd156/attachment-0001.bin
More information about the xorg-driver-ati
mailing list