From: Richard Henderson <richard.henderson@linaro.org>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: "Dongwon Kim" <dongwon.kim@intel.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>
Subject: Re: [PULL 05/11] ui/console: Use qemu_dmabuf_get_..() helpers instead
Date: Wed, 15 May 2024 14:38:18 +0200 [thread overview]
Message-ID: <0a86ac2c-3635-4bb8-b86e-5fbf93676751@linaro.org> (raw)
In-Reply-To: <20240514131725.931234-6-marcandre.lureau@redhat.com>
On 5/14/24 15:17, marcandre.lureau@redhat.com wrote:
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -70,6 +70,7 @@ void gd_egl_draw(VirtualConsole *vc)
> QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf;
> #endif
> int ww, wh, ws;
> + int fence_fd;
>
> if (!vc->gfx.gls) {
> return;
> @@ -83,7 +84,7 @@ void gd_egl_draw(VirtualConsole *vc)
> if (vc->gfx.scanout_mode) {
> #ifdef CONFIG_GBM
> if (dmabuf) {
> - if (!dmabuf->draw_submitted) {
> + if (!qemu_dmabuf_get_draw_submitted(dmabuf)) {
> return;
> } else {
> dmabuf->draw_submitted = false;
> @@ -99,8 +100,9 @@ void gd_egl_draw(VirtualConsole *vc)
> #ifdef CONFIG_GBM
> if (dmabuf) {
> egl_dmabuf_create_fence(dmabuf);
> - if (dmabuf->fence_fd >= 0) {
> - qemu_set_fd_handler(dmabuf->fence_fd, gd_hw_gl_flushed, NULL, vc);
> + fence_fd = qemu_dmabuf_get_fence_fd(dmabuf);
> + if (fence_fd >= 0) {
> + qemu_set_fd_handler(fence_fd, gd_hw_gl_flushed, NULL, vc);
> return;
> }
> graphic_hw_gl_block(vc->gfx.dcl.con, false);
If !CONFIG_GBM, this causes
../src/ui/gtk-egl.c: In function ‘gd_egl_draw’:
../src/ui/gtk-egl.c:73:9: error: unused variable ‘fence_fd’ [-Werror=unused-variable]
73 | int fence_fd;
| ^~~~~~~~
cc1: all warnings being treated as errors
There is no reason to have the declaration at the top, rather than here in this block.
r~
next prev parent reply other threads:[~2024-05-15 12:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 13:17 [PULL 00/11] Ui patches marcandre.lureau
2024-05-14 13:17 ` [PULL 01/11] Allow UNIX socket option for VNC websocket marcandre.lureau
2024-05-14 13:17 ` [PULL 02/11] ui/gtk: Draw guest frame at refresh cycle marcandre.lureau
2024-05-14 13:17 ` [PULL 03/11] ui/gtk: Check if fence_fd is equal to or greater than 0 marcandre.lureau
2024-05-14 13:17 ` [PULL 04/11] ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers marcandre.lureau
2024-05-14 13:17 ` [PULL 05/11] ui/console: Use qemu_dmabuf_get_..() helpers instead marcandre.lureau
2024-05-15 12:38 ` Richard Henderson [this message]
2024-05-15 12:42 ` Cédric Le Goater
2024-05-15 12:52 ` Richard Henderson
2024-05-14 13:17 ` [PULL 06/11] ui/console: Use qemu_dmabuf_set_..() " marcandre.lureau
2024-05-14 13:17 ` [PULL 07/11] ui/console: Use qemu_dmabuf_new() and free() " marcandre.lureau
2024-05-14 13:17 ` [PULL 08/11] ui/console: move QemuDmaBuf struct def to dmabuf.c marcandre.lureau
2024-05-14 13:17 ` [PULL 09/11] ui/gtk: Add gd_motion_event trace event marcandre.lureau
2024-05-14 13:17 ` [PULL 10/11] ui/gtk: Fix mouse/motion event scaling issue with GTK display backend marcandre.lureau
2024-05-14 13:17 ` [PULL 11/11] ui/sdl2: Allow host to power down screen marcandre.lureau
2024-05-15 9:27 ` [PULL 00/11] Ui patches Richard Henderson
2024-05-15 10:27 ` Michael Tokarev
2024-05-15 10:43 ` Marc-André Lureau
2024-05-15 19:00 ` Kim, Dongwon
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=0a86ac2c-3635-4bb8-b86e-5fbf93676751@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alex.williamson@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=dongwon.kim@intel.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=vivek.kasireddy@intel.com \
/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).