From nobody Fri Apr 4 04:36:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1739791006; cv=none; d=zohomail.com; s=zohoarc; b=Cw1suX45mSBd7vyvk9WzngWNLDMN7cVf5THkPPg2oH+IBMqbeaXyzi/ZMW5ej7N4xspwAN1Sh9M9xeaLe0vfIF9axgAZhoHr5NgSmqPA3W5snQKABFCNFomuiUj4NgzW3WldGbOOlE93Qy1YjHFI31PSyQaCKnt7N/O+MzzFxqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739791006; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZDaAFZjYp6krCLrGEEqbGU8z4vy7L6m7xm4a2izfV/A=; b=KmwdVjD/LH3EXfiOpuQftl1MOOvL4IhqgUOuVKovevFLoM0Nm73fc/xuCTit3vzNaDr1o5KBe1UzA6m5PDNvPfYuBmJU+bD2ZhzocMCnxunvnteC7TMZ4O3ZDltDeI/rOlR5A/k6xg9GsapXVMNvE2ERg75qnRq8vC0RYx52vR4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739791006695187.61491000940396; Mon, 17 Feb 2025 03:16:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjz6P-0000du-Dq; Mon, 17 Feb 2025 06:15:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjz67-0000dO-E3 for qemu-devel@nongnu.org; Mon, 17 Feb 2025 06:15:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjz63-0004h2-RE for qemu-devel@nongnu.org; Mon, 17 Feb 2025 06:15:35 -0500 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-357--LOL1UssPDurLgOXyf9UlQ-1; Mon, 17 Feb 2025 06:15:25 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D4DE019373D9; Mon, 17 Feb 2025 11:15:24 +0000 (UTC) Received: from localhost (unknown [10.45.242.7]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 89F171800360; Mon, 17 Feb 2025 11:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739790927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZDaAFZjYp6krCLrGEEqbGU8z4vy7L6m7xm4a2izfV/A=; b=RSNdn61GFSRfz57Zt6rhuw9A2YHQKHU8y0FYNectdSvPKCKzcKSiZPoBgumSIvbbfTA+Ij GFY0kcO/JHzLeGhRb2/ESS8+q0do0W/etanmIMs2GmUAgHXuTjb2SNQqonl7g17t37i24X uf5p7P6vxgg5f+vXpoqWlIyN1XdOqKg= X-MC-Unique: -LOL1UssPDurLgOXyf9UlQ-1 X-Mimecast-MFC-AGG-ID: -LOL1UssPDurLgOXyf9UlQ_1739790925 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: pierre-eric.pelloux-prayer@amd.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH] ui/sdl: only compile dmabuf support if CONFIG_GBM Date: Mon, 17 Feb 2025 15:15:18 +0400 Message-ID: <20250217111518.93617-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.382, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1739791008817019100 From: Marc-Andr=C3=A9 Lureau Fix SDL backend compilation for win32. Fixes: commit 31287d1af4 ("ui/sdl2: Implement dpy dmabuf functions") Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/sdl2-gl.c | 2 ++ ui/sdl2.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index 31f8fbe032..6bceeed565 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -251,6 +251,7 @@ void sdl2_gl_scanout_flush(DisplayChangeListener *dcl, SDL_GL_SwapWindow(scon->real_window); } =20 +#ifdef CONFIG_GBM void sdl2_gl_scanout_dmabuf(DisplayChangeListener *dcl, QemuDmaBuf *dmabuf) { @@ -312,3 +313,4 @@ void sdl2_gl_console_init(struct sdl2_console *scon) scon->surface =3D NULL; scon->hidden =3D hidden; } +#endif /* CONFIG_GBM */ diff --git a/ui/sdl2.c b/ui/sdl2.c index 9439745443..8c9df23343 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -806,9 +806,11 @@ static const DisplayChangeListenerOps dcl_gl_ops =3D { .dpy_gl_scanout_texture =3D sdl2_gl_scanout_texture, .dpy_gl_update =3D sdl2_gl_scanout_flush, =20 +#ifdef CONFIG_GBM .dpy_gl_scanout_dmabuf =3D sdl2_gl_scanout_dmabuf, .dpy_gl_release_dmabuf =3D sdl2_gl_release_dmabuf, .dpy_has_dmabuf =3D sdl2_gl_has_dmabuf, +#endif }; =20 static bool @@ -939,7 +941,9 @@ static void sdl2_display_init(DisplayState *ds, Display= Options *o) sdl2_console[i].kbd =3D qkbd_state_init(con); if (display_opengl) { qemu_console_set_display_gl_ctx(con, &sdl2_console[i].dgc); +#ifdef CONFIG_GBM sdl2_gl_console_init(&sdl2_console[i]); +#endif } register_displaychangelistener(&sdl2_console[i].dcl); =20 --=20 2.47.0