Problems with ati driver on Tibook
John R. Dunning
jrd at jrd.org
Sat Jan 2 17:53:19 PST 2010
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...
--- 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) {
More information about the xorg-driver-ati
mailing list