diff options
-rw-r--r-- | src/radeon_driver.c | 28 | ||||
-rw-r--r-- | src/radeon_output.c | 4 |
2 files changed, 21 insertions, 11 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index c97be4f9..9a4cb9a5 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -2832,22 +2832,29 @@ static void RADEONFixZaphodOutputs(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + xf86OutputPtr output; int o; char *s; if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) { for (o = 0; o < config->num_output; o++) { - if (!RADEONZaphodStringMatches(pScrn, info->IsPrimary, s, config->output[o]->name)) - xf86OutputDestroy(config->output[o]); + if (RADEONZaphodStringMatches(pScrn, info->IsPrimary, s, config->output[o]->name)) + output = config->output[o]; + } + while (config->num_output > 1) { + if (config->output[0] != output) + xf86OutputDestroy(config->output[0]); + else if (config->output[1] != output) + xf86OutputDestroy(config->output[1]); } } else { if (info->IsPrimary) { xf86OutputDestroy(config->output[0]); - while(config->num_output > 1) { + while (config->num_output > 1) { xf86OutputDestroy(config->output[1]); } } else { - while(config->num_output > 1) { + while (config->num_output > 1) { xf86OutputDestroy(config->output[1]); } } @@ -2862,12 +2869,14 @@ static Bool RADEONPreInitControllers(ScrnInfoPtr pScrn) int mask; int found = 0; - if (!info->IsPrimary && !info->IsSecondary) - mask = 3; - else if (info->IsPrimary) + if (info->IsPrimary) mask = 1; - else + else if (info->IsSecondary) mask = 2; + else + mask = 3; + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mask: %d\n", mask); if (!RADEONAllocateControllers(pScrn, mask)) return FALSE; @@ -3161,9 +3170,6 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags) if (!RADEONPreInitControllers(pScrn)) goto fail; - - ErrorF("before xf86InitialConfiguration\n"); - if (!xf86InitialConfiguration (pScrn, FALSE)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n"); diff --git a/src/radeon_output.c b/src/radeon_output.c index 49df82fe..7b285233 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -2736,6 +2736,10 @@ radeon_output_clones (ScrnInfoPtr pScrn, xf86OutputPtr output) int o; int index_mask = 0; + /* no cloning with zaphod */ + if (info->IsPrimary || info->IsSecondary) + return index_mask; + /* DIG routing gets problematic */ if (info->ChipFamily >= CHIP_FAMILY_R600) return index_mask; |