From nobody Mon Feb 9 20:34:27 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664188719; cv=none; d=zohomail.com; s=zohoarc; b=ODAgB09vCLJWxvs5Bxu0rEVplAFKLNdpa0AVQtYIQJC55UhjcrAsTOBzXEk/nXbIIoEqf83nwcMQD3+fjZRx8l4AhdfOw9LdArLQWs0mG2DtgC/3mYoS2oDfGs4Q9Yr2I7fU2wEbItUs+UmvfCytVZ5MMpY10quIkVHtgVvd9AM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664188719; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Wap4bE3M153XlNUESFRpL6QFaSZ1Y/NXM6sOa6Kq+is=; b=ap1APT0cUB4szFZc2k0J7eRRYL0wCdtpo3BHo3Yn4UaBoXZMndWBrBGDEk8QhPczBhah+M5Cv1n/+E3d6VMj4cS8MXAVTviAKlQQIC8fiPkgceBUBihvk+84X8HIhCvJTighEzyc4cTUF+yAYCbrpu5tpSjVloLa2AbJHMXmDpg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1664188719289380.715002030174; Mon, 26 Sep 2022 03:38:39 -0700 (PDT) Received: from localhost ([::1]:37852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oclVV-0001Qh-1P for importer@patchew.org; Mon, 26 Sep 2022 06:38:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ockq0-0005oR-2A for qemu-devel@nongnu.org; Mon, 26 Sep 2022 05:55:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:34478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ockpv-0003pO-BX for qemu-devel@nongnu.org; Mon, 26 Sep 2022 05:55:43 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-669-e1sCCUMRMBae7bM_-G8l9g-1; Mon, 26 Sep 2022 05:55:34 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE2F3101CC62; Mon, 26 Sep 2022 09:55:33 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F63A2084836; Mon, 26 Sep 2022 09:55:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 760C8180A408; Mon, 26 Sep 2022 11:55:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664186138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wap4bE3M153XlNUESFRpL6QFaSZ1Y/NXM6sOa6Kq+is=; b=CSj1H82LVn5KSUDQLbH23QpvR5FHkMHOYI4nW1uu6/DWO8Mimi95Oh2EScRCORPWdmTwdd aKCBO937Gzp6mSqRS65k3At+Hw5cVIaBUMWQCeU/5IpEW0bfezrGSrmE4/P7Uk16nik1bl wbJDQPO/PEGMa311phRKPiy2Q4Qa5O8= X-MC-Unique: e1sCCUMRMBae7bM_-G8l9g-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: Eric Blake , Markus Armbruster , Gerd Hoffmann , Bandan Das , Alexander Bulekov , Laurent Vivier , Darren Kenny , Qiuhao Li , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Akihiko Odaki , "Michael S. Tsirkin" , Alexandre Ratchov , Peter Maydell , Stefan Hajnoczi , Thomas Huth , Dongwon Kim , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 25/25] virtio-gpu: update scanout if there is any area covered by the rect Date: Mon, 26 Sep 2022 11:55:09 +0200 Message-Id: <20220926095509.3759409-26-kraxel@redhat.com> In-Reply-To: <20220926095509.3759409-1-kraxel@redhat.com> References: <20220926095509.3759409-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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=170.10.129.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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 @redhat.com) X-ZM-MESSAGEID: 1664188721134100001 From: Dongwon Kim 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 Message-Id: <20220909014052.7297-1-dongwon.kim@intel.com> Signed-off-by: Gerd Hoffmann --- 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 20cc703dcc6e..5e15c79b94a5 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.37.3