summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2021-07-11 08:45:33 -0700
committer Aaron Giles <aaron@aarongiles.com>2021-07-11 08:45:33 -0700
commitdda6dde3df83ae2ed54fe5dc2485efa8ff6209ec (patch)
treec6543377905e833a6276bf18c6bb4d34e4da59b4
parentb8e8bc59d4a388b151209ae7893d3656b3983f9b (diff)
poly: Early out of waits if no outstanding work.
-rw-r--r--src/devices/video/poly.h4
1 files changed, 4 insertions, 0 deletions
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<BaseType, ObjectType, MaxParams, Flags>::work_item_callback(v
template<typename BaseType, class ObjectType, int MaxParams, u8 Flags>
void poly_manager<BaseType, ObjectType, MaxParams, Flags>::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();