Patchwork [11/29] cirrus: qidl_declare PCICirrusVGAState + CirrusVGAState

login
register
mail settings
Submitter Michael Roth
Date Nov. 1, 2012, 1:04 p.m.
Message ID <1351775071-7644-12-git-send-email-mdroth@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/196250/
State New
Headers show

Comments

Michael Roth - Nov. 1, 2012, 1:04 p.m.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/cirrus_vga.c |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

Patch

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index e4af2e9..f9c8b46 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -31,6 +31,7 @@ 
 #include "console.h"
 #include "vga_int.h"
 #include "loader.h"
+#include "qidl.h"
 
 /*
  * TODO:
@@ -196,7 +197,9 @@  typedef void (*cirrus_bitblt_rop_t) (struct CirrusVGAState *s,
 typedef void (*cirrus_fill_t)(struct CirrusVGAState *s,
                               uint8_t *dst, int dst_pitch, int width, int height);
 
-typedef struct CirrusVGAState {
+typedef struct CirrusVGAState CirrusVGAState;
+
+QIDL_DECLARE(CirrusVGAState) {
     VGACommonState vga;
 
     MemoryRegion cirrus_linear_io;
@@ -229,11 +232,11 @@  typedef struct CirrusVGAState {
     uint32_t cirrus_blt_srcaddr;
     uint8_t cirrus_blt_mode;
     uint8_t cirrus_blt_modeext;
-    cirrus_bitblt_rop_t cirrus_rop;
+    cirrus_bitblt_rop_t q_immutable cirrus_rop;
 #define CIRRUS_BLTBUFSIZE (2048 * 4) /* one line width */
     uint8_t cirrus_bltbuf[CIRRUS_BLTBUFSIZE];
-    uint8_t *cirrus_srcptr;
-    uint8_t *cirrus_srcptr_end;
+    uint8_t q_derived *cirrus_srcptr;
+    uint8_t q_derived *cirrus_srcptr_end;
     uint32_t cirrus_srccounter;
     /* hwcursor display state */
     int last_hw_cursor_size;
@@ -244,12 +247,14 @@  typedef struct CirrusVGAState {
     int real_vram_size; /* XXX: suppress that */
     int device_id;
     int bustype;
-} CirrusVGAState;
+};
 
-typedef struct PCICirrusVGAState {
+typedef struct PCICirrusVGAState PCICirrusVGAState;
+
+QIDL_DECLARE(PCICirrusVGAState) {
     PCIDevice dev;
     CirrusVGAState cirrus_vga;
-} PCICirrusVGAState;
+};
 
 typedef struct ISACirrusVGAState {
     ISADevice dev;