On Wed, Oct 08, 2025 at 03:06:51PM +0200, Thomas Zimmermann wrote: > Use a vblank timer to simulate the vblank interrupt. The DRM vblank > helpers provide an implementation on top of Linux' hrtimer. Virtgpu > enables and disables the timer as part of the CRTC. The atomic_flush > callback sets up the event. Like vblank interrupts, the vblank timer > fires at the rate of the display refresh. > > Most userspace limits its page flip rate according to the DRM vblank > event. Virtgpu's virtual hardware does not provide vblank interrupts, so > DRM sends each event ASAP. With the fast access times of virtual display > memory, the event rate is much higher than the display mode's refresh > rate; creating the next page flip almost immediately. This leads to > excessive CPU overhead from even small display updates, such as moving > the mouse pointer. > > This problem affects virtgpu and all other virtual displays. See [1] for > a discussion in the context of hypervdrm. > > Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de> > Link: > https://lore.kernel.org/dri-devel/sn6pr02mb415702b00d6d52b0ee962c98d4...@sn6pr02mb4157.namprd02.prod.outlook.com/ > # [1]
Acked-by: Gerd Hoffmann <kra...@redhat.com>