summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-02-23 11:39:55 -0500
committerAlex Deucher <alexdeucher@gmail.com>2010-02-23 11:39:55 -0500
commit1b7e9a2e50f77819b3aff4e37ba39eaec69ff932 (patch)
tree80f2551e88cb7002b409f4020bdd1d0e89cd47b2 /src
parentbd83e5f1c75b8c00b43846c7225568917fc9a8ce (diff)
radeon: fixes for zaphodheads option
Needed for systems with more than two outputs. Both KMS and non-KMS zaphod work on systems with more than two outputs now.
Diffstat (limited to 'src')
-rw-r--r--src/radeon_driver.c28
-rw-r--r--src/radeon_output.c4
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;