2021年3月10日(水) 22:29 Gerd Hoffmann <kra...@redhat.com>:
>
>   Hi,
>
> > -static void xenfb_update_interval(void *opaque, uint64_t interval)
> > +static void xenfb_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info)
>
> > -    .update_interval = xenfb_update_interval,
> > +    .ui_info     = xenfb_ui_info,
>
> Hmm, I suspect xenfb really wants the actual refresh rate, even in case
> vnc/sdl change it dynamically.  Anthony?  Stefano?
>
> I guess we should just leave the update_interval callback as-is, for
> those who want know, and use ui_info->refresh_rate for the virtual edid
> refresh rate (which may not match the actual update interval in case of
> dynamic changes).  Adding a comment explaining the difference to
> console.h is a good idea too.

sdl shortens update_interval to respond to user inputs, but it has
nothing to do with frame buffer. Using ui_info->refresh_rate will
eliminate worthless frame updates even for xenfb in such cases.

xenfb has a behavior similar to virtio-gpu. Instead of generating
interrupts, they just tell the refresh rate to the guest and expect
the guest to provide a frame buffer by itself. I think the dynamic
display mode change is also problematic for xenfb if the guest driver
uses the information (although the Linux driver does not use it at
least.) It is possible to have both of the refresh rate member in
QemuUIInfo and update_interval, but I don't see a difference
justifying that.

Anyway, I'd also like to hear opinions from Xen developers.

>
> Otherwise looks good to me overall.  Splitting the ui/gtk update to a
> separate patch is probably a good idea.
>

I'll do so when submitting the next version.

Regards,
Akihiko Odaki

Reply via email to