summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alex@samba.(none)>2006-09-19 13:58:17 -0400
committerAlex Deucher <alex@samba.(none)>2006-09-19 13:58:17 -0400
commit9fa176c7989030e7340cc9b85d0b6a7b34303091 (patch)
tree8ca27d666876fd0bc58745fc1cd0ab8606111a43
parente742aeb28c7d9d6e75932c408bcc7c44af52e303 (diff)
Provide all resolutions (instead only the largest one) in MergedFB clone
mode without config file (Henry Zhao)
-rw-r--r--src/radeon_mergedfb.c24
1 files 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