From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuSH-0004wg-6K for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:05:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTuSF-0006Le-V7 for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:05:05 -0400 Received: from mail-ie0-f173.google.com ([209.85.223.173]:62691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuSF-00064D-Qg for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:05:03 -0400 Received: by mail-ie0-f173.google.com with SMTP id 17so3616429iea.4 for ; Thu, 01 Nov 2012 06:05:03 -0700 (PDT) Sender: fluxion From: Michael Roth Date: Thu, 1 Nov 2012 08:04:12 -0500 Message-Id: <1351775071-7644-11-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1351775071-7644-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1351775071-7644-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 10/29] vga: qidl_declare VGACommonState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, blauwirbel@gmail.com, pbonzini@redhat.com Signed-off-by: Michael Roth --- hw/vga_int.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/vga_int.h b/hw/vga_int.h index 22f1706..074e5d5 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -25,6 +25,7 @@ #include #include "error.h" #include "memory.h" +#include "qidl.h" #define ST01_V_RETRACE 0x08 #define ST01_DISP_ENABLE 0x01 @@ -84,9 +85,11 @@ struct VGACommonState; typedef uint8_t (* vga_retrace_fn)(struct VGACommonState *s); typedef void (* vga_update_retrace_info_fn)(struct VGACommonState *s); -typedef struct VGACommonState { +typedef struct VGACommonState VGACommonState; + +QIDL_DECLARE(VGACommonState) { MemoryRegion *legacy_address_space; - uint8_t *vram_ptr; + uint8_t q_immutable *vram_ptr; MemoryRegion vram; MemoryRegion vram_vbe; uint32_t vram_size; @@ -130,7 +133,7 @@ typedef struct VGACommonState { uint32_t vbe_bank_mask; int vbe_mapped; /* display refresh support */ - DisplayState *ds; + DisplayState q_immutable *ds; uint32_t font_offsets[2]; int graphic_mode; uint8_t shift_control; @@ -150,10 +153,10 @@ typedef struct VGACommonState { uint32_t cursor_offset; unsigned int (*rgb_to_pixel)(unsigned int r, unsigned int g, unsigned b); - vga_hw_update_ptr update; - vga_hw_invalidate_ptr invalidate; - vga_hw_screen_dump_ptr screen_dump; - vga_hw_text_update_ptr text_update; + vga_hw_update_ptr q_immutable update; + vga_hw_invalidate_ptr q_immutable invalidate; + vga_hw_screen_dump_ptr q_immutable screen_dump; + vga_hw_text_update_ptr q_immutable text_update; /* hardware mouse cursor support */ uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; void (*cursor_invalidate)(struct VGACommonState *s); @@ -162,11 +165,11 @@ typedef struct VGACommonState { uint32_t last_palette[256]; uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */ /* retrace */ - vga_retrace_fn retrace; - vga_update_retrace_info_fn update_retrace_info; - union vga_retrace retrace_info; + vga_retrace_fn q_immutable retrace; + vga_update_retrace_info_fn q_immutable update_retrace_info; + union vga_retrace q_immutable retrace_info; uint8_t is_vbe_vmstate; -} VGACommonState; +}; static inline int c6_to_8(int v) { -- 1.7.9.5