43 #define SVGA_MAX_WIDTH 2360 44 #define SVGA_MAX_HEIGHT 1770 45 #define SVGA_MAX_BITS_PER_PIXEL 32 46 #define SVGA_MAX_DEPTH 24 48 #define SVGA_FB_MAX_SIZE \ 49 ((((SVGA_MAX_WIDTH * SVGA_MAX_HEIGHT * SVGA_MAX_BITS_PER_PIXEL / 8) >> \ 54 #define SVGA_MAX_PSEUDOCOLOR_DEPTH 8 55 #define SVGA_MAX_PSEUDOCOLORS (1 << SVGA_MAX_PSEUDOCOLOR_DEPTH) 56 #define SVGA_NUM_PALETTE_REGS (3 * SVGA_MAX_PSEUDOCOLORS) 58 #define SVGA_MAGIC 0x900000UL 59 #define SVGA_MAKE_ID(ver) (SVGA_MAGIC << 8 | (ver)) 62 #define SVGA_VERSION_2 2 63 #define SVGA_ID_2 SVGA_MAKE_ID(SVGA_VERSION_2) 67 #define SVGA_VERSION_1 1 68 #define SVGA_ID_1 SVGA_MAKE_ID(SVGA_VERSION_1) 71 #define SVGA_VERSION_0 0 72 #define SVGA_ID_0 SVGA_MAKE_ID(SVGA_VERSION_0) 75 #define SVGA_ID_INVALID 0xFFFFFFFF 78 #define SVGA_OLD_PALETTE_BASE 17 81 #define SVGA_LEGACY_BASE_PORT 0x4560 82 #define SVGA_INDEX_PORT 0x0 83 #define SVGA_VALUE_PORT 0x1 84 #define SVGA_BIOS_PORT 0x2 85 #define SVGA_NUM_PORTS 0x3 88 #define SVGA_LEGACY_ACCEL_PORT 0x3 91 #define SVGA_CURSOR_ON_HIDE \ 93 #define SVGA_CURSOR_ON_SHOW \ 95 #define SVGA_CURSOR_ON_REMOVE_FROM_FB \ 98 #define SVGA_CURSOR_ON_RESTORE_TO_FB \ 111 SVGA_REG_MAX_WIDTH = 4,
112 SVGA_REG_MAX_HEIGHT = 5,
114 SVGA_REG_BITS_PER_PIXEL = 7,
115 SVGA_REG_PSEUDOCOLOR = 8,
116 SVGA_REG_RED_MASK = 9,
117 SVGA_REG_GREEN_MASK = 10,
118 SVGA_REG_BLUE_MASK = 11,
119 SVGA_REG_BYTES_PER_LINE = 12,
120 SVGA_REG_FB_START = 13,
121 SVGA_REG_FB_OFFSET = 14,
122 SVGA_REG_VRAM_SIZE = 15,
123 SVGA_REG_FB_SIZE = 16,
127 SVGA_REG_CAPABILITIES = 17,
128 SVGA_REG_MEM_START = 18,
129 SVGA_REG_MEM_SIZE = 19,
130 SVGA_REG_CONFIG_DONE = 20,
133 SVGA_REG_GUEST_ID = 23,
134 SVGA_REG_CURSOR_ID = 24,
135 SVGA_REG_CURSOR_X = 25,
136 SVGA_REG_CURSOR_Y = 26,
137 SVGA_REG_CURSOR_ON = 27,
138 SVGA_REG_HOST_BITS_PER_PIXEL = 28,
139 SVGA_REG_SCRATCH_SIZE = 29,
140 SVGA_REG_MEM_REGS = 30,
141 SVGA_REG_NUM_DISPLAYS = 31,
142 SVGA_REG_PITCHLOCK = 32,
145 SVGA_PALETTE_BASE = 1024,
147 SVGA_SCRATCH_BASE = SVGA_PALETTE_BASE + SVGA_NUM_PALETTE_REGS
158 #define SVGA_CAP_NONE 0x00000 159 #define SVGA_CAP_RECT_FILL 0x00001 160 #define SVGA_CAP_RECT_COPY 0x00002 161 #define SVGA_CAP_RECT_PAT_FILL 0x00004 162 #define SVGA_CAP_LEGACY_OFFSCREEN 0x00008 163 #define SVGA_CAP_RASTER_OP 0x00010 164 #define SVGA_CAP_CURSOR 0x00020 165 #define SVGA_CAP_CURSOR_BYPASS 0x00040 166 #define SVGA_CAP_CURSOR_BYPASS_2 0x00080 167 #define SVGA_CAP_8BIT_EMULATION 0x00100 168 #define SVGA_CAP_ALPHA_CURSOR 0x00200 169 #define SVGA_CAP_GLYPH 0x00400 170 #define SVGA_CAP_GLYPH_CLIPPING 0x00800 171 #define SVGA_CAP_OFFSCREEN_1 0x01000 172 #define SVGA_CAP_ALPHA_BLEND 0x02000 173 #define SVGA_CAP_3D 0x04000 174 #define SVGA_CAP_EXTENDED_FIFO 0x08000 175 #define SVGA_CAP_MULTIMON 0x10000 176 #define SVGA_CAP_PITCHLOCK 0x20000 182 #define SVGA_ROP_CLEAR 0x00 183 #define SVGA_ROP_AND 0x01 184 #define SVGA_ROP_AND_REVERSE 0x02 185 #define SVGA_ROP_COPY 0x03 186 #define SVGA_ROP_AND_INVERTED 0x04 187 #define SVGA_ROP_NOOP 0x05 188 #define SVGA_ROP_XOR 0x06 189 #define SVGA_ROP_OR 0x07 190 #define SVGA_ROP_NOR 0x08 191 #define SVGA_ROP_EQUIV 0x09 192 #define SVGA_ROP_INVERT 0x0a 193 #define SVGA_ROP_OR_REVERSE 0x0b 194 #define SVGA_ROP_COPY_INVERTED 0x0c 195 #define SVGA_ROP_OR_INVERTED 0x0d 196 #define SVGA_ROP_NAND 0x0e 197 #define SVGA_ROP_SET 0x0f 198 #define SVGA_ROP_UNSUPPORTED 0x10 200 #define SVGA_NUM_SUPPORTED_ROPS 16 201 #define SVGA_ROP_ALL (MASK(SVGA_NUM_SUPPORTED_ROPS)) 202 #define SVGA_IS_VALID_ROP(rop) (rop < SVGA_NUM_SUPPORTED_ROPS) 245 #define SVGA_BLENDOP_CLEAR 0 246 #define SVGA_BLENDOP_SRC 1 247 #define SVGA_BLENDOP_DST 2 248 #define SVGA_BLENDOP_OVER 3 249 #define SVGA_BLENDOP_OVER_REVERSE 4 250 #define SVGA_BLENDOP_IN 5 251 #define SVGA_BLENDOP_IN_REVERSE 6 252 #define SVGA_BLENDOP_OUT 7 253 #define SVGA_BLENDOP_OUT_REVERSE 8 254 #define SVGA_BLENDOP_ATOP 9 255 #define SVGA_BLENDOP_ATOP_REVERSE 10 256 #define SVGA_BLENDOP_XOR 11 257 #define SVGA_BLENDOP_ADD 12 258 #define SVGA_BLENDOP_SATURATE 13 260 #define SVGA_NUM_BLENDOPS 14 261 #define SVGA_IS_VALID_BLENDOP(op) (op >= 0 && op < SVGA_NUM_BLENDOPS) 263 #define SVGA_BLENDFLAG_CONSTANT_SOURCE_ALPHA 0x01 264 #define SVGA_BLENDFLAG_CONSTANT_DEST_ALPHA 0x02 265 #define SVGA_NUM_BLENDFLAGS 2 266 #define SVGA_BLENDFLAG_ALL (MASK(SVGA_NUM_BLENDFLAGS)) 267 #define SVGA_IS_VALID_BLENDFLAG(flag) ((flag & ~SVGA_BLENDFLAG_ALL) == 0) 288 SVGA_FIFO_CAPABILITIES = 4,
291 SVGA_FIFO_3D_HWVERSION,
310 #define SVGA_FIFO_CAP_NONE 0 311 #define SVGA_FIFO_CAP_FENCE (1 << 0) 312 #define SVGA_FIFO_CAP_ACCELFRONT (1 << 1) 313 #define SVGA_FIFO_CAP_PITCHLOCK (1 << 2) 321 #define SVGA_FIFO_FLAG_NONE 0 322 #define SVGA_FIFO_FLAG_ACCELFRONT (1 << 0) 328 #define SVGA_MAX_ID 499 335 #define SVGA_BITMAP_SIZE(w, h) ((((w) + 31) >> 5) * (h)) 336 #define SVGA_BITMAP_SCANLINE_SIZE(w) (((w) + 31) >> 5) 337 #define SVGA_PIXMAP_SIZE(w, h, bpp) (((((w) * (bpp)) + 31) >> 5) * (h)) 338 #define SVGA_PIXMAP_SCANLINE_SIZE(w, bpp) ((((w) * (bpp)) + 31) >> 5) 339 #define SVGA_GLYPH_SIZE(w, h) ((((((w) + 7) >> 3) * (h)) + 3) >> 2) 340 #define SVGA_GLYPH_SCANLINE_SIZE(w) (((w) + 7) >> 3) 345 #define SVGA_BITMAP_INCREMENT(w) ((((w) + 31) >> 5) * sizeof(uint32)) 346 #define SVGA_PIXMAP_INCREMENT(w, bpp) \ 347 (((((w) * (bpp)) + 31) >> 5) * sizeof(uint32)) 352 #define SVGA_COLOR_TRANSPARENT (~0) 358 #define SVGA_CMD_INVALID_CMD 0 362 #define SVGA_CMD_UPDATE 1 366 #define SVGA_CMD_RECT_FILL 2 370 #define SVGA_CMD_RECT_COPY 3 374 #define SVGA_CMD_DEFINE_BITMAP 4 378 #define SVGA_CMD_DEFINE_BITMAP_SCANLINE 5 382 #define SVGA_CMD_DEFINE_PIXMAP 6 386 #define SVGA_CMD_DEFINE_PIXMAP_SCANLINE 7 390 #define SVGA_CMD_RECT_BITMAP_FILL 8 394 #define SVGA_CMD_RECT_PIXMAP_FILL 9 398 #define SVGA_CMD_RECT_BITMAP_COPY 10 403 #define SVGA_CMD_RECT_PIXMAP_COPY 11 407 #define SVGA_CMD_FREE_OBJECT 12 411 #define SVGA_CMD_RECT_ROP_FILL 13 415 #define SVGA_CMD_RECT_ROP_COPY 14 419 #define SVGA_CMD_RECT_ROP_BITMAP_FILL 15 423 #define SVGA_CMD_RECT_ROP_PIXMAP_FILL 16 427 #define SVGA_CMD_RECT_ROP_BITMAP_COPY 17 432 #define SVGA_CMD_RECT_ROP_PIXMAP_COPY 18 436 #define SVGA_CMD_DEFINE_CURSOR 19 442 #define SVGA_CMD_DISPLAY_CURSOR 20 446 #define SVGA_CMD_MOVE_CURSOR 21 450 #define SVGA_CMD_DEFINE_ALPHA_CURSOR 22 455 #define SVGA_CMD_DRAW_GLYPH 23 459 #define SVGA_CMD_DRAW_GLYPH_CLIPPED 24 464 #define SVGA_CMD_UPDATE_VERBOSE 25 468 #define SVGA_CMD_SURFACE_FILL 26 472 #define SVGA_CMD_SURFACE_COPY 27 477 #define SVGA_CMD_SURFACE_ALPHA_BLEND 28 483 #define SVGA_CMD_FRONT_ROP_FILL 29 487 #define SVGA_CMD_FENCE 30 491 #define SVGA_CMD_MAX 31 493 #define SVGA_CMD_MAX_ARGS 64 498 #define SVGA_VRAM_MAX_SIZE (16 * 1024 * 1024) 500 #define SVGA_VRAM_SIZE_WS (16 * 1024 * 1024) // 16 MB 501 #define SVGA_MEM_SIZE_WS (2 * 1024 * 1024) // 2 MB 502 #define SVGA_VRAM_SIZE_SERVER (4 * 1024 * 1024) // 4 MB 503 #define SVGA_MEM_SIZE_SERVER (256 * 1024) // 256 KB 505 #if defined(VMX86_SERVER) 506 #define SVGA_VRAM_SIZE SVGA_VRAM_SIZE_SERVER 507 #define SVGA_MEM_SIZE SVGA_MEM_SIZE_SERVER 509 #define SVGA_VRAM_SIZE SVGA_VRAM_SIZE_WS 510 #define SVGA_MEM_SIZE SVGA_MEM_SIZE_WS 540 #define SVGA_FB_LEGACY_START 0x7EFC0000 541 #define SVGA_FB_LEGACY_START_BIGMEM 0xE0000000