summaryrefslogtreecommitdiff
path: root/src/intel_uxa.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_uxa.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_uxa.c')
-rw-r--r--src/intel_uxa.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index 24ef6fae..df3adcb3 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -937,7 +937,18 @@ static Bool intel_uxa_get_image(PixmapPtr pixmap,
static void intel_flush_rendering(intel_screen_private *intel)
{
- drm_intel_bo_busy(intel->front_buffer);
+ if (intel->needs_flush == 0)
+ return;
+
+ if (intel->has_kernel_flush) {
+ intel_batch_submit(intel->scrn);
+ drm_intel_bo_busy(intel->front_buffer);
+ } else {
+ intel_batch_emit_flush(intel->scrn);
+ intel_batch_submit(intel->scrn);
+ }
+
+ intel->needs_flush = 0;
}
void intel_uxa_block_handler(intel_screen_private *intel)