summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-02-23 19:27:24 +1000
committerDave Airlie <airlied@redhat.com>2010-02-23 19:27:24 +1000
commitbd83e5f1c75b8c00b43846c7225568917fc9a8ce (patch)
tree83d8572c77abaf0a91cbab67bd1fe0e06980083f /src
parent0c3468d812e3790ce03d9e76779ae81e7b7b82d5 (diff)
zaphod: hopefully fix kms + zaphod
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c4
-rw-r--r--src/radeon_kms.c22
2 files changed, 16 insertions, 10 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index bb29c251..bb219cf9 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 00cea421..b4e17594 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) {