2005-04-08 19:11:32 +04:00
|
|
|
/*
|
2009-06-05 17:03:05 +04:00
|
|
|
* Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de.
|
2005-04-08 19:11:32 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef VESA_INFO_H
|
|
|
|
#define VESA_INFO_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <Drivers.h>
|
|
|
|
#include <Accelerant.h>
|
|
|
|
#include <PCI.h>
|
|
|
|
|
2008-06-03 19:17:59 +04:00
|
|
|
#include <edid.h>
|
2005-04-08 19:11:32 +04:00
|
|
|
|
2008-06-03 19:17:59 +04:00
|
|
|
|
|
|
|
#define VESA_EDID_BOOT_INFO "vesa_edid/v1"
|
2008-03-30 15:42:32 +04:00
|
|
|
#define VESA_MODES_BOOT_INFO "vesa_modes/v1"
|
2005-04-08 19:11:32 +04:00
|
|
|
|
2008-03-30 15:42:32 +04:00
|
|
|
struct vesa_mode {
|
2008-05-28 14:48:01 +04:00
|
|
|
uint16 mode;
|
2008-03-30 15:42:32 +04:00
|
|
|
uint16 width;
|
|
|
|
uint16 height;
|
|
|
|
uint8 bits_per_pixel;
|
|
|
|
};
|
2005-04-08 19:11:32 +04:00
|
|
|
|
|
|
|
struct vesa_shared_info {
|
|
|
|
int32 type;
|
|
|
|
area_id mode_list_area; // area containing display mode list
|
|
|
|
uint32 mode_count;
|
|
|
|
display_mode current_mode;
|
|
|
|
uint32 bytes_per_row;
|
|
|
|
|
|
|
|
area_id frame_buffer_area; // area of frame buffer
|
2008-03-30 15:42:32 +04:00
|
|
|
uint8 *frame_buffer;
|
|
|
|
// pointer to frame buffer (visible by all apps!)
|
2005-04-08 19:11:32 +04:00
|
|
|
uint8 *physical_frame_buffer;
|
|
|
|
|
2008-03-30 15:42:32 +04:00
|
|
|
uint32 vesa_mode_offset;
|
|
|
|
uint32 vesa_mode_count;
|
2008-06-03 19:17:59 +04:00
|
|
|
|
|
|
|
edid1_info edid_info;
|
|
|
|
bool has_edid;
|
2009-06-05 17:03:05 +04:00
|
|
|
uint32 dpms_capabilities;
|
2005-04-08 19:11:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
//----------------- ioctl() interface ----------------
|
|
|
|
|
|
|
|
// list ioctls
|
|
|
|
enum {
|
|
|
|
VESA_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1,
|
|
|
|
VESA_GET_DEVICE_NAME,
|
2008-05-28 14:48:01 +04:00
|
|
|
VESA_SET_DISPLAY_MODE,
|
2009-06-05 17:03:05 +04:00
|
|
|
VESA_GET_DPMS_MODE,
|
|
|
|
VESA_SET_DPMS_MODE,
|
2006-12-20 01:57:56 +03:00
|
|
|
|
|
|
|
VGA_SET_INDEXED_COLORS,
|
|
|
|
VGA_PLANAR_BLIT,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vga_set_indexed_colors_args {
|
|
|
|
uint8 first;
|
|
|
|
uint16 count;
|
|
|
|
uint8 *colors;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vga_planar_blit_args {
|
|
|
|
uint8 *source;
|
|
|
|
int32 source_bytes_per_row;
|
|
|
|
int32 left;
|
|
|
|
int32 top;
|
|
|
|
int32 right;
|
|
|
|
int32 bottom;
|
2005-04-08 19:11:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* VESA_INFO_H */
|