xref: /haiku/headers/private/graphics/vesa/vesa_info.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de.
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 #include <edid.h>
14 
15 
16 #define VESA_EDID_BOOT_INFO "vesa_edid/v1"
17 #define VESA_MODES_BOOT_INFO "vesa_modes/v1"
18 
19 struct vesa_mode {
20 	uint16			mode;
21 	uint16			width;
22 	uint16			height;
23 	uint8			bits_per_pixel;
24 };
25 
26 struct vesa_shared_info {
27 	int32			type;
28 	area_id			mode_list_area;		// area containing display mode list
29 	uint32			mode_count;
30 	display_mode	current_mode;
31 	uint32			bytes_per_row;
32 
33 	area_id			frame_buffer_area;	// area of frame buffer
34 	uint8*			frame_buffer;
35 		// pointer to frame buffer (visible by all apps!)
36 	uint8*			physical_frame_buffer;
37 
38 	uint32			vesa_mode_offset;
39 	uint32			vesa_mode_count;
40 
41 	edid1_info		edid_info;
42 	bool			has_edid;
43 	uint32			dpms_capabilities;
44 };
45 
46 //----------------- ioctl() interface ----------------
47 
48 // list ioctls
49 enum {
50 	VESA_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1,
51 	VESA_GET_DEVICE_NAME,
52 	VESA_SET_DISPLAY_MODE,
53 	VESA_GET_DPMS_MODE,
54 	VESA_SET_DPMS_MODE,
55 	VESA_SET_INDEXED_COLORS,
56 
57 	VGA_PLANAR_BLIT,
58 };
59 
60 struct vesa_set_indexed_colors_args {
61 	uint8			first;
62 	uint16			count;
63 	uint8*			colors;
64 };
65 
66 struct vga_planar_blit_args {
67 	uint8*			source;
68 	int32			source_bytes_per_row;
69 	int32			left;
70 	int32			top;
71 	int32			right;
72 	int32			bottom;
73 };
74 
75 #endif	/* VESA_INFO_H */
76