From nobody Mon May 20 15:50:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; 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=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1664403029; cv=none; d=zohomail.com; s=zohoarc; b=FBaU4Ei+WRCJreQRTu4MyWgKBFENsrb2NtdCQG9hPirQZA4kvXZBU8thr6J58prxrreVuZ1VLbSpLBnJIodwlxuBIMj5lO/1h5SBd2izLnjFHygw2ltHqak+H2DKteB42Zpb492pYzY08SWDoyF1GHwYG6tSYlS6HUvpnra6yyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664403029; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=AsoP9aMSfyiIbxriF+rGO4uSYmOkoVMsqGQw8jBO1EE=; b=Ce7+TlR0mFlN/JmI2F1huzcjYhzp+jn1eZssAI/nGNNA31xCJF5vLQ5s9DJMFn4C0EjNj3H/Ww98KIiZPG5z4BH45Y3WtAGYsBDzf9uqm9HNcXUrT/DkUM/sJw2wyu/0n7l76QNA1Gc7bR7EkYVPv0ti3jdAI2qdC2U4m/Ljftc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; 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 1664403029807313.9778714054321; Wed, 28 Sep 2022 15:10:29 -0700 (PDT) Received: from localhost ([::1]:60372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odfG8-00020k-20 for importer@patchew.org; Wed, 28 Sep 2022 18:10:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odfEo-0001Et-It for qemu-devel@nongnu.org; Wed, 28 Sep 2022 18:09:06 -0400 Received: from mga05.intel.com ([192.55.52.43]:57765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odfEl-0006VB-8H for qemu-devel@nongnu.org; Wed, 28 Sep 2022 18:09:06 -0400 Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2022 15:08:40 -0700 Received: from dongwonk-z390-aorus-ultra-intel-gfx.fm.intel.com ([10.105.129.122]) by fmsmga007.fm.intel.com with ESMTP; 28 Sep 2022 15:08:36 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664402943; x=1695938943; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=WWcHPVaVKXkgmO3RUWTbVYim8cuwlGWvVQO76JbWYG8=; b=hYN34g868ft5Yf7fya+ekOP5Mll4xMKgMyx1zhRqPDpHk6Q+Eo2/ygsY n8fYRbcSQaYElA09I4p/ojmibBhzITJXkenP08UnM0wYfKbwLW9sz+lfS 2+EBWR2eKA5YzFuIF1FqYh2VmmUFICTE5mB8sqWNF5jqd2TSar4a7NRc0 hngUxIiBoKJwGatJgOHOdeEzcVByNQD5iYK3PhPWu1lCtGEgX/eiC0weR PdAhA4x2w5uebidkC/IwD0qsqr20MCCPZb7hWOyfmUbGmV5NwOJXORCfp EC5c5LL336KE9eRja0aKY/eNmXk+v4h7w90heOY3Lf47eAbSa6usoKRXe g==; X-IronPort-AV: E=McAfee;i="6500,9779,10484"; a="388008609" X-IronPort-AV: E=Sophos;i="5.93,353,1654585200"; d="scan'208";a="388008609" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10484"; a="624316255" X-IronPort-AV: E=Sophos;i="5.93,353,1654585200"; d="scan'208";a="624316255" From: Dongwon Kim To: qemu-devel@nongnu.org Cc: Dongwon Kim , Gerd Hoffmann Subject: [PATCH] ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch Date: Wed, 28 Sep 2022 14:58:05 -0700 Message-Id: <20220928215805.4661-1-dongwon.kim@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=192.55.52.43; envelope-from=dongwon.kim@intel.com; helo=mga05.intel.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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" X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1664403031479100001 Content-Type: text/plain; charset="utf-8" A thread often fails to bind an egl context to itself after guest VM is rebooted because the context is still owned by another thread. It is not very clear what condition makes this happen but this can be prevented by unbinding the context from the thread in the end of gd_egl_switch. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index b5bffbab25..35f917ceb1 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -195,6 +195,9 @@ void gd_egl_switch(DisplayChangeListener *dcl, if (resized) { gd_update_windowsize(vc); } + + eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, + EGL_NO_CONTEXT); } =20 QEMUGLContext gd_egl_create_context(DisplayGLCtx *dgc, --=20 2.20.1