xf86-video-ati: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Sun Nov 12 07:33:28 EET 2006


 src/radeon_display.c |   46 +++++++++++++++++++++++++++++-----------------
 1 files changed, 29 insertions(+), 17 deletions(-)

New commits:
diff-tree 8dd668db05e8f1282fa0e29a91e38c7cbdc97aa1 (from 45a9f434b77ad892efcdba267a935135b972dd42)
Author: Dave Airlie <airlied at linux.ie>
Date:   Sun Nov 12 16:33:21 2006 +1100

    radeon: abstract init display bandwidth from mergedfb

diff --git a/src/radeon_display.c b/src/radeon_display.c
index 63b804e..d4264f6 100644
--- a/src/radeon_display.c
+++ b/src/radeon_display.c
@@ -1635,14 +1635,11 @@ void RADEONEnableDisplay(ScrnInfoPtr pSc
 }
 
 /* Calculate display buffer watermark to prevent buffer underflow */
-void RADEONInitDispBandwidth(ScrnInfoPtr pScrn)
+void RADEONInitDispBandwidth2(ScrnInfoPtr pScrn, RADEONInfoPtr info, RADEONInfoPtr info2,
+			      DisplayModePtr mode1, DisplayModePtr mode2)
 {
-    RADEONInfoPtr  info       = RADEONPTR(pScrn);
     RADEONEntPtr pRADEONEnt   = RADEONEntPriv(pScrn);
     unsigned char *RADEONMMIO = info->MMIO;
-    RADEONInfoPtr  info2 = NULL;
-
-    DisplayModePtr mode1, mode2;
 
     CARD32 temp, data, mem_trcd, mem_trp, mem_tras, mem_trbs=0;
     float mem_tcas;
@@ -1677,7 +1674,7 @@ void RADEONInitDispBandwidth(ScrnInfoPtr
      */
     if ((info->DispPriority == 2) && IS_R300_VARIANT) {
         CARD32 mc_init_misc_lat_timer = INREG(R300_MC_INIT_MISC_LAT_TIMER);
-	if (info->MergedFB || pRADEONEnt->HasSecondary) {
+	if (pRADEONEnt->Controller[1].IsActive) {
 	    mc_init_misc_lat_timer |= 0x1100; /* display 0 and 1 */
 	} else {
 	    mc_init_misc_lat_timer |= 0x0100; /* display 0 only */
@@ -1692,23 +1689,13 @@ void RADEONInitDispBandwidth(ScrnInfoPtr
     if (pRADEONEnt->pSecondaryScrn) {
 	if (info->IsSecondary) return;
 	info2 = RADEONPTR(pRADEONEnt->pSecondaryScrn);
-    }  else if (info->MergedFB) info2 = info;
+    }  else if (pRADEONEnt->Controller[1].binding == 1) info2 = info;
 
     /*
      * Determine if there is enough bandwidth for current display mode
      */
     mem_bw = info->mclk * (info->RamWidth / 8) * (info->IsDDR ? 2 : 1);
 
-    mode1 = info->CurrentLayout.mode;
-    if (info->MergedFB) {
-	mode1 = ((RADEONMergedDisplayModePtr)info->CurrentLayout.mode->Private)->CRT1;
-	mode2 = ((RADEONMergedDisplayModePtr)info->CurrentLayout.mode->Private)->CRT2;
-    } else if ((pRADEONEnt->HasSecondary) && info2) {
-	mode2 = info2->CurrentLayout.mode;
-    } else {
-	mode2 = NULL;
-    }
-
     pix_clk = mode1->Clock/1000.0;
     if (mode2)
 	pix_clk2 = mode2->Clock/1000.0;
@@ -1960,6 +1947,31 @@ void RADEONInitDispBandwidth(ScrnInfoPtr
     }
 }
 
+void RADEONInitDispBandwidth(ScrnInfoPtr pScrn)
+{
+    RADEONInfoPtr info = RADEONPTR(pScrn);
+    RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
+    DisplayModePtr mode1, mode2;
+    RADEONInfoPtr info2 = NULL;
+
+    if (pRADEONEnt->pSecondaryScrn) {
+	if (info->IsSecondary) return;
+	info2 = RADEONPTR(pRADEONEnt->pSecondaryScrn);
+    } else if (pRADEONEnt->Controller[1].binding == 1) info2 = info;
+
+    mode1 = info->CurrentLayout.mode;
+    if (info->MergedFB) {
+	mode1 = ((RADEONMergedDisplayModePtr)info->CurrentLayout.mode->Private)->CRT1;
+	mode2 = ((RADEONMergedDisplayModePtr)info->CurrentLayout.mode->Private)->CRT2;
+    } else if ((pRADEONEnt->HasSecondary) && info2) {
+	mode2 = info2->CurrentLayout.mode;
+    } else {
+	mode2 = NULL;
+    }
+
+    RADEONInitDispBandwidth2(pScrn, info, info2, mode1, mode2);
+}
+
 static void RADEONBlankSet(ScrnInfoPtr pScrn, int controller)
 {
     RADEONInfoPtr  info       = RADEONPTR(pScrn);



More information about the xorg-commit mailing list