~dannf/qemu-linaro/qemu-highbank-ppa

« back to all changes in this revision

Viewing changes to hw/qxl.h

  • Committer: Steve Langasek
  • Date: 2012-03-15 21:13:19 UTC
  • mfrom: (0.1.15)
  • Revision ID: steve.langasek@canonical.com-20120315211319-f1j3ot1ihx30b2s9
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    QXL_MODE_NATIVE,
17
17
};
18
18
 
 
19
#ifndef QXL_VRAM64_RANGE_INDEX
 
20
#define QXL_VRAM64_RANGE_INDEX 4
 
21
#endif
 
22
 
19
23
#define QXL_UNDEFINED_IO UINT32_MAX
20
24
 
 
25
#define QXL_NUM_DIRTY_RECTS 64
 
26
 
21
27
typedef struct PCIQXLDevice {
22
28
    PCIDevice          pci;
23
29
    SimpleSpiceDisplay ssd;
52
58
        uint32_t       abs_stride;
53
59
        uint32_t       bits_pp;
54
60
        uint32_t       bytes_pp;
55
 
        uint8_t        *data, *flipped;
 
61
        uint8_t        *data;
56
62
    } guest_primary;
57
63
 
58
64
    struct surfaces {
86
92
    /* vram pci bar */
87
93
    uint32_t           vram_size;
88
94
    MemoryRegion       vram_bar;
 
95
    uint32_t           vram32_size;
 
96
    MemoryRegion       vram32_bar;
89
97
 
90
98
    /* io bar */
91
99
    MemoryRegion       io_bar;
 
100
 
 
101
    /* user-friendly properties (in megabytes) */
 
102
    uint32_t          ram_size_mb;
 
103
    uint32_t          vram_size_mb;
 
104
    uint32_t          vram32_size_mb;
 
105
 
 
106
    /* qxl_render_update state */
 
107
    int                render_update_cookie_num;
 
108
    int                num_dirty_rects;
 
109
    QXLRect            dirty[QXL_NUM_DIRTY_RECTS];
 
110
    QEMUBH            *update_area_bh;
92
111
} PCIQXLDevice;
93
112
 
94
113
#define PANIC_ON(x) if ((x)) {                         \
104
123
        }                                                               \
105
124
    } while (0)
106
125
 
107
 
#if SPICE_INTERFACE_QXL_MINOR >= 1
108
126
#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V10
109
 
#else
110
 
#define QXL_DEFAULT_REVISION QXL_REVISION_STABLE_V06
111
 
#endif
112
127
 
113
128
/* qxl.c */
114
129
void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
118
133
                           struct QXLRect *area, struct QXLRect *dirty_rects,
119
134
                           uint32_t num_dirty_rects,
120
135
                           uint32_t clear_dirty_region,
121
 
                           qxl_async_io async);
 
136
                           qxl_async_io async, QXLCookie *cookie);
122
137
void qxl_spice_loadvm_commands(PCIQXLDevice *qxl, struct QXLCommandExt *ext,
123
138
                               uint32_t count);
124
139
void qxl_spice_oom(PCIQXLDevice *qxl);
134
149
void qxl_render_resize(PCIQXLDevice *qxl);
135
150
void qxl_render_update(PCIQXLDevice *qxl);
136
151
void qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext);
137
 
#if SPICE_INTERFACE_QXL_MINOR >= 1
138
 
void qxl_spice_update_area_async(PCIQXLDevice *qxl, uint32_t surface_id,
139
 
                                 struct QXLRect *area,
140
 
                                 uint32_t clear_dirty_region,
141
 
                                 int is_vga);
142
 
#endif
 
152
void qxl_render_update_area_done(PCIQXLDevice *qxl, QXLCookie *cookie);
 
153
void qxl_render_update_area_bh(void *opaque);