qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5] display/gtk: get proper refreshrate


From: Gerd Hoffmann
Subject: Re: [PATCH v5] display/gtk: get proper refreshrate
Date: Thu, 9 Jan 2020 14:21:07 +0100

On Wed, Jan 08, 2020 at 01:13:42PM +0100, address@hidden wrote:
> From: Nikola Pavlica <address@hidden>
> 
> Because some VMs in QEMU can get GPU virtualization (using technologies
> such as iGVT-g, as mentioned previously), they could produce a video
> output that had a higher display refresh rate than of what the GTK
> display was displaying. (fxp. Playing a video game inside of a Windows
> VM at 60 Hz, while the output stood locked at 33 Hz because of defaults
> set in include/ui/console.h)
> 
> Since QEMU does indeed have internal systems for determining frame
> times as defined in ui/console.c.
> The code checks for a variable called update_interval that it later
> uses for time calculation. This variable, however, isn't defined
> anywhere in ui/gtk.c and instead ui/console.c just sets it to
> GUI_REFRESH_INTERVAL_DEFAULT which is 30
> 
> update_interval represents the number of milliseconds per display
> refresh, and by doing some math we get that 1000/30 = 33.33... Hz
> 
> This creates the mentioned problem and what this patch does is that it
> checks for the display refresh rate reported by GTK itself (we can take
> this as a safe value) and just converts it back to a number of
> milliseconds per display refresh.
> 
> Signed-off-by: Nikola Pavlica <address@hidden>

Added to ui queue.

thanks,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]