/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of the copyright holder(s)
* and author(s) shall not be used in advertising or otherwise to promote
* the sale, use or other dealings in this Software without prior written
* authorization from the copyright holder(s) and author(s).
*/
/*
* This file contains definitions of the public XFree86 data structures/types.
* Any data structures that video drivers need to access should go here.
*/
#ifndef _XF86STR_H
#define _XF86STR_H
#include "misc.h"
#include "input.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "colormapst.h"
#include "xf86Module.h"
#include "xf86Opt.h"
/**
* Integer type that is of the size of the addressable memory (machine size).
* On most platforms \c uintptr_t will suffice. However, on some mixed
* 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this
* must be 64-bits.
*/
#include <inttypes.h>
#if defined(__powerpc__)
#else
#endif
/* Video mode flags */
typedef enum {
} ModeFlags;
typedef enum {
/* Flags passed to ChipValidMode() */
typedef enum {
MODECHECK_INITIAL = 0,
/* These are possible return values for xf86CheckMode() and ValidMode() */
typedef enum {
} ModeStatus;
/*
* Preferred will bubble a mode to the top within a set.
*/
/* built-in mode - configure CRTC and clock */
/* Video mode */
typedef struct _DisplayModeRec {
int type;
int HSyncStart;
int HSyncEnd;
int HTotal;
int HSkew;
int VSyncStart;
int VSyncEnd;
int VTotal;
int VScan;
int Flags;
/* These are the values the hardware uses */
int ClockIndex;
* be programmed (kHz) */
int CrtcHDisplay;
int CrtcHBlankStart;
int CrtcHSyncStart;
int CrtcHSyncEnd;
int CrtcHBlankEnd;
int CrtcHTotal;
int CrtcHSkew;
int CrtcVDisplay;
int CrtcVBlankStart;
int CrtcVSyncStart;
int CrtcVSyncEnd;
int CrtcVBlankEnd;
int CrtcVTotal;
int PrivSize;
int PrivFlags;
/* The monitor description */
typedef struct {
} range;
typedef struct {
} rgb;
typedef struct {
} Gamma;
/* The permitted gamma range is 1 / GAMMA_MAX <= g <= GAMMA_MAX */
typedef struct {
char *id;
char *vendor;
char *model;
int nHsync;
int nVrefresh;
int widthmm;
int heightmm;
/* the list of clock ranges */
typedef struct x_ClockRange {
int ClockMulFactor;
int ClockDivFactor;
int PrivFlags;
/*
* The driverFunc. xorgDriverFuncOp specifies the action driver should
* perform. If requested option is not supported function should return
* FALSE. pointer can be used to pass arguments to the function or
* to return data to the caller.
*/
/* do not change order */
typedef enum {
/* RR_GET_INFO, RR_SET_CONFIG */
typedef struct {
int rotation;
int rate;
int width;
int height;
} xorgRRConfig;
typedef union {
short RRRotations;
/* RR_GET_MODE_MM */
typedef struct {
int virtX;
int virtY;
int mmWidth;
int mmHeight;
/* GET_REQUIRED_HW_INTERFACES */
/*
* The driver list struct. This contains the information required for each
* driver before a ScrnInfoRec has been allocated.
*/
struct _DriverRec;
typedef struct {
int driverVersion;
char *driverName;
int refCount;
} DriverRec1;
struct _SymTabRec;
struct _PciChipsets;
struct pci_device;
struct xf86_platform_device;
typedef struct _DriverRec {
int driverVersion;
char *driverName;
int refCount;
/*
* platform probe flags
*/
/*
* AddDriver flags
*/
/*
* These are the private bus types. New types can be added here. Types
* required for the public interface should be added to xf86str.h, with
* function prototypes added to xf86.h.
*/
#if defined(linux)
#endif
typedef enum {
} BusType;
typedef struct {
int fbNum;
} SbusBusId;
typedef struct _bus {
union {
} id;
typedef enum {
DAC_BPP8 = 0,
typedef struct {
char *identifier;
char *vendor;
char *board;
char *chipset;
char *ramdac;
char *driver;
int numclocks;
char *clockchip;
char *busID;
int videoRam;
int textClockFreq;
unsigned long IOBase;
int chipID;
int chipRev;
int irq;
typedef struct {
int frameX0;
int frameY0;
int virtualX;
int virtualY;
int depth;
int fbbpp;
int defaultVisual;
char **modes;
typedef struct _confxvportrec {
char *identifier;
typedef struct _confxvadaptrec {
char *identifier;
int numports;
typedef struct _confscreenrec {
char *id;
int screennum;
int defaultdepth;
int defaultbpp;
int defaultfbbpp;
int numdisplays;
int numxvadaptors;
typedef enum {
PosAbsolute = 0,
} PositionType;
typedef struct _screenlayoutrec {
char *topname;
char *bottomname;
char *leftname;
char *rightname;
int x;
int y;
char *refname;
typedef struct _serverlayoutrec {
char *id;
typedef struct _confdribufferrec {
int count;
int size;
enum {
} flags;
typedef struct _confdrirec {
int group;
int mode;
int bufs_count;
/* These values should be adjusted when new fields are added to ScrnInfoRec */
/* flags for depth 24 pixmap options */
typedef enum {
Pix24DontCare = 0,
} Pix24Flags;
/* Power management events: so far we only support APM */
typedef enum {
} pmEvent;
typedef enum {
} pmWait;
typedef struct _PciChipsets {
/**
* Key used to match this device with its name in an array of
* \c SymTabRec.
*/
int numChipset;
/**
* This value is quirky. Depending on the driver, it can take on one of
* three meanings. In drivers that have exactly one vendor ID (e.g.,
* radeon, mga, i810) the low 16-bits are the device ID.
*
* In drivers that can have multiple vendor IDs (e.g., the glint driver
* can have either 3dlabs' ID or TI's ID, the i740 driver can have either
* Intel's ID or Real3D's ID, etc.) the low 16-bits are the device ID and
* the high 16-bits are the vendor ID.
*
* In drivers that don't have a specific vendor (e.g., vga) contains the
* device ID for either the generic VGA or generic 8514 devices. This
* turns out to be the same as the subclass and programming interface
* value (e.g., the full 24-bit class for the VGA device is 0x030000 (or
* 0x000101) and for 8514 is 0x030001).
*/
int PCIid;
void *dummy;
} PciChipsets;
/* Entity properties */
typedef struct _entityInfo {
int index;
int chipset;
/* DGA */
typedef struct {
int imageHeight;
int bytesPerScanline;
int depth;
int bitsPerPixel;
unsigned long red_mask;
unsigned long green_mask;
unsigned long blue_mask;
short visualClass;
int viewportWidth;
int viewportHeight;
int yViewportStep;
int maxViewportY;
int reserved1;
int reserved2;
typedef struct {
/*
* Flags for driver Probe() functions.
*/
/*
* Driver entry point types
*/
/*
* ScrnInfoRec
*
* There is one of these for each screen, and it holds all the screen-specific
* information.
*
* Note: the size and layout must be kept the same across versions. New
* fields are to be added in place of the "reserved*" fields. No fields
* are to be dependent on compile-time defines.
*/
typedef struct _ScrnInfoRec {
int driverVersion;
/* the config file */
* this screen before
* finalising the number of
* available screens */
/* Display-wide screenInfo values needed by this screen */
int imageByteOrder;
int bitmapScanlineUnit;
int bitmapScanlinePad;
int bitmapBitOrder;
int numFormats;
int frameY0;
int frameX1;
int frameY1;
* This was previously
* overloaded with the modes
* field, which is a pointer
* into a circular list */
int numEntities;
* in mm */
int heightmm;
* here */
int colorKey;
int overlayFlags;
/* Some of these may be moved out of here into the driver private area */
int chipID;
int chipRev;
/* hw cursor moves at SIGIO time */
/* Storage for clockRanges and adjustFlags for use with the VidMode ext */
int adjustFlags;
/*
* These can be used when the minor ABI version is incremented.
* The NUM_* parameters must be reduced appropriately to keep the
* structure size and alignment unchanged.
*/
int *entityInstanceList;
/*
* Driver entry points.
*
*/
/*
* This can be used when the minor ABI version is incremented.
* The NUM_* parameter must be reduced appropriately to keep the
* structure size and alignment unchanged.
*/
} ScrnInfoRec;
typedef struct {
char **name,
unsigned char **mem,
int x, int y, int w, int h, unsigned long color);
int w, int h,
typedef struct _SymTabRec {
/* flags for xf86LookupMode */
typedef enum {
/* For DPMS */
/* Input handler proc */
/* These are used by xf86GetClocks */
/*
* misc constants
*/
/* Values of xf86Info.mouseFlags */
/* Action Events */
typedef enum {
} ActionEvent;
#endif /* _XF86STR_H */