From patchwork Sun Sep 4 20:54:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 113298 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 86C16B6F76 for ; Mon, 5 Sep 2011 06:54:33 +1000 (EST) Received: from localhost ([::1]:34727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0Ji1-0003Uc-8M for incoming@patchwork.ozlabs.org; Sun, 04 Sep 2011 16:54:29 -0400 Received: from eggs.gnu.org ([140.186.70.92]:46331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0Jhu-0003UV-Rs for qemu-devel@nongnu.org; Sun, 04 Sep 2011 16:54:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0Jht-0005Ez-0X for qemu-devel@nongnu.org; Sun, 04 Sep 2011 16:54:22 -0400 Received: from mail-qw0-f43.google.com ([209.85.216.43]:65119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0Jhs-0005Et-Ra for qemu-devel@nongnu.org; Sun, 04 Sep 2011 16:54:20 -0400 Received: by qwm42 with SMTP id 42so3275991qwm.30 for ; Sun, 04 Sep 2011 13:54:20 -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=H3AxB1TSO4U/IA3JgQbhPgdH8tnoT06erRMOz0IQGh0=; b=Vr6PrQWhAPDqKPLhX0X7ZFQPRslzemHU6gR6DYCJ41LUqCsAL1UyfKO13nHj2/l1ps NFhRcLsBIpgyL7Grsu/RIFhG5H/f2/1/TuZ97bfs8nFAQxQ5MXCR5XfU5kb3bjhJHZzV ukoHOiPe5jg84t1n3ZXpsKoBztmytKf9Rn9DA= Received: by 10.224.198.133 with SMTP id eo5mr2341961qab.375.1315169660139; Sun, 04 Sep 2011 13:54:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.46.3 with HTTP; Sun, 4 Sep 2011 13:54:00 -0700 (PDT) From: Blue Swirl Date: Sun, 4 Sep 2011 20:54:00 +0000 Message-ID: To: qemu-devel , =?UTF-8?Q?Herv=C3=A9_Poussineau?= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.43 Subject: [Qemu-devel] [PATCH] g364fb: compile 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 Compile g364fb in hwlib. Two compilations less for the full build. Signed-off-by: Blue Swirl Acked-by: Hervé Poussineau --- Makefile.objs | 1 + Makefile.target | 2 +- default-configs/mips-softmmu.mak | 1 + default-configs/mips64-softmmu.mak | 1 + default-configs/mips64el-softmmu.mak | 1 + default-configs/mipsel-softmmu.mak | 1 + hw/g364fb.c | 16 +++++++++------- 7 files changed, 15 insertions(+), 8 deletions(-) From 5ac1a9e14bf0d269ed7aedafd16ce1b89ab6fcbf Mon Sep 17 00:00:00 2001 Message-Id: <5ac1a9e14bf0d269ed7aedafd16ce1b89ab6fcbf.1315169580.git.blauwirbel@gmail.com> From: Blue Swirl Date: Sun, 4 Sep 2011 20:51:28 +0000 Subject: [PATCH] g364fb: compile in hwlib Compile g364fb in hwlib. Two compilations less for the full build. Signed-off-by: Blue Swirl --- Makefile.objs | 1 + Makefile.target | 2 +- default-configs/mips-softmmu.mak | 1 + default-configs/mips64-softmmu.mak | 1 + default-configs/mips64el-softmmu.mak | 1 + default-configs/mipsel-softmmu.mak | 1 + hw/g364fb.c | 16 +++++++++------- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 26b885b..9e8a4b9 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -240,6 +240,7 @@ hw-obj-$(CONFIG_PPCE500_PCI) += ppce500_pci.o # MIPS devices hw-obj-$(CONFIG_PIIX4) += piix4.o +hw-obj-$(CONFIG_G364FB) += g364fb.o # PCI watchdog devices hw-obj-$(CONFIG_PCI) += wdt_i6300esb.o diff --git a/Makefile.target b/Makefile.target index 0787758..9fc8a23 100644 --- a/Makefile.target +++ b/Makefile.target @@ -285,7 +285,7 @@ obj-lm32-y += framebuffer.o obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o obj-mips-y += mips_addr.o mips_timer.o mips_int.o obj-mips-y += vga.o i8259.o -obj-mips-y += g364fb.o jazz_led.o +obj-mips-y += jazz_led.o obj-mips-y += gt64xxx.o mc146818rtc.o obj-mips-y += cirrus_vga.o obj-mips-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o diff --git a/default-configs/mips-softmmu.mak b/default-configs/mips-softmmu.mak index f524971..45bdefb 100644 --- a/default-configs/mips-softmmu.mak +++ b/default-configs/mips-softmmu.mak @@ -26,3 +26,4 @@ CONFIG_DP8393X=y CONFIG_DS1225Y=y CONFIG_MIPSNET=y CONFIG_PFLASH_CFI01=y +CONFIG_G364FB=y diff --git a/default-configs/mips64-softmmu.mak b/default-configs/mips64-softmmu.mak index aeab6b2..d43e33c 100644 --- a/default-configs/mips64-softmmu.mak +++ b/default-configs/mips64-softmmu.mak @@ -26,3 +26,4 @@ CONFIG_DP8393X=y CONFIG_DS1225Y=y CONFIG_MIPSNET=y CONFIG_PFLASH_CFI01=y +CONFIG_G364FB=y diff --git a/default-configs/mips64el-softmmu.mak b/default-configs/mips64el-softmmu.mak index 8e6511c..f307e8d 100644 --- a/default-configs/mips64el-softmmu.mak +++ b/default-configs/mips64el-softmmu.mak @@ -28,3 +28,4 @@ CONFIG_DS1225Y=y CONFIG_MIPSNET=y CONFIG_PFLASH_CFI01=y CONFIG_FULONG=y +CONFIG_G364FB=y diff --git a/default-configs/mipsel-softmmu.mak b/default-configs/mipsel-softmmu.mak index a05ac25..1a66bc3 100644 --- a/default-configs/mipsel-softmmu.mak +++ b/default-configs/mipsel-softmmu.mak @@ -26,3 +26,4 @@ CONFIG_DP8393X=y CONFIG_DS1225Y=y CONFIG_MIPSNET=y CONFIG_PFLASH_CFI01=y +CONFIG_G364FB=y diff --git a/hw/g364fb.c b/hw/g364fb.c index 5e7bcfa..b43341f 100644 --- a/hw/g364fb.c +++ b/hw/g364fb.c @@ -58,6 +58,8 @@ typedef struct G364State { #define CTLA_FORCE_BLANK 0x00000400 #define CTLA_NO_CURSOR 0x00800000 +#define G364_PAGE_SIZE 4096 + static inline int check_dirty(G364State *s, ram_addr_t page) { return memory_region_get_dirty(&s->mem_vram, page, DIRTY_MEMORY_VGA); @@ -68,7 +70,7 @@ static inline void reset_dirty(G364State *s, { memory_region_reset_dirty(&s->mem_vram, page_min, - page_max + TARGET_PAGE_SIZE - page_min - 1, + page_max + G364_PAGE_SIZE - page_min - 1, DIRTY_MEMORY_VGA); } @@ -136,7 +138,7 @@ static void g364fb_draw_graphic8(G364State *s) page_max = page; if (x < xmin) xmin = x; - for (i = 0; i < TARGET_PAGE_SIZE; i++) { + for (i = 0; i < G364_PAGE_SIZE; i++) { uint8_t index; unsigned int color; if (unlikely((y >= ycursor && y < ycursor + 64) && @@ -200,15 +202,15 @@ static void g364fb_draw_graphic8(G364State *s) ymin = s->height; ymax = 0; } - x += TARGET_PAGE_SIZE; + x += G364_PAGE_SIZE; dy = x / s->width; x = x % s->width; y += dy; - vram += TARGET_PAGE_SIZE; + vram += G364_PAGE_SIZE; data_display += dy * ds_get_linesize(s->ds); dd = data_display + x * w; } - page += TARGET_PAGE_SIZE; + page += G364_PAGE_SIZE; } done: @@ -267,7 +269,7 @@ static inline void g364fb_invalidate_display(void *opaque) int i; s->blanked = 0; - for (i = 0; i < s->vram_size; i += TARGET_PAGE_SIZE) { + for (i = 0; i < s->vram_size; i += G364_PAGE_SIZE) { memory_region_set_dirty(&s->mem_vram, i); } } @@ -387,7 +389,7 @@ static void g364_invalidate_cursor_position(G364State *s) start = ymin * ds_get_linesize(s->ds); end = (ymax + 1) * ds_get_linesize(s->ds); - for (i = start; i < end; i += TARGET_PAGE_SIZE) { + for (i = start; i < end; i += G364_PAGE_SIZE) { memory_region_set_dirty(&s->mem_vram, i); } } -- 1.7.2.5