qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: "Phil Dennis-Jordan" <lists@philjordan.eu>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Volker Rümelin" <vr_qemu@t-online.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Phil Dennis-Jordan" <phil@philjordan.eu>
Subject: Re: [PATCH-for-9.2] ui/cocoa: Temporarily ignore annoying deprecated declaration warnings
Date: Wed, 27 Nov 2024 16:07:15 +0900	[thread overview]
Message-ID: <0082edc1-e296-48d5-a44d-7a6531dfe211@daynix.com> (raw)
In-Reply-To: <CAGCz3vtkJS0Fgx_+1qJbUkYAxJ3WPvhEBxJ7P4T1a-g34KV1RA@mail.gmail.com>

On 2024/11/21 23:35, Phil Dennis-Jordan wrote:
> As we're talking about macOS-only code I'd perhaps have used '#pragma 
> clang diagnostic' rather than the GCC versions, but clang seems to 
> understand these just fine too. (Plus, we very much intend for these to 
> be genuinely temporary.)
> 
> Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu 
> <mailto:phil@philjordan.eu>>
> Tested-by: Phil Dennis-Jordan <phil@philjordan.eu 
> <mailto:phil@philjordan.eu>>
> 
> I'll try to find some spare cycles to come up with a clean solution to 
> the deprecation issue towards the end of the year. I need to research 
> the available alternative APIs for another project anyway.
> 
> I think part of the reason for the deprecation is that most modern Macs 
> (as with other modern laptop and desktop computers) actually use a 
> variable display frame rate, so the concept of a "native" frame rate is 
> no longer well-defined. In an ideal world the frame rate would be 
> something that's negotiable between the host UI and the virtual hardware.
> 
> For example, the macOS PV Graphics I've been working on integrating 
> would actually prefer a "push" arrangement where the guest/PV hardware 
> notify the host when the next frame is ready, rather than expecting a 
> fixed-rate frame refresh interrupt or similar. So when using that there 
> would actually not be any need for the display-linked timer at all if 
> the UI is happy with the hw calling dpy_gfx_update_full()/ 
> graphic_hw_update_done() proactively whenever it has a new frame 
> available. I'm not sure what the story is for other display adapters in 
> QEMU, but I can do a survey of that.

Regarding dpy_gfx_update_full()/graphic_hw_update_done(), it's probably 
better to stay the "pull" semantics. With the pull semantics, we can 
drop frames when the UI cannot update the output in timely manner 
because it's in the power-saving mode or it's just too busy. Adapting to 
variable refresh rate will be achieved by using a platform's mechanism 
that fires a refresh event at proper timing.

There is also another function we need to care: dpy_set_ui_info(). This 
function updates the "mode" of the emulated display to tell the refresh 
rate to the guest. A mode is expected to be somewhat stable so it cannot 
properly represent the variable refresh rate. A safe option is to expose 
the maximum refresh rate via the mode.


  reply	other threads:[~2024-11-27  7:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21 13:19 [PATCH-for-9.2] ui/cocoa: Temporarily ignore annoying deprecated declaration warnings Philippe Mathieu-Daudé
2024-11-21 14:35 ` Phil Dennis-Jordan
2024-11-27  7:07   ` Akihiko Odaki [this message]
2024-12-03 15:39 ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0082edc1-e296-48d5-a44d-7a6531dfe211@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=lists@philjordan.eu \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=phil@philjordan.eu \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vr_qemu@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).