xref: /haiku/headers/private/graphics/vesa/vesa_info.h (revision cfc3fa87da824bdf593eb8b817a83b6376e77935)
1 /*
2  * Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef VESA_INFO_H
6 #define VESA_INFO_H
7 
8 
9 #include <Drivers.h>
10 #include <Accelerant.h>
11 #include <PCI.h>
12 
13 
14 #define VESA_MODES_BOOT_INFO "vesa_modes/v1"
15 
16 struct vesa_mode {
17 	uint16			width;
18 	uint16			height;
19 	uint8			bits_per_pixel;
20 };
21 
22 struct vesa_shared_info {
23 	int32			type;
24 	area_id			mode_list_area;		// area containing display mode list
25 	uint32			mode_count;
26 	display_mode	current_mode;
27 	uint32			bytes_per_row;
28 
29 	area_id			registers_area;		// area of memory mapped registers
30 	area_id			frame_buffer_area;	// area of frame buffer
31 	uint8			*frame_buffer;
32 		// pointer to frame buffer (visible by all apps!)
33 	uint8			*physical_frame_buffer;
34 
35 	uint32			vesa_mode_offset;
36 	uint32			vesa_mode_count;
37 };
38 
39 //----------------- ioctl() interface ----------------
40 
41 // list ioctls
42 enum {
43 	VESA_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1,
44 	VESA_GET_DEVICE_NAME,
45 
46 	VGA_SET_INDEXED_COLORS,
47 	VGA_PLANAR_BLIT,
48 };
49 
50 struct vga_set_indexed_colors_args {
51 	uint8	first;
52 	uint16	count;
53 	uint8	*colors;
54 };
55 
56 struct vga_planar_blit_args {
57 	uint8	*source;
58 	int32	source_bytes_per_row;
59 	int32	left;
60 	int32	top;
61 	int32	right;
62 	int32	bottom;
63 };
64 
65 #endif	/* VESA_INFO_H */
66