From dda6dde3df83ae2ed54fe5dc2485efa8ff6209ec Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sun, 11 Jul 2021 08:45:33 -0700 Subject: [PATCH] poly: Early out of waits if no outstanding work. --- src/devices/video/poly.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/devices/video/poly.h b/src/devices/video/poly.h index d61e1bd6137..378e433b269 100644 --- a/src/devices/video/poly.h +++ b/src/devices/video/poly.h @@ -622,6 +622,10 @@ void *poly_manager::work_item_callback(v template void poly_manager::wait(const char *debug_reason) { + // early out if no units outstanding + if (m_unit.count() == 0) + return; + #if TRACK_POLY_WAITS int items = osd_work_queue_items(m_queue); osd_ticks_t time = get_profile_ticks();