xf86-video-intel: Branch 'fbc' - src/i830_display.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Fri Jul 6 11:38:21 PDT 2007


 src/i830_display.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

New commits:
diff-tree cecbc71fdc9af832cef23427696f6f654f7d6104 (from 4359df9419d2d02a2f9d9adc7f5a49ecf07ddd30)
Author: Jesse Barnes <jesse.barnes at intel.com>
Date:   Fri Jul 6 16:36:34 2007 -0700

    Fix debug output in fbc enable/disable routines.  Add logic to make sure fbc
    isn't enabled twice on two different pipes.

diff --git a/src/i830_display.c b/src/i830_display.c
index c79676d..dc52c0b 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -708,6 +708,14 @@ i830_enable_fb_compression(xf86CrtcPtr c
     unsigned long uncompressed_stride = pScrn->displayWidth * pI830->cpp;
     unsigned long interval = 1000;
 
+    if (INREG(FBC_CONTROL) & FBC_CTL_EN) {
+	char cur_pipe = (INREG(FBC_CONTROL2) & 1) ? 'b' : 'a';
+	xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "fbc already enabled on "
+		   "pipe %c, not enabling on pipe %c\n", cur_pipe, pipe ? 'b' :
+		   'a');
+	return;
+    }
+
     compressed_stride = pI830->compressed_front_buffer->size /
 	FBC_LL_SIZE;
 
@@ -730,7 +738,7 @@ i830_enable_fb_compression(xf86CrtcPtr c
     OUTREG(FBC_CONTROL, fbc_ctl);
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "fbc enabled on pipe %c\n", pipe ?
-	       "a" : "b");
+	       'b' : 'a');
 }
 
 static void
@@ -739,6 +747,7 @@ i830_disable_fb_compression(xf86CrtcPtr 
     ScrnInfoPtr pScrn = crtc->scrn;
     I830Ptr pI830 = I830PTR(pScrn);
     uint32_t fbc_ctl;
+    char pipe = (INREG(FBC_CONTROL2) & 1) ? 'b' : 'a';;
 
     /* Disable compression */
     fbc_ctl = INREG(FBC_CONTROL);
@@ -748,7 +757,7 @@ i830_disable_fb_compression(xf86CrtcPtr 
     /* Wait for compressing bit to clear */
     while (INREG(FBC_STATUS) & FBC_STAT_COMPRESSING)
 	; /* nothing */
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "fbc disabled\n");
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "fbc disabled on pipe %c\n", pipe);
 }
 
 static void


More information about the xorg-commit mailing list