Track the move of irq emit/wait to fake bufmgr.

This commit is contained in:
Eric Anholt 2008-09-09 11:01:33 -07:00
parent 0b4f7b6303
commit f367334c63
2 changed files with 8 additions and 37 deletions

View File

@ -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;

View File

@ -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);
}
}