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

Jesse Barnes jbarnes at kemper.freedesktop.org
Tue Jul 3 14:24:37 PDT 2007


 src/i830_display.c |    4 ++--
 src/i830_memory.c  |    8 +++++---
 src/i830_reg.h     |    3 ++-
 3 files changed, 9 insertions(+), 6 deletions(-)

New commits:
diff-tree 60ee7b6a91b2b8c447130c60cd8b19eb68119777 (from f02036aedcd7866c567a6adc070eda3dad872105)
Author: Jesse Barnes <jbarnes at nietzche.virtuousgeek.org>
Date:   Tue Jul 3 14:20:34 2007 -0700

    Fixup line length buffer padding, add kludge for front buffer tile
    pitch.

diff --git a/src/i830_display.c b/src/i830_display.c
index 5b1d6ea..1feb13b 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -678,7 +678,7 @@ i830_enable_fb_compression(xf86CrtcPtr c
     unsigned long interval = 1000;
 
     compressed_stride = pI830->compressed_front_buffer->size /
-	FBC_COMPRESSED_LINES;
+	FBC_LL_SIZE;
 
     if (uncompressed_stride < compressed_stride)
 	compressed_stride = uncompressed_stride;
@@ -688,7 +688,7 @@ i830_enable_fb_compression(xf86CrtcPtr c
 
     /* Set it up... */
     OUTREG(FBC_CFB_BASE, pI830->compressed_front_buffer->bus_addr);
-    OUTREG(FBC_LL_BASE, pI830->compressed_ll_buffer->bus_addr);
+    OUTREG(FBC_LL_BASE, pI830->compressed_ll_buffer->bus_addr + FBC_LL_PAD);
     OUTREG(FBC_CONTROL2, FBC_CTL_CPU_FENCE | plane);
 
     /* enable it... */
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 8703f2d..f4271ef 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1052,8 +1052,7 @@ static void i830_setup_fb_compression(Sc
      */
     pI830->compressed_front_buffer =
 	i830_allocate_memory(pScrn, "compressed frame buffer",
-			     MB(6), KB(4),
-			     NEED_PHYSICAL_ADDR);
+			     MB(6), KB(4), NEED_PHYSICAL_ADDR);
 
     if (!pI830->compressed_front_buffer) {
 	pI830->fb_compression = FALSE;
@@ -1062,7 +1061,8 @@ static void i830_setup_fb_compression(Sc
 
     pI830->compressed_ll_buffer =
 	i830_allocate_memory(pScrn, "compressed ll buffer",
-			     1568, KB(4), NEED_PHYSICAL_ADDR);
+			     FBC_LL_SIZE + FBC_LL_PAD, KB(4),
+			     NEED_PHYSICAL_ADDR);
     if (!pI830->compressed_ll_buffer) {
 	i830_free_memory(pScrn, pI830->compressed_front_buffer);
 	pI830->fb_compression = FALSE;
@@ -1444,6 +1444,8 @@ i830_set_fence(ScrnInfoPtr pScrn, int nr
     CARD32 fence_mask = 0;
     unsigned int fence_pitch;
 
+    pitch = 512;
+
     DPRINTF(PFX, "i830_set_fence(): %d, 0x%08x, %d, %d kByte\n",
 	    nr, offset, pitch, size / 1024);
 
diff --git a/src/i830_reg.h b/src/i830_reg.h
index b5fa1b9..d1670c3 100644
--- a/src/i830_reg.h
+++ b/src/i830_reg.h
@@ -50,7 +50,8 @@
 #define   FBC_CTL_PIPEA		(0<<0)
 #define   FBC_CTL_PIPEB		(1<<0)
 
-#define FBC_COMPRESSED_LINES	(1536+32)
+#define FBC_LL_SIZE		(1536)
+#define FBC_LL_PAD		(32)
 
 #define I830_SET_FIELD( var, mask, value ) (var &= ~(mask), var |= value)
 


More information about the xorg-commit mailing list