summaryrefslogtreecommitdiff
path: root/src/intel_batchbuffer.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-04-08 13:38:48 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-04-08 13:38:48 +0100
commit97e9557619e58ef769eb7cbf1a03fbd52be7f2ed (patch)
tree2124a51ec4b4a89f9c8f02db6a1a5292d08c8470 /src/intel_batchbuffer.c
parentfb40bf2b33a6d26f0e6a4e5798d10c905faa8aad (diff)
intel: Restore manual flush for old kernels
Daniel Vetter pointed out that the automagic flush by the kernel for the busy-ioctl was only introduced upstream in 2.6.37. So we still need to manually emit a flush on old kernels. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_batchbuffer.c')
-rw-r--r--src/intel_batchbuffer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c
index 95eca434..289ed2b2 100644
--- a/src/intel_batchbuffer.c
+++ b/src/intel_batchbuffer.c
@@ -175,6 +175,13 @@ void intel_batch_emit_flush(ScrnInfoPtr scrn)
intel_batch_do_flush(scrn);
}
+static Bool intel_batch_needs_flush(intel_screen_private *intel)
+{
+ ScreenPtr screen = intel->scrn->pScreen;
+ PixmapPtr pixmap = screen->GetScreenPixmap(screen);
+ return intel_get_pixmap_private(pixmap)->batch_write;
+}
+
void intel_batch_submit(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
@@ -234,6 +241,8 @@ void intel_batch_submit(ScrnInfoPtr scrn)
}
}
+ intel->needs_flush |= intel_batch_needs_flush(intel);
+
while (!list_is_empty(&intel->batch_pixmaps)) {
struct intel_pixmap *entry;