From nobody Mon Feb 9 19:09:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) client-ip=209.85.221.49; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f49.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1636360293; cv=none; d=zohomail.com; s=zohoarc; b=iV3Gf5nw9mcd9185juYAUz93xuqmYfrpycVUL/JugSr9o6Oa6dS5DhBFtDvmxXvRcReykDjennlaFhcmqdM+FUI7zZB+my7A00RPaO7RXtbqubCztbSsM8yfWY4AANQNrNe+acoT4RpYnb9y0Yz7ntbEYtIbhwhHy26uJ7f92ow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636360293; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Sender:Subject:To; bh=sVRl8eJfBgu2KpusNHyAFUhF3t/IMcSCXpyMy3NrXtE=; b=RMkTlTy8ffSClG/Tj15doxBgE4nz5l4uTaSRy6EALXoeA/37u0nJ8quochy4Tmf66VSouw4/Mbv/Mdlot7nYwLgmpI63sQ0OaAjKWE4iNl5Eg98JaqyHYb5JLdEK058PwfwfVSeecPlIAISw36VKwBg3Dgy04cspsBX4CgdaM/s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.zohomail.com with SMTPS id 16363602934891008.3789789958175; Mon, 8 Nov 2021 00:31:33 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id d27so25416428wrb.6 for ; Mon, 08 Nov 2021 00:31:32 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (62.red-83-57-168.dynamicip.rima-tde.net. [83.57.168.62]) by smtp.gmail.com with ESMTPSA id u20sm15888786wmq.6.2021.11.08.00.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 00:31:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sVRl8eJfBgu2KpusNHyAFUhF3t/IMcSCXpyMy3NrXtE=; b=ZXL3xQx0X9zvZbnsanLctSWcM8SnGPUWRDVRMkucmEv10PAwtqabU2HAb+UFJQNQ71 TsZaUpC2OcNP3ftE/KW53A4bB8+2ci4u853GpSKiA9+3uqtKZiv11STn/wn0Mx+1d5MV 7tMswnTZ9tMsbLOHYDXqr0+nabA/V012zMszwJD65zWobHHPgxdb7Q0RddMqhRiO0hom IASTOrCPOg8HcJsyU4WyGngDxI43YGOowx9C7bzt7AK8oCUdAAr1PyeQbsd6qIMIRq5q waYqXPn3XuKFzBp35zt/yj85THc/IM6K62iOskW/kgK+CTJSChDq0mjWs+23mQIUW3gp CJfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=sVRl8eJfBgu2KpusNHyAFUhF3t/IMcSCXpyMy3NrXtE=; b=rJYoMs6Xsih4knKAzAhj0Qxf5KZN2Ns5s6GwTKQ/jHI5T3Nbz+WerVVPcXz6tyXC0D 0MoVSVrWSQpBavp4Lqvquze2c8K89BnAczVYQAJGWiKceRzXQXXQm6oS7OyTNgAPcxY9 zHyTnupYKp6nCF4VmNhngkJqjQ3yM9DrnFNwWHneFIMsWE7FXHaeql134x1AHpG/6Tm9 4KGQc2zdGs1CxdNgB4X+TIyYlRg4nFRh9Z2i9qPZ5iLNDIUF55fDT43NRyTRJOpV/bWD EDtXL5TC7Qnw85YlzdgZPBF/cyAOVAUKoZ4BQZbu4IID2WOf/eFLAWbQWQaFRMfp/CfQ oxRg== X-Gm-Message-State: AOAM530R/DblAmiZqmhe+XjDFd63/KXR5VXvWGLUoTlgY/nEyjdCRDPH HLy/IeEj1ACoK9koWNc9d5c= X-Google-Smtp-Source: ABdhPJxw5HhOL6tbWM2DlJvbTRWK0zqJ7rEVfnJKLpTo77MZSAWYiBmy+mE0O15nSKh8cJ8v8TDBpQ== X-Received: by 2002:a5d:64ed:: with SMTP id g13mr71448040wri.222.1636360291728; Mon, 08 Nov 2021 00:31:31 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Dongwon Kim , Vivek Kasireddy , Laurent Vivier , Mark Cave-Ayland Subject: [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available Date: Mon, 8 Nov 2021 09:31:29 +0100 Message-Id: <20211108083129.1262040-1-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1636360295116100003 Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl") we get on Ubuntu 18.04.4 LTS and Debian Buster (oldstable): $ ../configure --enable-virglrenderer [...] ui/gtk-egl.c: In function 'gd_egl_refresh': ui/gtk-egl.c:159:13: error: implicit declaration of function 'egl_dmabuf_= release_texture' [-Werror=3Dimplicit-function-declaration] 159 | egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ui/gtk-egl.c:159:13: error: this function declaration is not a prototype = [-Werror,-Wstrict-prototypes] ui/gtk-egl.c:159:13: error: nested extern declaration of 'egl_dmabuf_rele= ase_texture' [-Werror=3Dnested-externs] Fix by restricting the egl_dmabuf_release_texture() call to the availability of the generic buffer management library (libgbm). Fixes: 4872a023a593e6519b272a Cc: Dongwon Kim Cc: Vivek Kasireddy Reported-by: Laurent Vivier Reviewed-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier --- ui/gtk-egl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index f2026e4b5c9..45cb67712df 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -155,10 +155,12 @@ void gd_egl_refresh(DisplayChangeListener *dcl) surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds); surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds); } +#ifdef CONFIG_GBM if (vc->gfx.guest_fb.dmabuf) { egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf); gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf); } +#endif } =20 graphic_hw_update(dcl->con); --=20 2.31.1