From nobody Fri Apr 4 19:15:51 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=1687905161; cv=none; d=zohomail.com; s=zohoarc; b=VKhienB00Cms6oapDdKfUwG+6c5fsLJeiiNAdXWoqCXD+rK/pxr4FRc0UwEmLjB9g5ffdWWoDVUthsFusH4duahXRdd4l/hnlTIZHnZylEVTNYrsx//NjeyrqSFEDnlEFt/knbAyBAcMg1JS0NuHiV+tZUSYss9vVjol+i4ao4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687905161; h=Content-Type: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=v6BjgmU+I7grjy9ug3UyXifzPUHFtN5ItYjeLss5hQM=; b=ncwuLsyIZNUN2+URQfmMqwFgxPSdU7psYdM7eHdlmDaRCIbD6fgPKAnZrfQmfScECLc5uqMPX0AHJ3QvugkS6HgCKAzRQbmSLZv7N8J2GuKFGxvL9M+eGH7vTNwdRYZWWTGtZMq4A+x8M3PM7gAfDKmkRsteUj4TDacPHmJMrX4= 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 1687905161914535.9225283223288; Tue, 27 Jun 2023 15:32:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEHDq-0003Fj-Ql; Tue, 27 Jun 2023 18:31:42 -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 1qEHDn-0003FS-FZ for qemu-devel@nongnu.org; Tue, 27 Jun 2023 18:31:40 -0400 Received: from mga07.intel.com ([134.134.136.100]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEHDk-0003TO-CN for qemu-devel@nongnu.org; Tue, 27 Jun 2023 18:31:39 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2023 15:31:18 -0700 Received: from dongwonk-z390-aorus-ultra-intel-gfx.fm.intel.com ([10.105.129.122]) by orsmga002.jf.intel.com with ESMTP; 27 Jun 2023 15:31:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687905096; x=1719441096; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tJTtq6w8/v8JmOAQkuW27MoSXs00uBvKR5b6TKtAP80=; b=jHs4Pq101Ql/6DHcKyf7gcmtX+O6GiPUMnca78U6HJ47VbDK73runiBB LHVEiqXg+0Py/8TczLJWUBEfv4VFeO29sVcn6UX/6DBrblxr1UpHInaAz BKoibCUZOOE7wpYQEeq1QmXL19y/uyolkiu7v0y8F8Hx/OBMbXwk9Alam Qwsb37KhvwlJVKXbRWoGflf7bkki58Ik4CM0EV2hWsh9yDo8MmbBFoc+i 5RHqicGU5VNQAP2bKAMqyfJjjAaKf9qohys2JX7C1t5pB7g+TQ543SIzD H9w4LwQcEBL5B7tNLw4N2tFTCIe16GCSfuUhK1w3+5XWh5PVkFyhK6Iek g==; X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="427703937" X-IronPort-AV: E=Sophos;i="6.01,163,1684825200"; d="scan'208";a="427703937" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10754"; a="716696532" X-IronPort-AV: E=Sophos;i="6.01,163,1684825200"; d="scan'208";a="716696532" From: Dongwon Kim To: qemu-devel@nongnu.org Cc: Dongwon Kim , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Vivek Kasireddy Subject: [PATCH] virtio-gpu: do not replace surface when scanout is disabled Date: Tue, 27 Jun 2023 15:11:39 -0700 Message-Id: <20230627221139.11250-1-dongwon.kim@intel.com> X-Mailer: git-send-email 2.20.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.100; envelope-from=dongwon.kim@intel.com; helo=mga07.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, 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: 1687905163300100001 Surface is replaced with a place holder whenever the surface res is unreferenced by the guest message. With this logic, there is very frequent switching between guest display and the place holder image, which is looking like a flickering display if the guest driver is designed to unref the current scanout resource before sending out a new scanout resource. So it is better to leave the current scanout image until there is a new one flushed by the guest. Cc: Gerd Hoffmann Cc: Marc-Andr=C3=A9 Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 66cddd94d9..9d3e922c8f 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -387,7 +387,6 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, in= t scanout_id) res->scanout_bitmask &=3D ~(1 << scanout_id); } =20 - dpy_gfx_replace_surface(scanout->con, NULL); scanout->resource_id =3D 0; scanout->ds =3D NULL; scanout->width =3D 0; --=20 2.34.1