summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-10-09 18:18:34 -0700
committerKeith Packard <keithp@keithp.com>2008-10-09 18:23:26 -0700
commit140451abb41fbd68d5aac4736c1cf1ec2805dd9e (patch)
tree8c21224125fd7c1b530be72480bf5de4cca64a0a /src
parentd09d938bf26ea0c44352ff6e7a57ba43f4047fdb (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/i830_batchbuffer.c4
1 files changed, 3 insertions, 1 deletions
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;