From patchwork Sat Jun 1 11:41:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 248074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 525792C0174 for ; Sat, 1 Jun 2013 21:41:45 +1000 (EST) Received: from localhost ([::1]:50621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UikBn-0007fY-Ed for incoming@patchwork.ozlabs.org; Sat, 01 Jun 2013 07:41:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UikBX-0007fP-Sm for qemu-devel@nongnu.org; Sat, 01 Jun 2013 07:41:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UikBW-0008Kv-QI for qemu-devel@nongnu.org; Sat, 01 Jun 2013 07:41:23 -0400 Received: from katherinewilliamsonsoprano.co.uk ([82.165.34.74]:37010 helo=p15195424.pureserver.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UikBW-0008KW-Hg for qemu-devel@nongnu.org; Sat, 01 Jun 2013 07:41:22 -0400 Received: from 93-96-138-231.zone4.bethere.co.uk ([93.96.138.231] helo=kentang.lan) by p15195424.pureserver.info with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.43) id 1UikBJ-0002LN-65; Sat, 01 Jun 2013 12:41:16 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org Date: Sat, 1 Jun 2013 12:41:01 +0100 Message-Id: <1370086861-12499-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 X-SA-Exim-Connect-IP: 93.96.138.231 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.1 (built Wed, 05 Jan 2005 10:54:05 -0500) X-SA-Exim-Scanned: Yes (on p15195424.pureserver.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 82.165.34.74 Cc: Mark Cave-Ayland Subject: [Qemu-devel] [PATCH] tcx: Fix 24-bit display mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit d08151bf (conversion of tcx to the memory API) broke the 24-bit mode of the tcx display adapter by accidentally passing in the final address of the dirty region to memory_region_reset_dirty() instead of its size. Signed-off-by: Mark Cave-Ayland --- hw/display/tcx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/display/tcx.c b/hw/display/tcx.c index fc27f45..2d2123c 100644 --- a/hw/display/tcx.c +++ b/hw/display/tcx.c @@ -193,15 +193,15 @@ static inline void reset_dirty(TCXState *ts, ram_addr_t page_min, ram_addr_t cpage) { memory_region_reset_dirty(&ts->vram_mem, - page_min, page_max + TARGET_PAGE_SIZE, + page_min, (page_max - page_min) + TARGET_PAGE_SIZE, DIRTY_MEMORY_VGA); memory_region_reset_dirty(&ts->vram_mem, page24 + page_min * 4, - page24 + page_max * 4 + TARGET_PAGE_SIZE, + (page_max - page_min) * 4 + TARGET_PAGE_SIZE, DIRTY_MEMORY_VGA); memory_region_reset_dirty(&ts->vram_mem, cpage + page_min * 4, - cpage + page_max * 4 + TARGET_PAGE_SIZE, + (page_max - page_min) * 4 + TARGET_PAGE_SIZE, DIRTY_MEMORY_VGA); } @@ -285,7 +285,7 @@ static void tcx_update_display(void *opaque) /* reset modified pages */ if (page_max >= page_min) { memory_region_reset_dirty(&ts->vram_mem, - page_min, page_max + TARGET_PAGE_SIZE, + page_min, (page_max - page_min) + TARGET_PAGE_SIZE, DIRTY_MEMORY_VGA); } }