From nobody Tue Feb 10 13:34:07 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.zoho.com; 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; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1491381604141912.1960058790796; Wed, 5 Apr 2017 01:40:04 -0700 (PDT) Received: from localhost ([::1]:39328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvgTy-0005eb-GB for importer@patchew.org; Wed, 05 Apr 2017 04:40:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvgQ9-0002Ka-Ap for qemu-devel@nongnu.org; Wed, 05 Apr 2017 04:36:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvgQ8-0005aY-FJ for qemu-devel@nongnu.org; Wed, 05 Apr 2017 04:36:05 -0400 Received: from chuckie.co.uk ([82.165.15.123]:42835 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cvgQ8-0005a0-8v for qemu-devel@nongnu.org; Wed, 05 Apr 2017 04:36:04 -0400 Received: from host86-184-243-30.range86-184.btcentralplus.com ([86.184.243.30] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1cvgQ6-0001ob-6r; Wed, 05 Apr 2017 09:36:03 +0100 From: Mark Cave-Ayland To: kraxel@redhat.com, qemu-devel@nongnu.org Date: Wed, 5 Apr 2017 09:35:23 +0100 Message-Id: <1491381329-3995-9-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1491381329-3995-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1491381329-3995-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.184.243.30 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 08/14] tcx: alter tcx24_reset_dirty() to accept address and length parameters 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: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This can now be used by both the 8-bit and 24-bit display code, so rename to tcx_check_dirty(). Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index 171236a..e9056e0 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -123,22 +123,16 @@ static int tcx_check_dirty(TCXState *s, ram_addr_t ad= dr, int len) return ret; } =20 -static inline void tcx24_reset_dirty(TCXState *ts, ram_addr_t page_min, - ram_addr_t page_max, ram_addr_t page24, - ram_addr_t cpage) +static void tcx_reset_dirty(TCXState *s, ram_addr_t addr, int len) { - memory_region_reset_dirty(&ts->vram_mem, - page_min, - (page_max - page_min) + TARGET_PAGE_SIZE, - DIRTY_MEMORY_VGA); - memory_region_reset_dirty(&ts->vram_mem, - page24 + page_min * 4, - (page_max - page_min) * 4 + TARGET_PAGE_SIZE, - DIRTY_MEMORY_VGA); - memory_region_reset_dirty(&ts->vram_mem, - cpage + page_min * 4, - (page_max - page_min) * 4 + TARGET_PAGE_SIZE, - DIRTY_MEMORY_VGA); + memory_region_reset_dirty(&s->vram_mem, addr, len, DIRTY_MEMORY_VGA); + + if (s->depth =3D=3D 24) { + memory_region_reset_dirty(&s->vram_mem, s->vram24_offset + addr * = 4, + len * 4, DIRTY_MEMORY_VGA); + memory_region_reset_dirty(&s->vram_mem, s->cplane_offset + addr * = 4, + len * 4, DIRTY_MEMORY_VGA); + } } =20 static void update_palette_entries(TCXState *s, int start, int end) @@ -428,10 +422,7 @@ static void tcx_update_display(void *opaque) } /* reset modified pages */ if (page_max >=3D page_min) { - memory_region_reset_dirty(&ts->vram_mem, - page_min, - (page_max - page_min) + TARGET_PAGE_SIZE, - DIRTY_MEMORY_VGA); + tcx_reset_dirty(ts, page_min, page_max - page_min); } } =20 @@ -528,7 +519,7 @@ static void tcx24_update_display(void *opaque) } /* reset modified pages */ if (page_max >=3D page_min) { - tcx24_reset_dirty(ts, page_min, page_max, page24, cpage); + tcx_reset_dirty(ts, page_min, page_max - page_min); } } =20 --=20 1.7.10.4