From 140451abb41fbd68d5aac4736c1cf1ec2805dd9e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 9 Oct 2008 18:18:34 -0700 Subject: For non-DRM, add NOOPs after BATCH_BUFFER_START to verify completion In non-DRM mode, the driver waits for the hardware by checking the ring pointers; when the ring is empty, it assumes the hardware is idle. However, the hardware updates the ring pointers before executing a command, so if the MI_BATCH_BUFFER_START is the last command in the ring, the driver will think the hardware is idle while it may still be processing the contents of the batch buffer. Placing NOOPs after the BATCH_BUFFER_START allows the driver to know that the hardware has completed the batch buffer. Signed-off-by: Keith Packard --- src/i830_batchbuffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/i830_batchbuffer.c') diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c index b7b8f18e..cd8f687f 100644 --- a/src/i830_batchbuffer.c +++ b/src/i830_batchbuffer.c @@ -45,9 +45,11 @@ intel_nondrm_exec(dri_bo *bo, unsigned int used, void *priv) ScrnInfoPtr pScrn = priv; I830Ptr pI830 = I830PTR(pScrn); - BEGIN_LP_RING(2); + BEGIN_LP_RING(4); OUT_RING(MI_BATCH_BUFFER_START | (2 << 6)); OUT_RING(bo->offset); + OUT_RING(MI_NOOP); + OUT_RING(MI_NOOP); ADVANCE_LP_RING(); return 0; -- cgit v1.2.3