From nobody Sat Nov 15 10:42:25 2025 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=1752820407; cv=none; d=zohomail.com; s=zohoarc; b=FhVUyzd2s/7NBfGQFLF91t3Wlo4t9Rxq4vPX1m9KKF46VHoonQ5Fq0qDcWJpiKHtLBc3Ai6zccCnLRqyGpzAD5w55CNorRxHJbXubK59BNYCF+9OxgwP4/N7RLdBfFY4yumGCjTie31+iukJVv/lvvV0l3QtPOXCmWBbl31Osrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752820407; 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=TXDcJ2TsJtk95/+YfRzs0R+vVO9qHnb9+/d/5d/1TUU=; b=mrx3RLWjtPpyMk01kXxGNBXbuW37MMPh8YifmwTMJargtHGMgtMLMCtDtiCv1LG04zXzGo/izt6sEkLS4MzFBRKjzMYrO/xpFyhKU4vxey3jN9/S4LYg/piktCstmqJS0kdicGQWUkOCKZKm9Qxw806LUxWe8Vs8XFCXp2DFlYk= 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 175282040758975.8132073826605; Thu, 17 Jul 2025 23:33:27 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ucee5-00085w-GY; Fri, 18 Jul 2025 02:32:37 -0400 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 1uceb3-0005ay-6a for qemu-devel@nongnu.org; Fri, 18 Jul 2025 02:29:29 -0400 Received: from mgamail.intel.com ([198.175.65.9]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uceb0-00055R-2L for qemu-devel@nongnu.org; Fri, 18 Jul 2025 02:29:28 -0400 Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2025 23:29:22 -0700 Received: from vkasired-desk2.fm.intel.com ([10.105.128.132]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2025 23:29:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1752820166; x=1784356166; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mx+6agLPlh4LnJNPcD3Sm7c/6wWZnIEPP+us69O4B5Q=; b=Pe2kgC0//mZATWlbYWoOccX4sz1bCk0jy2MUy/fFuRKAUId5X9yY6hc+ OOQMG4LH8TfVOaFFsxopXACZrjuDsOBhZ98u7RgwBDUzjcohjquGwfURx uXobXE3rw0aC22Lbz+ef9Ee2BmslW+yttLB/DTDf+W7Q8Hsz5lkUNdjvj ZI4t4hb5lsuC5tBDop5SlBXiO6aTOadUZgEx0wkSl99L3I3lv60l9Vbkz o1SOCZdq2ciiNS+nT6wAok0kgcew+66wCMyfZWnHIXQMm2ZSLdL2kA8MF aaHLrc2HTGUv1l0NkuR32p0iueHV34pjxoPJdrJXvlbAVT/ORqyXoRqQL Q==; X-CSE-ConnectionGUID: 86BdIU19SYOlOEJLGagNGg== X-CSE-MsgGUID: zPtcBQCSSQq6neLH7R3CGQ== X-IronPort-AV: E=McAfee;i="6800,10657,11495"; a="77646212" X-IronPort-AV: E=Sophos;i="6.16,320,1744095600"; d="scan'208";a="77646212" X-CSE-ConnectionGUID: WOIAyKIvSlOdMjHhOh3aag== X-CSE-MsgGUID: ZrqqJI4GTmqvHb1aOAVAdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,320,1744095600"; d="scan'208";a="181694337" From: Vivek Kasireddy To: qemu-devel@nongnu.org Cc: Vivek Kasireddy , Peter Maydell , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH] ui/spice: Destroy the temporary egl fb after the blit is submitted Date: Thu, 17 Jul 2025 23:26:07 -0700 Message-ID: <20250718062607.2209900-1-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=198.175.65.9; envelope-from=vivek.kasireddy@intel.com; helo=mgamail.intel.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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 @intel.com) X-ZM-MESSAGEID: 1752820409035116600 The temporary egl fb scanout_tex_fb is only needed to facilitate the blit to the display surface's texture (ssd->ds->texture). Therefore, destroy it after the blit is submitted. And, also make sure that it is empty initialized before it is actually used. Fixes: f851cd65 ("ui/spice: Blit the scanout texture if its memory layout i= s not linear") Reported-by: Peter Maydell Cc: Marc-Andr=C3=A9 Lureau Signed-off-by: Vivek Kasireddy --- ui/spice-display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index 9ce622cefc..401d6c4aba 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -1191,12 +1191,12 @@ static bool spice_gl_blit_scanout_texture(SimpleSpi= ceDisplay *ssd, uint64_t modifier; bool ret; =20 - egl_fb_destroy(scanout_tex_fb); egl_fb_setup_for_tex(scanout_tex_fb, surface_width(ssd->ds), surface_height(ssd->ds), ssd->ds->texture, false); egl_fb_blit(scanout_tex_fb, &ssd->guest_fb, false); glFlush(); + egl_fb_destroy(scanout_tex_fb); =20 if (!ssd->new_scanout_texture) { return true; @@ -1330,7 +1330,7 @@ static void qemu_spice_gl_update(DisplayChangeListene= r *dcl, } =20 if (spice_remote_client && ssd->blit_scanout_texture) { - egl_fb scanout_tex_fb; + egl_fb scanout_tex_fb =3D {}; =20 ret =3D spice_gl_blit_scanout_texture(ssd, &scanout_tex_fb); if (!ret) { --=20 2.49.0