radeon driver: checkpoint
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sun Apr 23 21:32:10 PDT 2006
BTW. I found why CRTC_EXT_CNTL:CRT_ON isn't probably set (your Xinerama
problem). It's some crap in the way the second CRTC is handled. Fix
isn't obvious though.
Alex: Look at InitCrtc2Regsiters(). The f*cker does:
save->crtc_ext_cntl |= RADEON_CRTC_CRT_ON;
Which is bogus because:
- RestoreCrtc2Registers() won't update that register, it's currently
handled by CRTC1 (which is probably why we have this old piece of junk
of a code in the driver to try to "order" between restoring CRTV1 and 2)
- The register "image" of the second entity doesn't contain any useful
value in there in the first place anyway so that is even more bogus.
- It's not testing the monitor type, so it's uselessly enabling the CRT
for dual digital configurations.
At this point, I'm tempted to bite the bullet on power management and
just unconditionally set that bit in InitCrtcRegister() for now. Your
mega patch will handle that better by having a single register image I
suppose (works with Mergedfb for that reason).
Patch here: If you guys are ok, I'll commit.
--- xf86-video-ati-COMMIT/src/radeon_driver.c.orig 2006-04-21 10:38:48
+++ xf86-video-ati-COMMIT/src/radeon_driver.c 2006-04-24 14:31:40
@@ -7806,13 +7806,21
? RADEON_CRTC_INTERLACE_EN
: 0));
+ /* Don't try to be smart and unconditionally enable the analog output
+ * for now as the dodgy code to handle it for the second head doesn't
+ * work. This will be correctly fixed when Alex' megapatch gets in that
+ * reworks the whole output mapping
+ */
+#if 0
if ((info->DisplayType == MT_DFP) ||
(info->DisplayType == MT_LCD)) {
save->crtc_ext_cntl = RADEON_VGA_ATI_LINEAR | RADEON_XCRT_CNT_EN;
save->crtc_gen_cntl &= ~(RADEON_CRTC_DBL_SCAN_EN |
RADEON_CRTC_CSYNC_EN |
RADEON_CRTC_INTERLACE_EN);
- } else {
+ } else
+#endif
+ {
save->crtc_ext_cntl = (RADEON_VGA_ATI_LINEAR |
RADEON_XCRT_CNT_EN |
RADEON_CRTC_CRT_ON);
@@ -7976,7 +7984,6
: 0));
/* Turn CRT on in case the first head is a DFP */
- save->crtc_ext_cntl |= RADEON_CRTC_CRT_ON;
save->dac2_cntl = info->SavedReg.dac2_cntl;
/* always let TVDAC drive CRT2, we don't support tvout yet */
save->dac2_cntl |= RADEON_DAC2_DAC2_CLK_SEL;
Cheers,
Ben.
More information about the xorg
mailing list