Hi, > + bool draw_submitted; > + QemuMutex mutex;
Why the mutex? I think all the code runs while holding the BQL so it should be serialized. > +#ifdef CONFIG_GBM > + if (dmabuf) { > + qemu_mutex_lock(&dmabuf->mutex); > + if (!dmabuf->draw_submitted) { > + qemu_mutex_unlock(&dmabuf->mutex); > + return; > + } else { > + dmabuf->draw_submitted = false; > + } > + } > +#endif Factoring out that into helper functions is probably a good idea. Then have stub functions for the CONFIG_GBM=no case and *alot* less #ifdefs in the code ... thanks, Gerd