diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-08 13:38:48 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2011-05-30 00:25:21 +0100 |
commit | c546e88540290d9fcea5b49f2f5f4c1ab897b13f (patch) | |
tree | ff0907cccaa300b26ad9f3ace493537343976141 /src/intel_uxa.c | |
parent | d5e0fa072c5848549297137aada2bf86e4d7cde7 (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>
(cherry picked from commit 97e9557619e58ef769eb7cbf1a03fbd52be7f2ed)
Conflicts:
src/intel_driver.c
Diffstat (limited to 'src/intel_uxa.c')
-rw-r--r-- | src/intel_uxa.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/intel_uxa.c b/src/intel_uxa.c index 1ae1f303..29b19619 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -936,7 +936,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) |