diff options
-rw-r--r-- | src/i830_display.c | 4 | ||||
-rw-r--r-- | src/i830_memory.c | 8 | ||||
-rw-r--r-- | src/i830_reg.h | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/src/i830_display.c b/src/i830_display.c index 5b1d6ea4..1feb13bf 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -678,7 +678,7 @@ i830_enable_fb_compression(xf86CrtcPtr crtc) 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 crtc) /* 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 8703f2df..f4271ef5 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -1052,8 +1052,7 @@ static void i830_setup_fb_compression(ScrnInfoPtr pScrn) */ 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(ScrnInfoPtr pScrn) 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, unsigned int offset, 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 b5fa1b98..d1670c3e 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) |