diff options
author | Kristian Høgsberg <[email protected]> | 2008-01-15 10:23:15 -0500 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-01-15 10:24:04 -0500 |
commit | bb73cf9ec093d734cbed956d843ef6c2982141ef (patch) | |
tree | 0c79f8b9c62a0644465d0d90efcdc0a22e139af0 /src/mesa/drivers/dri | |
parent | 3ad9ca8240ffa32a8dfbfffd0cfb1d0384e04a9f (diff) |
[i915] Prevent recursive batchbuffer flushing.
Workaround for recursive batchbuffer flushing: If the window is
moved, we can get into a case where we try to flush during a
flush. What happens is that when we try to grab the lock for
the first flush, we detect that the window moved which then
causes another flush (from the intel_draw_buffer() call in
intelUpdatePageFlipping()). To work around this we reset the
batchbuffer tail pointer before trying to get the lock. This
prevent the nested buffer flush, but a better fix would be to
avoid that in the first place.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_batchbuffer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c index cff15d253de..d6cd4ca6c72 100644 --- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c @@ -216,6 +216,17 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file, used += 8; } + /* Workaround for recursive batchbuffer flushing: If the window is + * moved, we can get into a case where we try to flush during a + * flush. What happens is that when we try to grab the lock for + * the first flush, we detect that the window moved which then + * causes another flush (from the intel_draw_buffer() call in + * intelUpdatePageFlipping()). To work around this we reset the + * batchbuffer tail pointer before trying to get the lock. This + * prevent the nested buffer flush, but a better fix would be to + * avoid that in the first place. */ + batch->ptr = batch->map; + /* TODO: Just pass the relocation list and dma buffer up to the * kernel. */ |