From nobody Wed Nov 27 02:40:05 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=1701744087; cv=none; d=zohomail.com; s=zohoarc; b=byuf/R93F45k5rBaEDL8R75mB0QR5iOwbnmuL4Hf/SSXUl5ZabmWCp0Rsi1C+LSBye3B1GMniXDpb2qgZvQDbIlF30xlt7aSfSi8l7d/dAEEiM2/E32As7m4jAooT06fMHnyaU0FNH0cDa8ZY3F5Nfxb3zkjwahnbt68sC+I1gE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701744087; 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=4vx/LNHsrCbrdSGWNlPIE9XdOvvrjnZoceYZDE+JIAc=; b=iiDGHBcvsxPkBSXHmFxBfwMwjMXrt7VEcmhGRxWJLktGIRgJ3GzN3OdaAMQbfFESeAicjDJxu1HH7FA58iCGNklYtqrmE+Z3J4e4bM8loUUpndwFoYLh18LxNQ0pBFPoPt+DLjeJYD8e0exooW5X1hbGic3WL6LFSYmXRNcGXr4= 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 1701744087635309.45982548614666; Mon, 4 Dec 2023 18:41:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rALMX-0007SL-Ln; Mon, 04 Dec 2023 21:40:41 -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 1rALMQ-0007Re-9A for qemu-devel@nongnu.org; Mon, 04 Dec 2023 21:40:35 -0500 Received: from mgamail.intel.com ([134.134.136.31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rALMM-0005QE-Cx for qemu-devel@nongnu.org; Mon, 04 Dec 2023 21:40:33 -0500 Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 18:40:24 -0800 Received: from unknown (HELO localhost.fm.intel.com) ([10.105.154.69]) by orviesa001.jf.intel.com with ESMTP; 04 Dec 2023 18:40:25 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701744030; x=1733280030; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=BStm0IG0TGW8yLK+dWHICb7ZIscZLOYUIoVfC1+k9gg=; b=WjmHmWMIUMU7Y0PPlsd9tOvhR9gw7iI1AAVKNrg6IkiLlCwGskv7wG71 tPzHSFyc4XznC0l2d8/5xH3VH8QV1x/8UwP0SkuEBz8DptU4y5TXtks4F HfF1a8HeZG4dC64za7N45/3ae2fob9CuBSbchYtKcDHD9jhlk5qsK930C O6dbkr9RMC/KOl+CioTLid+u8dXgcKLjqajOXuYcklSHYPTFp5Dsq2S5b r1Td66/reoEAT5d+2QqpO5MSjtaYqauXAS7Mkyj/mm+/l7yr4Lu2QnTRX mmilufnCq2i2nf1WfrHeeNzJTPBSRXa8d/WuGlQsMCgARXvJu1PXqZ+Y6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="458153847" X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="458153847" X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,251,1695711600"; d="scan'208";a="18799006" From: Dongwon Kim To: qemu-devel@nongnu.org Cc: Dongwon Kim , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Vivek Kasireddy Subject: [PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true Date: Mon, 4 Dec 2023 18:40:51 +0000 Message-Id: <20231204184051.16873-1-dongwon.kim@intel.com> X-Mailer: git-send-email 2.34.1 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=134.134.136.31; envelope-from=dongwon.kim@intel.com; helo=mgamail.intel.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1701744088625100001 If the guest state is paused before it gets a response for the current scanout frame submission (resource-flush), it won't start submitting new frames after being restored as it still waits for the old response, which is accepted as a scanout render done signal. So it's needed to unblock the current scanout render pipeline before the run state is changed to make sure the guest receives the response for the current frame submission. Cc: Marc-Andr=C3=A9 Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 810d7fc796..0f6237dd2f 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -678,6 +678,18 @@ static const DisplayGLCtxOps egl_ctx_ops =3D { static void gd_change_runstate(void *opaque, bool running, RunState state) { GtkDisplayState *s =3D opaque; + int i; + + if (state =3D=3D RUN_STATE_SAVE_VM) { + for (i =3D 0; i < s->nb_vcs; i++) { + VirtualConsole *vc =3D &s->vc[i]; + + if (vc->gfx.guest_fb.dmabuf) { + /* force flushing current scanout blob rendering process */ + gd_hw_gl_flushed(vc); + } + } + } =20 gd_update_caption(s); } --=20 2.34.1