From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: John Snow <jsnow@redhat.com>,
qemu-devel@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel Berrange" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH v2 1/2] spice: Update QXLInterface for spice >= 0.15.0
Date: Wed, 15 Dec 2021 11:23:02 +0100 [thread overview]
Message-ID: <b9ec9b5d-0985-84be-ea3b-1b8aecc4fb01@redhat.com> (raw)
In-Reply-To: <20211207204038.664133-2-jsnow@redhat.com>
On 12/7/21 21:40, John Snow wrote:
> spice updated the spelling (and arguments) of "attache_worker" in
> 0.15.0. Update QEMU to match, preventing -Wdeprecated-declarations
> compilations from reporting build errors.
>
> See also:
> https://gitlab.freedesktop.org/spice/spice/-/commit/974692bda1e77af92b71ed43b022439448492cb9
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> include/ui/qemu-spice.h | 6 ++++++
> hw/display/qxl.c | 14 +++++++++++++-
> ui/spice-display.c | 11 +++++++++++
> 3 files changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
> index 71ecd6cfd1..21fe195e18 100644
> --- a/include/ui/qemu-spice.h
> +++ b/include/ui/qemu-spice.h
> @@ -40,6 +40,12 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
> #define SPICE_NEEDS_SET_MM_TIME 0
> #endif
>
> +#if defined(SPICE_SERVER_VERSION) && (SPICE_SERVER_VERSION >= 0x000f00)
> +#define SPICE_HAS_ATTACHED_WORKER 1
> +#else
> +#define SPICE_HAS_ATTACHED_WORKER 0
> +#endif
> +
> #else /* CONFIG_SPICE */
>
> #include "qemu/error-report.h"
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 29c80b4289..1da6703e44 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -517,13 +517,20 @@ static int qxl_track_command(PCIQXLDevice *qxl, struct QXLCommandExt *ext)
>
> /* spice display interface callbacks */
>
> -static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
> +static void interface_attached_worker(QXLInstance *sin)
> {
> PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
>
> trace_qxl_interface_attach_worker(qxl->id);
> }
>
> +#if !(SPICE_HAS_ATTACHED_WORKER)
> +static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
> +{
> + interface_attached_worker(sin);
> +}
> +#endif
> +
> static void interface_set_compression_level(QXLInstance *sin, int level)
> {
> PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
> @@ -1131,7 +1138,12 @@ static const QXLInterface qxl_interface = {
> .base.major_version = SPICE_INTERFACE_QXL_MAJOR,
> .base.minor_version = SPICE_INTERFACE_QXL_MINOR,
>
> +#if SPICE_HAS_ATTACHED_WORKER
> + .attached_worker = interface_attached_worker,
> +#else
> .attache_worker = interface_attach_worker,
> +#endif
> +
> .set_compression_level = interface_set_compression_level,
> #if SPICE_NEEDS_SET_MM_TIME
> .set_mm_time = interface_set_mm_time,
> diff --git a/ui/spice-display.c b/ui/spice-display.c
> index f59c69882d..1a60cebb7d 100644
> --- a/ui/spice-display.c
> +++ b/ui/spice-display.c
> @@ -500,10 +500,17 @@ void qemu_spice_display_refresh(SimpleSpiceDisplay *ssd)
>
> /* spice display interface callbacks */
>
> +#if SPICE_HAS_ATTACHED_WORKER
> +static void interface_attached_worker(QXLInstance *sin)
> +{
> + /* nothing to do */
> +}
> +#else
> static void interface_attach_worker(QXLInstance *sin, QXLWorker *qxl_worker)
> {
> /* nothing to do */
> }
> +#endif
>
> static void interface_set_compression_level(QXLInstance *sin, int level)
> {
> @@ -702,7 +709,11 @@ static const QXLInterface dpy_interface = {
> .base.major_version = SPICE_INTERFACE_QXL_MAJOR,
> .base.minor_version = SPICE_INTERFACE_QXL_MINOR,
>
> +#if SPICE_HAS_ATTACHED_WORKER
> + .attached_worker = interface_attached_worker,
> +#else
> .attache_worker = interface_attach_worker,
> +#endif
> .set_compression_level = interface_set_compression_level,
> #if SPICE_NEEDS_SET_MM_TIME
> .set_mm_time = interface_set_mm_time,
>
Could we get this patch directly applied as a buildfix?
next prev parent reply other threads:[~2021-12-15 10:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 20:40 [PATCH v2 0/2] Misc: build fixes for Fedora 35, Ubuntu et al John Snow
2021-12-07 20:40 ` [PATCH v2 1/2] spice: Update QXLInterface for spice >= 0.15.0 John Snow
2021-12-08 9:11 ` Daniel P. Berrangé
2021-12-15 10:23 ` Philippe Mathieu-Daudé [this message]
2021-12-07 20:40 ` [PATCH v2 2/2] ui/clipboard: Don't use g_autoptr just to free a variable John Snow
2021-12-08 8:40 ` Philippe Mathieu-Daudé
2021-12-08 9:11 ` Daniel P. Berrangé
2021-12-08 13:49 ` Philippe Mathieu-Daudé
2021-12-08 15:22 ` John Snow
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=b9ec9b5d-0985-84be-ea3b-1b8aecc4fb01@redhat.com \
--to=philmd@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).