From 72bb797ea92acc35085ed389907859e71c6e0722 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Sat, 10 Jul 2004 22:25:49 +0000 Subject: [PATCH] AGP busmanager now compiles. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8373 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/graphics/AGP.h | 53 +++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/headers/private/graphics/AGP.h b/headers/private/graphics/AGP.h index 4f53152f79..4fdf0063a9 100644 --- a/headers/private/graphics/AGP.h +++ b/headers/private/graphics/AGP.h @@ -13,39 +13,52 @@ #if !defined(_AGP_H_) #define _AGP_H_ -#include +#include -/* The API for driver access is C, not C++ */ #ifdef __cplusplus extern "C" { #endif -//driver IOCTRL argument: -typedef struct { +/* ----- + agp device info +----- */ + +typedef struct agp_info { + ushort vendor_id; /* vendor id */ + ushort device_id; /* device id */ + uchar bus; /* bus number */ + uchar device; /* device number on bus */ + uchar function; /* function number in device */ + uchar class_sub; /* specific device function */ + uchar class_base; /* device type (display vs host bridge) */ struct { - ushort vendor_id, /* host bridge vendor id */ - device_id; /* host bridge device id */ - } dev; - struct - { - uint32 agp_cap_id, /* AGP capability register as defined in the AGP standard */ - agp_stat, /* AGP STATUS register as defined in the AGP standard */ - agp_cmd; /* AGP COMMAND register as defined in the AGP standard */ - }config; - status_t status; /* hostbridge usability status (B_OK if usable, B_ERROR if it - * did not respond according to the AGP standard */ + uint32 agp_cap_id; /* AGP capability register as defined in the AGP standard */ + uint32 agp_stat; /* AGP STATUS register as defined in the AGP standard */ + uint32 agp_cmd; /* AGP COMMAND register as defined in the AGP standard */ + } interface; + status_t status; /* B_OK if usable, B_ERROR if device did not respond + * according to the AGP standard */ } agp_info; +typedef struct agp_module_info agp_module_info; -//driver IOCTRL operation codes: -enum -{ - GET_CONFIG = B_DEVICE_OP_CODES_END+20001, - SET_CONFIG, +struct agp_module_info { + bus_manager_info binfo; + + long (*get_nth_agp_info) ( + long index, /* index into agp device table */ + agp_info *info /* caller-supplied buffer for info */ + ); + void (*enable_agp) ( + uint32 *command /* max. mode to set */ + ); + //fixme: GART and APERTURE stuff is lacking for now, add here... }; +#define B_AGP_MODULE_NAME "bus_managers/agp/v0" + /* --- value for the AGP_id field in the agp_cap_id register