From patchwork Sun Oct 16 16:51:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 120046 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DCF1EB6F70 for ; Mon, 17 Oct 2011 03:52:10 +1100 (EST) Received: from localhost ([::1]:54653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFTwW-00032g-06 for incoming@patchwork.ozlabs.org; Sun, 16 Oct 2011 12:52:08 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFTwO-000311-L8 for qemu-devel@nongnu.org; Sun, 16 Oct 2011 12:52:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFTwN-0004ez-0X for qemu-devel@nongnu.org; Sun, 16 Oct 2011 12:52:00 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:64739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFTwM-0004ev-OB for qemu-devel@nongnu.org; Sun, 16 Oct 2011 12:51:58 -0400 Received: by ywp17 with SMTP id 17so385854ywp.4 for ; Sun, 16 Oct 2011 09:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=oNHW8iNKnG+PA08jxMKWESM2OmxZBMmm/UV9pBYX+no=; b=xp+v7Jztd6EdgwKLlgLPKItnpi0U6cDWULZLyS9fK8K+YlhT0NNIjmAcLZfYQlS1Bm VBJx1Zayy4nXAReU/np06bEQEQ/L2tf58wHypNqYcWHra+3dF/qVgPsyNw/ooSw6nhFV 3ML4xte2Xb2reUFePCnwFezKWXyiq0w56OCbQ= Received: by 10.182.73.67 with SMTP id j3mr8830435obv.46.1318783918244; Sun, 16 Oct 2011 09:51:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.121.8 with HTTP; Sun, 16 Oct 2011 09:51:38 -0700 (PDT) From: Blue Swirl Date: Sun, 16 Oct 2011 16:51:38 +0000 Message-ID: To: Avi Kivity , qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.45 Subject: [Qemu-devel] [PATCH v2 4/4] vga: compile cirrus_vga in hwlib 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 Remove target dependencies and compile Cirrus VGA in hwlib. Signed-off-by: Blue Swirl --- Makefile.objs | 1 + Makefile.target | 1 - hw/cirrus_vga.c | 7 +++++-- 3 files changed, 6 insertions(+), 3 deletions(-) } @@ -1897,7 +1900,7 @@ static void cirrus_mmio_blt_write(CirrusVGAState * s, unsigned address, * * write mode 4/5 * - * assume TARGET_PAGE_SIZE >= 16 + * assume CIRRUS_PAGE_SIZE >= 16 * ***************************************/ From 11c65de30f7882b9acbaf2f47f181ed7f6344a2b Mon Sep 17 00:00:00 2001 Message-Id: <11c65de30f7882b9acbaf2f47f181ed7f6344a2b.1318783737.git.blauwirbel@gmail.com> In-Reply-To: References: From: Blue Swirl Date: Sun, 9 Oct 2011 09:58:00 +0000 Subject: [PATCH 4/4] vga: compile cirrus_vga in hwlib Remove target dependencies and compile Cirrus VGA in hwlib. Signed-off-by: Blue Swirl --- Makefile.objs | 1 + Makefile.target | 1 - hw/cirrus_vga.c | 7 +++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 44d9bb9..e98d74e 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -286,6 +286,7 @@ hw-obj-$(CONFIG_VGA_ISA) += vga-isa.o hw-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o hw-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o hw-obj-$(CONFIG_VMMOUSE) += vmmouse.o +hw-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o hw-obj-$(CONFIG_RC4030) += rc4030.o hw-obj-$(CONFIG_DP8393X) += dp8393x.o diff --git a/Makefile.target b/Makefile.target index b948acf..2401951 100644 --- a/Makefile.target +++ b/Makefile.target @@ -195,7 +195,6 @@ obj-$(CONFIG_KVM) += kvm.o kvm-all.o obj-$(CONFIG_NO_KVM) += kvm-stub.o obj-y += memory.o obj-$(CONFIG_VGA) += vga.o -obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o LIBS+=-lz QEMU_CFLAGS += $(VNC_TLS_CFLAGS) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index 846c8f5..709d89a 100644 --- a/hw/cirrus_vga.c +++ b/hw/cirrus_vga.c @@ -173,6 +173,9 @@ #define CIRRUS_PNPMMIO_SIZE 0x1000 +#define CIRRUS_PAGE_SIZE 4096 +#define CIRRUS_PAGE_MASK (CIRRUS_PAGE_SIZE - 1) + #define BLTUNSAFE(s) \ ( \ ( /* check dst is within bounds */ \ @@ -618,7 +621,7 @@ static void cirrus_invalidate_region(CirrusVGAState * s, int off_begin, for (y = 0; y < lines; y++) { off_cur = off_begin; off_cur_end = (off_cur + bytesperline) & s->cirrus_addr_mask; - off_cur &= TARGET_PAGE_MASK; + off_cur &= CIRRUS_PAGE_MASK; memory_region_set_dirty(&s->vga.vram, off_cur, off_cur_end - off_cur); off_begin += off_pitch; } @@ -1897,7 +1900,7 @@ static void cirrus_mmio_blt_write(CirrusVGAState * s, unsigned address, * * write mode 4/5 * - * assume TARGET_PAGE_SIZE >= 16 + * assume CIRRUS_PAGE_SIZE >= 16 * ***************************************/ -- 1.7.2.5