From 9fa176c7989030e7340cc9b85d0b6a7b34303091 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 19 Sep 2006 13:58:17 -0400 Subject: Provide all resolutions (instead only the largest one) in MergedFB clone mode without config file (Henry Zhao) --- src/radeon_mergedfb.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/radeon_mergedfb.c b/src/radeon_mergedfb.c index 6f3288f..7b01c82 100644 --- a/src/radeon_mergedfb.c +++ b/src/radeon_mergedfb.c @@ -537,15 +537,27 @@ RADEONGenerateModeList(ScrnInfoPtr pScrn, char* str, if(str != NULL) { return(RADEONGenerateModeListFromMetaModes(pScrn, str, i, j, srel)); } else { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "No MetaModes given, linking %s modes by default\n", - (srel == radeonClone) ? "largest common" : - (info->NonRect ? + if (srel == radeonClone ) { + DisplayModePtr p, q, result = NULL; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Clone mode, list all common modes\n"); + for (p = i; p->next != i; p = p->next) + for (q = j; q->next != j; q = q->next) + if ((p->HDisplay == q->HDisplay) && + (p->VDisplay == q->VDisplay)) + result = RADEONCopyModeNLink(pScrn, result, p, q, srel); + return result; + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "No MetaModes given, linking %s modes by default\n", + (info->NonRect ? (((srel == radeonLeftOf) || (srel == radeonRightOf)) ? "widest" : "tallest") : (((srel == radeonLeftOf) || (srel == radeonRightOf)) ? "widest common" : "tallest common")) ); - return(RADEONGenerateModeListFromLargestModes(pScrn, i, j, srel)); - } + return(RADEONGenerateModeListFromLargestModes(pScrn, i, j, srel)); + } + } } void -- cgit v1.2.3