From e5e51b3c34af0a460ed217bb35c6ddbaebbecb38 Mon Sep 17 00:00:00 2001 From: AITUS95 <48457684+AITUS95@users.noreply.github.com> Date: Wed, 26 Nov 2025 17:06:15 +0100 Subject: [PATCH] voodoo1: apply FIFO wake delay only when type == VOODOO_1 Updated the wake delay for the FIFO thread based on the card type. --- src/video/vid_voodoo_fifo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/video/vid_voodoo_fifo.c b/src/video/vid_voodoo_fifo.c index 9b273d317..4530e6b01 100644 --- a/src/video/vid_voodoo_fifo.c +++ b/src/video/vid_voodoo_fifo.c @@ -60,7 +60,10 @@ voodoo_fifo_log(const char *fmt, ...) # define voodoo_fifo_log(fmt, ...) #endif -#define WAKE_DELAY (TIMER_USEC * 2000) +#define WAKE_DELAY_DEFAULT (TIMER_USEC * 100) + +/* Per-card wake delay: Voodoo1 uses a larger delay to reduce FIFO wake frequency */ +#define WAKE_DELAY_OF(v) ((v)->type == VOODOO_1 ? (TIMER_USEC * 2000) : WAKE_DELAY_DEFAULT) void voodoo_wake_fifo_thread(voodoo_t *voodoo) { @@ -69,7 +72,7 @@ voodoo_wake_fifo_thread(voodoo_t *voodoo) process one word and go back to sleep, requiring it to be woken on almost every write. Instead, wait a short while so that the CPU emulation writes more data so we have more batched-up work.*/ - timer_set_delay_u64(&voodoo->wake_timer, WAKE_DELAY); + timer_set_delay_u64(&voodoo->wake_timer, WAKE_DELAY_OF(voodoo)); } }