diff options
author | Eric Anholt <eric@anholt.net> | 2008-09-09 11:01:33 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-09-09 19:18:10 -0700 |
commit | f367334c6392a717f6cd2f4ed02200be1c6d356a (patch) | |
tree | 3c3c5905c245c8ff13e621b7d99cfd36c39cfb16 | |
parent | 0b4f7b630312b148ce4e172cb7cd9f673751b2a3 (diff) |
Track the move of irq emit/wait to fake bufmgr.
-rw-r--r-- | src/i830_dri.c | 5 | ||||
-rw-r--r-- | src/i830_driver.c | 40 |
2 files changed, 8 insertions, 37 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index d0682712..fb9b6f63 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -834,6 +834,11 @@ I830DRIDoMappings(ScreenPtr pScreen) return FALSE; } + if (pI830->memory_manager == NULL) + intel_bufmgr_fake_set_last_dispatch(pI830->bufmgr, + (volatile unsigned int *) + &sarea->last_dispatch); + /* init to zero to be safe */ sarea->front_handle = 0; sarea->back_handle = 0; diff --git a/src/i830_driver.c b/src/i830_driver.c index b9705cf2..491ec5e3 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2886,39 +2886,6 @@ i830_memory_init(ScrnInfoPtr pScrn) return FALSE; } -/** - * Returns a cookie to be waited on. This is just a stub implementation, and - * should be hooked up to the emit/wait irq functions when available (DRI - * enabled). - */ -static unsigned int -i830_fake_fence_emit(void *priv) -{ - static unsigned int fence = 0; - - /* Match DRM in not using half the range. The fake bufmgr relies on this. */ - if (++fence >= 0x8000000) - fence = 1; - - return fence; -} - -/** - * Waits on a cookie representing a request to be passed. - * - * Stub implementation that should be replaced with DRM functions when - * available. - */ -static int -i830_fake_fence_wait(void *priv, unsigned int fence) -{ - ScrnInfoPtr pScrn = priv; - - i830_wait_ring_idle(pScrn); - - return 0; -} - void i830_init_bufmgr(ScrnInfoPtr pScrn) { @@ -2940,13 +2907,12 @@ i830_init_bufmgr(ScrnInfoPtr pScrn) intel_bufmgr_gem_enable_reuse(pI830->bufmgr); } else { assert(pI830->FbBase != NULL); - pI830->bufmgr = intel_bufmgr_fake_init(pI830->fake_bufmgr_mem->offset, + pI830->bufmgr = intel_bufmgr_fake_init(pI830->drmSubFD, + pI830->fake_bufmgr_mem->offset, pI830->FbBase + pI830->fake_bufmgr_mem->offset, pI830->fake_bufmgr_mem->size, - i830_fake_fence_emit, - i830_fake_fence_wait, - pScrn); + NULL); } } |