193ee2104SAxel Dörfler /* 2bfd4c59bSAxel Dörfler * Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de. 393ee2104SAxel Dörfler * Distributed under the terms of the MIT License. 493ee2104SAxel Dörfler */ 593ee2104SAxel Dörfler #ifndef VESA_INFO_H 693ee2104SAxel Dörfler #define VESA_INFO_H 793ee2104SAxel Dörfler 893ee2104SAxel Dörfler 993ee2104SAxel Dörfler #include <Drivers.h> 1093ee2104SAxel Dörfler #include <Accelerant.h> 1193ee2104SAxel Dörfler #include <PCI.h> 1293ee2104SAxel Dörfler 13d16ddc57SAxel Dörfler #include <edid.h> 1493ee2104SAxel Dörfler 15d16ddc57SAxel Dörfler 16d16ddc57SAxel Dörfler #define VESA_EDID_BOOT_INFO "vesa_edid/v1" 17e549b218SAxel Dörfler #define VESA_MODES_BOOT_INFO "vesa_modes/v1" 1893ee2104SAxel Dörfler 19e549b218SAxel Dörfler struct vesa_mode { 209f161845SAxel Dörfler uint16 mode; 21e549b218SAxel Dörfler uint16 width; 22e549b218SAxel Dörfler uint16 height; 23e549b218SAxel Dörfler uint8 bits_per_pixel; 24e549b218SAxel Dörfler }; 2593ee2104SAxel Dörfler 2693ee2104SAxel Dörfler struct vesa_shared_info { 2793ee2104SAxel Dörfler int32 type; 2893ee2104SAxel Dörfler area_id mode_list_area; // area containing display mode list 2993ee2104SAxel Dörfler uint32 mode_count; 3093ee2104SAxel Dörfler display_mode current_mode; 3193ee2104SAxel Dörfler uint32 bytes_per_row; 3293ee2104SAxel Dörfler 3393ee2104SAxel Dörfler area_id frame_buffer_area; // area of frame buffer 34e549b218SAxel Dörfler uint8* frame_buffer; 35e549b218SAxel Dörfler // pointer to frame buffer (visible by all apps!) 3693ee2104SAxel Dörfler uint8* physical_frame_buffer; 3793ee2104SAxel Dörfler 38e549b218SAxel Dörfler uint32 vesa_mode_offset; 39e549b218SAxel Dörfler uint32 vesa_mode_count; 40d16ddc57SAxel Dörfler 41d16ddc57SAxel Dörfler edid1_info edid_info; 42d16ddc57SAxel Dörfler bool has_edid; 43bfd4c59bSAxel Dörfler uint32 dpms_capabilities; 4493ee2104SAxel Dörfler }; 4593ee2104SAxel Dörfler 4693ee2104SAxel Dörfler //----------------- ioctl() interface ---------------- 4793ee2104SAxel Dörfler 4893ee2104SAxel Dörfler // list ioctls 4993ee2104SAxel Dörfler enum { 5093ee2104SAxel Dörfler VESA_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1, 5193ee2104SAxel Dörfler VESA_GET_DEVICE_NAME, 529f161845SAxel Dörfler VESA_SET_DISPLAY_MODE, 53bfd4c59bSAxel Dörfler VESA_GET_DPMS_MODE, 54bfd4c59bSAxel Dörfler VESA_SET_DPMS_MODE, 55*bb693d77SAxel Dörfler VESA_SET_INDEXED_COLORS, 560c6f7795SAxel Dörfler 570c6f7795SAxel Dörfler VGA_PLANAR_BLIT, 580c6f7795SAxel Dörfler }; 590c6f7795SAxel Dörfler 60*bb693d77SAxel Dörfler struct vesa_set_indexed_colors_args { 610c6f7795SAxel Dörfler uint8 first; 620c6f7795SAxel Dörfler uint16 count; 630c6f7795SAxel Dörfler uint8* colors; 640c6f7795SAxel Dörfler }; 650c6f7795SAxel Dörfler 660c6f7795SAxel Dörfler struct vga_planar_blit_args { 670c6f7795SAxel Dörfler uint8* source; 680c6f7795SAxel Dörfler int32 source_bytes_per_row; 690c6f7795SAxel Dörfler int32 left; 700c6f7795SAxel Dörfler int32 top; 710c6f7795SAxel Dörfler int32 right; 720c6f7795SAxel Dörfler int32 bottom; 7393ee2104SAxel Dörfler }; 7493ee2104SAxel Dörfler 7593ee2104SAxel Dörfler #endif /* VESA_INFO_H */ 76