diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-04 19:21:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-04 19:24:30 +0100 |
commit | 6f104189bb9439ab0e05f04d4be020813eb04bf9 (patch) | |
tree | c1c8040c6520dbc3a37c729a73a5619678d66057 /src/intel_batchbuffer.c | |
parent | 314439860e595c473d168c0cafb2b5b49b7fef30 (diff) |
Take advantage of the kernel flush for dirty bo in the busy ioctl
Rather than just creating and submitting a batch that simply contains a
flush in order to periodically ensure that rendering reaches the
scanout, we can simply ask the kernel whether the scanout is busy. The
kernel will then submit a flush on our behalf if it is dirty, which
takes advantage of the kernel's dirty state tracking.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_batchbuffer.c')
-rw-r--r-- | src/intel_batchbuffer.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/intel_batchbuffer.c b/src/intel_batchbuffer.c index 2bc00f90..2e1b7d96 100644 --- a/src/intel_batchbuffer.c +++ b/src/intel_batchbuffer.c @@ -135,8 +135,6 @@ void intel_batch_do_flush(ScrnInfoPtr scrn) while (!list_is_empty(&intel->flush_pixmaps)) list_del(intel->flush_pixmaps.next); - - intel->need_mi_flush = FALSE; } void intel_batch_emit_flush(ScrnInfoPtr scrn) @@ -176,7 +174,7 @@ void intel_batch_emit_flush(ScrnInfoPtr scrn) intel_batch_do_flush(scrn); } -void intel_batch_submit(ScrnInfoPtr scrn, int flush) +void intel_batch_submit(ScrnInfoPtr scrn) { intel_screen_private *intel = intel_get_screen_private(scrn); int ret; @@ -190,9 +188,6 @@ void intel_batch_submit(ScrnInfoPtr scrn, int flush) if (intel->batch_flush) intel->batch_flush(intel); - if (flush) - intel_batch_emit_flush(scrn); - if (intel->batch_used == 0) return; @@ -249,7 +244,6 @@ void intel_batch_submit(ScrnInfoPtr scrn, int flush) list_del(&entry->batch); } - intel->need_mi_flush |= !list_is_empty(&intel->flush_pixmaps); while (!list_is_empty(&intel->flush_pixmaps)) list_del(intel->flush_pixmaps.next); @@ -285,5 +279,5 @@ void intel_debug_flush(ScrnInfoPtr scrn) intel_batch_emit_flush(scrn); if (intel->debug_flush & DEBUG_FLUSH_BATCHES) - intel_batch_submit(scrn, FALSE); + intel_batch_submit(scrn); } |