From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 13/26] Everything outside of vga.c should use VGACommonState
Date: Mon, 24 Aug 2009 18:42:47 +0200 [thread overview]
Message-ID: <174b3d6d69e24e4735b851d566cbf8cbb4cdae0b.1251131364.git.quintela@redhat.com> (raw)
In-Reply-To: <cover.1251131364.git.quintela@redhat.com>
In-Reply-To: <cover.1251131364.git.quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
hw/cirrus_vga.c | 10 +++++-----
hw/vga.c | 4 +++-
hw/vga_int.h | 10 ++++------
hw/vmware_vga.c | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 8ac30be..bc635e9 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -1078,7 +1078,7 @@ static void cirrus_write_bitblt(CirrusVGAState * s, unsigned reg_value)
*
***************************************/
-static void cirrus_get_offsets(VGAState *s1,
+static void cirrus_get_offsets(VGACommonState *s1,
uint32_t *pline_offset,
uint32_t *pstart_addr,
uint32_t *pline_compare)
@@ -1126,7 +1126,7 @@ static uint32_t cirrus_get_bpp16_depth(CirrusVGAState * s)
return ret;
}
-static int cirrus_get_bpp(VGAState *s1)
+static int cirrus_get_bpp(VGACommonState *s1)
{
CirrusVGAState * s = container_of(s1, CirrusVGAState, vga);
uint32_t ret = 8;
@@ -1164,7 +1164,7 @@ static int cirrus_get_bpp(VGAState *s1)
return ret;
}
-static void cirrus_get_resolution(VGAState *s, int *pwidth, int *pheight)
+static void cirrus_get_resolution(VGACommonState *s, int *pwidth, int *pheight)
{
int width, height;
@@ -2234,7 +2234,7 @@ static inline void cirrus_cursor_compute_yrange(CirrusVGAState *s)
/* NOTE: we do not currently handle the cursor bitmap change, so we
update the cursor only if it moves. */
-static void cirrus_cursor_invalidate(VGAState *s1)
+static void cirrus_cursor_invalidate(VGACommonState *s1)
{
CirrusVGAState *s = container_of(s1, CirrusVGAState, vga);
int size;
@@ -2263,7 +2263,7 @@ static void cirrus_cursor_invalidate(VGAState *s1)
}
}
-static void cirrus_cursor_draw_line(VGAState *s1, uint8_t *d1, int scr_y)
+static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
{
CirrusVGAState *s = container_of(s1, CirrusVGAState, vga);
int w, h, bpp, x1, x2, poffset;
diff --git a/hw/vga.c b/hw/vga.c
index 35350f1..99d045f 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -149,6 +149,8 @@ static uint32_t expand4[256];
static uint16_t expand2[256];
static uint8_t expand4to8[16];
+typedef VGACommonState VGAState;
+
static void vga_screen_dump(void *opaque, const char *filename);
static char *screen_dump_filename;
static DisplayChangeListener *screen_dump_dcl;
@@ -2256,7 +2258,7 @@ static void vga_map(PCIDevice *pci_dev, int region_num,
}
}
-void vga_common_init(VGAState *s, int vga_ram_size)
+void vga_common_init(VGACommonState *s, int vga_ram_size)
{
int i, j, v, b;
diff --git a/hw/vga_int.h b/hw/vga_int.h
index bb28872..eb837ff 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -180,8 +180,6 @@ typedef struct VGACommonState {
union vga_retrace retrace_info;
} VGACommonState;
-typedef VGACommonState VGAState;
-
static inline int c6_to_8(int v)
{
int b;
@@ -190,15 +188,15 @@ static inline int c6_to_8(int v)
return (v << 2) | (b << 1) | b;
}
-void vga_common_init(VGAState *s, int vga_ram_size);
-void vga_init(VGAState *s);
+void vga_common_init(VGACommonState *s, int vga_ram_size);
+void vga_init(VGACommonState *s);
void vga_common_reset(VGACommonState *s);
-void vga_dirty_log_start(VGAState *s);
+void vga_dirty_log_start(VGACommonState *s);
uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val);
-void vga_invalidate_scanlines(VGAState *s, int y1, int y2);
+void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2);
int ppm_save(const char *filename, struct DisplaySurface *ds);
void vga_draw_cursor_line_8(uint8_t *d1, const uint8_t *src1,
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 5ceebf1..0d8a72f 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -1129,8 +1129,8 @@ static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
vmsvga_reset(s);
#ifdef EMBED_STDVGA
- vga_common_init((VGAState *) s, vga_ram_size);
- vga_init((VGAState *) s);
+ vga_common_init(&s->vga, vga_ram_size);
+ vga_init(&s->vga);
#else
s->vram_size = vga_ram_size;
s->vram_offset = qemu_ram_alloc(vga_ram_size);
--
1.6.2.5
next prev parent reply other threads:[~2009-08-24 16:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 16:42 [Qemu-devel] [PATCH 00/26] Indirection Cleanup Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 01/26] eepro100: convert casts to DO_UPCAST() Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 02/26] eepro100: cast a void * makes no sense Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 03/26] eepro100: Remove unused indirection of PCIDevice Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 04/26] pci: remove casts from void * Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 05/26] rtl8139: Remove unneeded double indirection of PCIRTL8139State Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 06/26] rtl8139: remove pointless cast from void * Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 07/26] lsi53c895a: " Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 08/26] lsi53c895a: use DO_UPCAST to cast from PCIDevice Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 09/26] lsi53c895a: rename PCIDevice field from pci_dev to dev (consistence) Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 10/26] lsi53c895a: LSIState is a DeviceHost Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 11/26] Introduce vga_common_reset() to be able to typcheck vga_reset() Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 12/26] vga: Rename vga_state -> vga Juan Quintela
2009-08-24 16:42 ` Juan Quintela [this message]
2009-08-24 16:42 ` [Qemu-devel] [PATCH 14/26] usb-ohci: Change casts to DO_UPCAST() for OHCIPCIState Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 15/26] ne2000: remove casts from void * Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 16/26] ne2000: pci_dev has this very value with the right type Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 17/26] ne2000: Change casts to DO_UPCAST() for PCINE2000State Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 18/26] We need PCINE2000State for save/load functions Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 19/26] Add pci_ne2000_{save/load} functions, then remove pci_dev NE2000State field Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 20/26] cirrus_vga: remove pointless cast from void * Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 21/26] cirrus_vga: Change casts to DO_UPCAST() for PCICirrusVGAState Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 22/26] Add pci_cirrus_vga_{save/load} functions, then remove vga.pci_dev use Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 23/26] pcnet: Change casts to DO_UPCAST() for PCIPCNetState Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 24/26] pcnet: remove useless casts This are casts to the very type of the function Juan Quintela
2009-08-24 16:42 ` [Qemu-devel] [PATCH 25/26] pcnet: Add pci_pcnet_{save/load} functions, then remove PCNetState pci_dev field Juan Quintela
2009-08-24 16:43 ` [Qemu-devel] [PATCH 26/26] e1000 cleanup Juan Quintela
2009-08-25 8:22 ` [Qemu-devel] [PATCH 00/26] Indirection Cleanup Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=174b3d6d69e24e4735b851d566cbf8cbb4cdae0b.1251131364.git.quintela@redhat.com \
--to=quintela@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).