haiku/headers/private/graphics/vesa/vesa_info.h
Axel Dörfler 93ee21046d Added very basic VESA driver. Will be improved in the future (right now
it doesn't really do anything, it just passes the initial frame buffer
on to the app_server).
While it seems to work on real hardware (if you set the video mode to
640x480x32, app_server restriction), under Bochs, the app_server crashes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-08 15:11:32 +00:00

60 lines
1.3 KiB
C

/*
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* 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>
#define DEVICE_NAME "vesa"
#define VESA_ACCELERANT_NAME "vesa.accelerant"
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 registers_area; // area of memory mapped registers
area_id frame_buffer_area; // area of frame buffer
uint8 *frame_buffer; // pointer to frame buffer (visible by all apps!)
uint8 *physical_frame_buffer;
};
struct vesa_info {
uint32 cookie_magic;
int32 open_count;
int32 id;
pci_info *pci;
uint8 *registers;
area_id registers_area;
struct vesa_shared_info *shared_info;
area_id shared_area;
uint8 *frame_buffer;
area_id frame_buffer_area;
uint8 *reloc_io;
area_id reloc_io_area;
};
//----------------- ioctl() interface ----------------
// list ioctls
enum {
VESA_GET_PRIVATE_DATA = B_DEVICE_OP_CODES_END + 1,
VESA_GET_DEVICE_NAME,
};
//----------------------------------------------------------
extern status_t vesa_init(vesa_info &info);
extern void vesa_uninit(vesa_info &info);
#endif /* VESA_INFO_H */