xf86-video-ati: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Tue Feb 23 01:29:53 PST 2010


 src/drmmode_display.c |    4 ++--
 src/radeon_kms.c      |   22 ++++++++++++++--------
 2 files changed, 16 insertions(+), 10 deletions(-)

New commits:
commit bd83e5f1c75b8c00b43846c7225568917fc9a8ce
Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Feb 23 19:27:24 2010 +1000

    zaphod: hopefully fix kms + zaphod

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index bb29c25..bb219cf 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1178,11 +1178,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, char *busId, char
 
 	xf86CrtcSetSizeRange(pScrn, 320, 200, drmmode->mode_res->max_width, drmmode->mode_res->max_height);
 	for (i = 0; i < drmmode->mode_res->count_crtcs; i++)
-		if (zaphod_mask & (1 << i))
+		if ((zaphod_mask & 0xf) & (1 << i))
 			drmmode_crtc_init(pScrn, drmmode, i);
 
 	for (i = 0; i < drmmode->mode_res->count_connectors; i++)
-		if (zaphod_mask & (1 << i))
+		if (((zaphod_mask >> 4) & 0xf) & (1 << i))
 			drmmode_output_init(pScrn, drmmode, i);
 
 	/* workout clones */
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 00cea42..b4e1759 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -427,14 +427,20 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
     if (!radeon_alloc_dri(pScrn))
 	return FALSE;
 
-    zaphod_mask = 0xf;
-    if (info->IsPrimary)
-	zaphod_mask = 0xd;
-    if (info->IsSecondary)
-	zaphod_mask = 0x2;
-    if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS)))
-	zaphod_mask = 0xf;
-
+    /* crtc low bits - output high bits */
+    zaphod_mask = 0xff;
+    if (info->IsPrimary) {
+	if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS)))
+	    zaphod_mask = 0xfd;
+	else
+	    zaphod_mask = 0xdd;
+    }
+    if (info->IsSecondary) {
+	if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS)))
+	    zaphod_mask = 0xf2;
+	else
+	    zaphod_mask = 0x22;
+    }
     info->allowColorTiling = xf86ReturnOptValBool(info->Options,
                                         OPTION_COLOR_TILING, FALSE);
     if (info->ChipFamily >= CHIP_FAMILY_R600) {


More information about the xorg-commit mailing list