diff options
author | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-02-05 11:36:24 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-02-05 13:12:11 -0800 |
commit | 02d12583e313898a5f14ff968ac4360bce3eff3d (patch) | |
tree | 36cf28f8c654133c91d9f4fd5ee41d6cf773e68b | |
parent | 58cb85a7e4c760adc78128bdf605b7885ac32538 (diff) |
Program FBC fence offset register
Just a partial fix for some of the FBC issues people have been seeing. The
other half is to disable FBC if both pipes are running.
-rw-r--r-- | src/i830.h | 1 | ||||
-rw-r--r-- | src/i830_display.c | 1 | ||||
-rw-r--r-- | src/i830_driver.c | 2 |
3 files changed, 4 insertions, 0 deletions
@@ -616,6 +616,7 @@ typedef struct _I830Rec { CARD32 saveFBC_LL_BASE; CARD32 saveFBC_CONTROL2; CARD32 saveFBC_CONTROL; + CARD32 saveFBC_FENCE_OFF; enum last_3d *last_3d; diff --git a/src/i830_display.c b/src/i830_display.c index e8de1a4d..73cdf8f9 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -610,6 +610,7 @@ i830_enable_fb_compression(xf86CrtcPtr crtc) OUTREG(FBC_LL_BASE, pI830->compressed_ll_buffer->bus_addr + 6); OUTREG(FBC_CONTROL2, FBC_CTL_FENCE_DBL | FBC_CTL_IDLE_FULL | FBC_CTL_CPU_FENCE | plane); + OUTREG(FBC_FENCE_OFF, crtc->y); /* Zero buffers */ memset(pI830->FbBase + pI830->compressed_front_buffer->offset, 0, diff --git a/src/i830_driver.c b/src/i830_driver.c index dffc6306..f9c1dfd2 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1932,6 +1932,7 @@ SaveHWState(ScrnInfoPtr pScrn) pI830->saveFBC_LL_BASE = INREG(FBC_LL_BASE); pI830->saveFBC_CONTROL2 = INREG(FBC_CONTROL2); pI830->saveFBC_CONTROL = INREG(FBC_CONTROL); + pI830->saveFBC_FENCE_OFF = INREG(FBC_FENCE_OFF); } /* Save video mode information for native mode-setting. */ @@ -2212,6 +2213,7 @@ RestoreHWState(ScrnInfoPtr pScrn) if (pI830->fb_compression) { OUTREG(FBC_CFB_BASE, pI830->saveFBC_CFB_BASE); OUTREG(FBC_LL_BASE, pI830->saveFBC_LL_BASE); + OUTREG(FBC_FENCE_OFF, pI830->saveFBC_FENCE_OFF); OUTREG(FBC_CONTROL2, pI830->saveFBC_CONTROL2); OUTREG(FBC_CONTROL, pI830->saveFBC_CONTROL); } |