From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4318FC433EF for ; Mon, 8 Nov 2021 08:44:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AF5DA6113D for ; Mon, 8 Nov 2021 08:44:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF5DA6113D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:46746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk0GD-0007BM-G8 for qemu-devel@archiver.kernel.org; Mon, 08 Nov 2021 03:44:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk0FU-0006Sc-0B for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:43:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:34456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk0FP-0000TU-Ow for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:43:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636361001; 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: in-reply-to:in-reply-to:references:references; bh=BmAo+yOkEGPTMwyOuDhQR9wweHYskuaPJQuEG/hFLxw=; b=QiLsze6EIJCnwIoEuSTMfQAc0xaqMAfAQGr8mrHSeTvOioiDPbs5J2QLlQ6msy00SAn3fc wGWmLUQ0ZcLItLyuIMDMal4p0gElTRIEELGLbXKPr2bzro3hcBDG1k/oAhFCMNJyfSlugr knlkVEjRSgaGqkUzxVHjU+GgGTrBv3s= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-596-qFsEwO_HO2-Y-Nony9gVug-1; Mon, 08 Nov 2021 03:43:20 -0500 X-MC-Unique: qFsEwO_HO2-Y-Nony9gVug-1 Received: by mail-ed1-f72.google.com with SMTP id z1-20020a05640235c100b003e28c89743bso14129201edc.22 for ; Mon, 08 Nov 2021 00:43:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=BmAo+yOkEGPTMwyOuDhQR9wweHYskuaPJQuEG/hFLxw=; b=b17NZY3ZCn9bXGihqu5VZX1431NIx5YcrwKayMwLru0UqArqFmPcAxvI7CQFBa9y1E Eqb+TN8bGijf4eZ3TP6bGpH3P+cIc3nAL56m+qhoHiJGjPFce4nj1jPDSP7ko2ZnXRK/ 6FmZs8iKDgs1ZkP3N09T2Ztc+IoCmVo8uhEERIc4+ojl0kLI+oC7CjE+g8H07FLs3JcT HzZz8tt9w+pA/3tE4fqIoYhO8JP1f9+5rC8BYt89RlEChRPdTM0mhJMWU6tM7VRjIglX dCp1ZEEeeJflQxra3Ezcpg64rlsnCtfLFlxFXa/tIBJmjXmDgs7HoXzr8WfAX1z+X6Hn wX8A== X-Gm-Message-State: AOAM530QMpPM+cbqgxJmyiek6wktTI0wZHcchMil/4UqRAOw+Gpli+Iq f65haM4imTyCgdCvYXYYCcMM9yo+Zp+OMRhvvbBjzNzpIo8VtNn7RFJNKg+Qg1/I1Uuun0uoDNX DjeG+B9WAErBCYsE= X-Received: by 2002:a17:906:4fc4:: with SMTP id i4mr75129ejw.81.1636360999602; Mon, 08 Nov 2021 00:43:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJJDcDda4bYV6c7IkrG7rPqAsDUFSfhedna19GoSlnrrDJJh/stiYPWZAuVKx+pEPFkRfvhA== X-Received: by 2002:a17:906:4fc4:: with SMTP id i4mr75100ejw.81.1636360999365; Mon, 08 Nov 2021 00:43:19 -0800 (PST) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id jg36sm7988420ejc.44.2021.11.08.00.43.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Nov 2021 00:43:18 -0800 (PST) Message-ID: Date: Mon, 8 Nov 2021 09:43:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org References: <20211108083129.1262040-1-f4bug@amsat.org> From: Paolo Bonzini In-Reply-To: <20211108083129.1262040-1-f4bug@amsat.org> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -65 X-Spam_score: -6.6 X-Spam_bar: ------ X-Spam_report: (-6.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.7, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-3.06, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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: , Cc: Vivek Kasireddy , Gerd Hoffmann , Mark Cave-Ayland , Dongwon Kim , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 11/8/21 09:31, Philippe Mathieu-Daudé wrote: > 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=implicit-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_release_texture' [-Werror=nested-externs] > > Fix by restricting the egl_dmabuf_release_texture() call to the > availability of the generic buffer management library (libgbm). Matches other uses of the variable; queued the patch, thanks. Paolo > Fixes: 4872a023a593e6519b272a > Cc: Dongwon Kim > Cc: Vivek Kasireddy > Reported-by: Laurent Vivier > Reviewed-by: Mark Cave-Ayland > Signed-off-by: Philippe Mathieu-Daudé > --- > 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 > } > > graphic_hw_update(dcl->con); >