diff options
author | Eric Anholt <eric@anholt.net> | 2009-04-20 13:20:03 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-04-27 17:05:59 -0700 |
commit | d82ea4372fb74654eb0f37d996977003473846ed (patch) | |
tree | beda392d08e52a5bda3ad46d3952eaea5c5dc4ea /src/i830_accel.c | |
parent | 612c1f1f1859ce0cef41049d79cc473657d48612 (diff) |
Replace I830Sync's irq emit/wait code with bufmgr use.
This pre-GEM code was all sorts of broken -- see intel_bufmgr_fake.c for
the hoops that must be jumped to use that kernel interface successfully.
Yet we continued to use it even with KMS/DRI2/UXA, which may account for
some hangs.
Diffstat (limited to 'src/i830_accel.c')
-rw-r--r-- | src/i830_accel.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/i830_accel.c b/src/i830_accel.c index c2f30a8b..589f86de 100644 --- a/src/i830_accel.c +++ b/src/i830_accel.c @@ -156,36 +156,7 @@ I830Sync(ScrnInfoPtr pScrn) I830EmitFlush(pScrn); intel_batch_flush(pScrn, TRUE); - - if (pI830->directRenderingType > DRI_NONE) { - struct drm_i915_irq_emit emit; - struct drm_i915_irq_wait wait; - int ret; - - /* Most of the uses of I830Sync while using GEM should actually be - * using set_domain on a specific buffer. We're not there yet, so fake - * it up using irq_emit/wait. It's still better than spinning on - * register reads for idle. - */ - emit.irq_seq = &wait.irq_seq; - ret = drmCommandWriteRead(pI830->drmSubFD, DRM_I830_IRQ_EMIT, &emit, - sizeof(emit)); - if (ret != 0) - FatalError("Failure to emit IRQ: %s\n", strerror(-ret)); - - do { - ret = drmCommandWrite(pI830->drmSubFD, DRM_I830_IRQ_WAIT, &wait, - sizeof(wait)); - } while (ret == -EINTR); - - if (ret != 0) - FatalError("Failure to wait for IRQ: %s\n", strerror(-ret)); - - if (!pI830->memory_manager) - i830_refresh_ring(pScrn); - } else if (!pI830->use_drm_mode) { - i830_wait_ring_idle(pScrn); - } + intel_batch_wait_last(pScrn); } void |