From nobody Sat Apr 12 14:47:28 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=1662688303; cv=none; d=zohomail.com; s=zohoarc; b=LgDq0QtLVW01QZWJYryOPzo79XES+JgZWFW/94rcsh8Noeb+4q1pcTO+uTDyfFIbJdJhexG3iYAxumoWjpNEcW71rimx/FiyNOvw7WIVLO6SXSEOIVdC9Yg2kGn+hH/AzryyT+CwdrWPnjIrfBqibGrLoWomacfQQComRgeGb9A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662688303; 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=Z+9JCLr8AHKcfHO7v421orgaE116eaBbw+pKl6V9VpA=; b=JFSzt+FhKv43UZIDjyjJJxVuLXZxiarqPci0wpVzhK3CSTrvJfbS4r0Mzp/r5jVktlIw9gTZ+7xi4eOzS9/V2QRudLtPL9/rTlZ2U6ge8Ed/glWtgy4XFzA+8CH23nweuT01Jgykid1QxEgFEkqM3+r+Cw0wguzipy4DouqwIOM= 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 1662688303560525.6227697392416; Thu, 8 Sep 2022 18:51:43 -0700 (PDT) Received: from localhost ([::1]:40408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWTBG-0001DY-2l for importer@patchew.org; Thu, 08 Sep 2022 21:51:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWTA1-0008EW-RM for qemu-devel@nongnu.org; Thu, 08 Sep 2022 21:50:26 -0400 Received: from mga09.intel.com ([134.134.136.24]:35246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWT9y-0007CV-OF for qemu-devel@nongnu.org; Thu, 08 Sep 2022 21:50:25 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2022 18:50:18 -0700 Received: from dongwonk-z390-aorus-ultra-intel-gfx.fm.intel.com ([10.105.129.122]) by FMSMGA003.fm.intel.com with ESMTP; 08 Sep 2022 18:50:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662688222; x=1694224222; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xPOUvGxgKRY1bcefU/gta7OtaOqwY8TXGvT2VjOu85U=; b=AgOdQZzbF5QD+yPSX+9qCDTM/2WKhNa/jL0PIOi3EAIIm7zTbhklcHUD IlPsFRn5ctmbaoBmSNhgh5x4owrxCMNQSckM2m9WSo19yKxEznI4h8kZb zUtjOFCTXdaLzevSduoljRPC48BBbLbA7u1bljNCigOYTs43VP0MKvwVJ TKj2I9IGIH4bsiPZ2YG3RjQ4A1hkj3svUeaotgKpelV4gwjo+hnyY8Tet o+g3q76x1ZWRbBT0lx+8w/thyAnhnzvZZ9+cOCN9Q3wHDX42Mr+J1W1il EX2sDR3Y1oayGHiVyqq0fVc5kXpO2+UtDvSayc7Q202Ea2H7O/T/Axy1X w==; X-IronPort-AV: E=McAfee;i="6500,9779,10464"; a="298174537" X-IronPort-AV: E=Sophos;i="5.93,300,1654585200"; d="scan'208";a="298174537" X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,300,1654585200"; d="scan'208";a="704237924" From: Dongwon Kim To: qemu-devel@nongnu.org Cc: Dongwon Kim , Gerd Hoffmann Subject: [PATCH] virtio-gpu: update scanout if there is any area covered by the rect Date: Thu, 8 Sep 2022 18:40:52 -0700 Message-Id: <20220909014052.7297-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=134.134.136.24; envelope-from=dongwon.kim@intel.com; helo=mga09.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" X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1662688304833100001 Content-Type: text/plain; charset="utf-8" The scanout is currently updated only if the whole rect is inside the scanout space. This is not a correct condition because the scanout should be updated even a small area in the scanout space is covered by the rect. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim Reviewed-by: Marc-Andr=C3=A9 Lureau --- hw/display/virtio-gpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 20cc703dcc..5e15c79b94 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -515,9 +515,10 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g, for (i =3D 0; i < g->parent_obj.conf.max_outputs; i++) { scanout =3D &g->parent_obj.scanout[i]; if (scanout->resource_id =3D=3D res->resource_id && - rf.r.x >=3D scanout->x && rf.r.y >=3D scanout->y && - rf.r.x + rf.r.width <=3D scanout->x + scanout->width && - rf.r.y + rf.r.height <=3D scanout->y + scanout->height && + rf.r.x < scanout->x + scanout->width && + rf.r.x + rf.r.width >=3D scanout->x && + rf.r.y < scanout->y + scanout->height && + rf.r.y + rf.r.height >=3D scanout->y && console_has_gl(scanout->con)) { dpy_gl_update(scanout->con, 0, 0, scanout->width, scanout->height); --=20 2.20.1