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 #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 }; 44 45 //----------------- ioctl() interface ---------------- 46 47 // list ioctls 48 enum { 49 VESA_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1, 50 VESA_GET_DEVICE_NAME, 51 VESA_SET_DISPLAY_MODE, 52 53 VGA_SET_INDEXED_COLORS, 54 VGA_PLANAR_BLIT, 55 }; 56 57 struct vga_set_indexed_colors_args { 58 uint8 first; 59 uint16 count; 60 uint8 *colors; 61 }; 62 63 struct vga_planar_blit_args { 64 uint8 *source; 65 int32 source_bytes_per_row; 66 int32 left; 67 int32 top; 68 int32 right; 69 int32 bottom; 70 }; 71 72 #endif /* VESA_INFO_H */ 73