From nobody Mon Feb 9 17:24:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518525083299972.793714824556; Tue, 13 Feb 2018 04:31:23 -0800 (PST) Received: from localhost ([::1]:50687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elZk2-0002bL-DW for importer@patchew.org; Tue, 13 Feb 2018 07:31:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elZI2-0004fj-CP for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elZHy-0007sm-FT for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:26 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:54778) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1elZHy-0007sT-92 for qemu-devel@nongnu.org; Tue, 13 Feb 2018 07:02:22 -0500 Received: by mail-wm0-x242.google.com with SMTP id i186so15521978wmi.4 for ; Tue, 13 Feb 2018 04:02:22 -0800 (PST) Received: from 640k.lan ([82.84.102.245]) by smtp.gmail.com with ESMTPSA id f9sm6870298wmf.12.2018.02.13.04.02.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 04:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0jPdbDvubmguZHkn8IqlSSfNMiX63piDWRDoFwHnvGw=; b=sQeniHlD9RSPlxtdI8hhSIsvNKfIHr0BMYDdozAkupLjYrW86lHOSd7LkEbnoLmUXQ 8vZB4TGy6GfnKC4Is9JiXJHqm84KcoooXR5pjh1B1m4r1AmuoseAdhWyVR/8vRyjdkLm wdFylWn17pUuRFmUP0BdAVibRCIAOvvFkUFM9I+JlnQmqwfdSSlTQFw1PTUvSDfkLkvT GRlYrnneKpEzvPyc8M+qf8N+WRg3elM/qqUpLQ/3c+J6LgWpapPtpiYlgVxhwzN0mf+M LbvEjA5MNIqm6xYjfJbTT9scBl69ctxD4aMXqER/WyQiSBy1ZM2ShEZLyBooSCgIczz7 9+mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=0jPdbDvubmguZHkn8IqlSSfNMiX63piDWRDoFwHnvGw=; b=NH1ogXditq4OwP1ZEdaXKO6GA+cg+2QiixIAr4+OtsUs7XIUjQ9Y72Vc8331icdv/9 uAxQGAf6rTn7h0rwP0/oR2xK0RG/VRLWkvJBvrkWfMzxAbQgaSCvoGFvf3U2YoGW4gFh bH8Ek1LWp/GiinFnzJquIh12VrgTgEM7S66UuAJREOlxk37kv1a5tqB7qgCHu9b0sNZZ IkVCpb64qc72UueVp42NKg3AnsZM2AMt3DC7DkvRzhmOKvieoXMAwdNaND2qEUSEWBfI f1GHaEZjpGJhrzsBKI+ZbBiaioBWG+YBoWeyZl8MVJgQZxqYCHZZ1fmKMCRFpizaS3Le zUVA== X-Gm-Message-State: APf1xPAKCNhNisV3cMS+qEaRjjjmQjuIktG0ABsVT76yWx7s0+uBuQsQ oTUXr10aNL3EL0W2RKBude6jXZHb X-Google-Smtp-Source: AH8x225ByMuPVOFBzUbvYOyUgorN0Dxlyp4kzFtNLv6dhmH11iK4Dt/KRCZHJASSq0iD/w59oRqwkw== X-Received: by 10.28.30.130 with SMTP id e124mr1156114wme.153.1518523340891; Tue, 13 Feb 2018 04:02:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 13 Feb 2018 13:00:48 +0100 Message-Id: <1518523252-49106-45-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1518523252-49106-1-git-send-email-pbonzini@redhat.com> References: <1518523252-49106-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PULL 44/48] g364fb: switch to using DirtyBitmapSnapshot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 This removes the last user of memory_region_test_and_clear_dirty outside memory.c. Tested-by: Herv=C3=A9 Poussineau Signed-off-by: Paolo Bonzini --- hw/display/g364fb.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c index 86557d1..86452de 100644 --- a/hw/display/g364fb.c +++ b/hw/display/g364fb.c @@ -62,15 +62,15 @@ typedef struct G364State { =20 #define G364_PAGE_SIZE 4096 =20 -static inline int check_dirty(G364State *s, ram_addr_t page) +static inline int check_dirty(G364State *s, DirtyBitmapSnapshot *snap, ram= _addr_t page) { - return memory_region_test_and_clear_dirty(&s->mem_vram, page, G364_PAG= E_SIZE, - DIRTY_MEMORY_VGA); + return memory_region_snapshot_get_dirty(&s->mem_vram, snap, page, G364= _PAGE_SIZE); } =20 static void g364fb_draw_graphic8(G364State *s) { DisplaySurface *surface =3D qemu_console_surface(s->con); + DirtyBitmapSnapshot *snap; int i, w; uint8_t *vram; uint8_t *data_display, *dd; @@ -122,8 +122,10 @@ static void g364fb_draw_graphic8(G364State *s) vram =3D s->vram + s->top_of_screen; /* XXX: out of range in vram? */ data_display =3D dd =3D surface_data(surface); + snap =3D memory_region_snapshot_and_clear_dirty(&s->mem_vram, 0, s->vr= am_size, + DIRTY_MEMORY_VGA); while (y < s->height) { - if (check_dirty(s, page)) { + if (check_dirty(s, snap, page)) { if (y < ymin) ymin =3D ymax =3D y; if (x < xmin) --=20 1.8.3.1