f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * copy of this software and associated documentation files (the "Software"),
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * to deal in the Software without restriction, including without limitation
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and/or sell copies of the Software, and to permit persons to whom the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Software is furnished to do so, subject to the following conditions:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The above copyright notice and this permission notice shall be included in
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * all copies or substantial portions of the Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * OTHER DEALINGS IN THE SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Except as contained in this notice, the name of the copyright holder(s)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and author(s) shall not be used in advertising or otherwise to promote
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the sale, use or other dealings in this Software without prior written
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * authorization from the copyright holder(s) and author(s).
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * This file contains definitions of the public XFree86 data structures/types.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Any data structures that video drivers need to access should go here.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifndef _XF86STR_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define _XF86STR_H
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "misc.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "input.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "scrnintstr.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "pixmapstr.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "colormapst.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "xf86Module.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "xf86Opt.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "xf86Pci.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include <pciaccess.h>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/**
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Integer type that is of the size of the addressable memory (machine size).
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * On most platforms \c uintptr_t will suffice. However, on some mixed
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * must be 64-bits.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include <inttypes.h>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#if defined(__powerpc__)
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef uint64_t memType;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#else
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef uintptr_t memType;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Video mode flags */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_PHSYNC = 0x0001,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_NHSYNC = 0x0002,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_PVSYNC = 0x0004,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_NVSYNC = 0x0008,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_INTERLACE = 0x0010,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_DBLSCAN = 0x0020,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_CSYNC = 0x0040,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_PCSYNC = 0x0080,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_NCSYNC = 0x0100,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_HSKEW = 0x0200, /* hskew provided */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_BCAST = 0x0400,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_PIXMUX = 0x1000,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_DBLCLK = 0x2000,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync V_CLKDIV2 = 0x4000
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} ModeFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync INTERLACE_HALVE_V = 0x0001 /* Halve V values for interlacing */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} CrtcAdjustFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Flags passed to ChipValidMode() */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODECHECK_INITIAL = 0,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODECHECK_FINAL = 1
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} ModeCheckFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* These are possible return values for xf86CheckMode() and ValidMode() */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_OK = 0, /* Mode OK */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_HSYNC, /* hsync out of range */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_VSYNC, /* vsync out of range */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_H_ILLEGAL, /* mode has illegal horizontal timings */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_V_ILLEGAL, /* mode has illegal horizontal timings */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_BAD_WIDTH, /* requires an unsupported linepitch */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_NOMODE, /* no mode with a maching name */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_NO_INTERLACE, /* interlaced mode not supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_NO_DBLESCAN, /* doublescan mode not supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_NO_VSCAN, /* multiscan mode not supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_MEM, /* insufficient video memory */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_VIRTUAL_X, /* mode width too large for specified virtual size */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_VIRTUAL_Y, /* mode height too large for specified virtual size */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_MEM_VIRT, /* insufficient video memory given virtual size */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_NOCLOCK, /* no fixed clock available */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_CLOCK_HIGH, /* clock required is too high */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_CLOCK_LOW, /* clock required is too low */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_CLOCK_RANGE, /* clock/mode isn't in a ClockRange */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_BAD_HVALUE, /* horizontal timing was out of range */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_BAD_VVALUE, /* vertical timing was out of range */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_BAD_VSCAN, /* VScan value out of range */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_HSYNC_NARROW, /* horizontal sync too narrow */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_HSYNC_WIDE, /* horizontal sync too wide */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_HBLANK_NARROW, /* horizontal blanking too narrow */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_HBLANK_WIDE, /* horizontal blanking too wide */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_VSYNC_NARROW, /* vertical sync too narrow */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_VSYNC_WIDE, /* vertical sync too wide */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_VBLANK_NARROW, /* vertical blanking too narrow */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_VBLANK_WIDE, /* vertical blanking too wide */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_PANEL, /* exceeds panel dimensions */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_ONE_WIDTH, /* only one width is supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_ONE_HEIGHT, /* only one height is supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_ONE_SIZE, /* only one resolution is supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_BANDWIDTH, /* mode requires too much memory bandwidth */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_BAD = -2, /* unspecified reason */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MODE_ERROR = -1 /* error condition */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} ModeStatus;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The mode sets are, from best to worst: USERDEF, DRIVER, and DEFAULT/BUILTIN.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Preferred will bubble a mode to the top within a set.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_BUILTIN 0x01 /* built-in mode */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_CLOCK_C (0x02 | M_T_BUILTIN) /* built-in mode - configure clock */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_CRTC_C (0x04 | M_T_BUILTIN) /* built-in mode - configure CRTC */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_CLOCK_CRTC_C (M_T_CLOCK_C | M_T_CRTC_C)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* built-in mode - configure CRTC and clock */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_PREFERRED 0x08 /* preferred mode within a set */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_DEFAULT 0x10 /* (VESA) default modes */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_USERDEF 0x20 /* One of the modes from the config file */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_DRIVER 0x40 /* Supplied by the driver (EDID, etc) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync# define M_T_USERPREF 0x80 /* mode preferred by the user config */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Video mode */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _DisplayModeRec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct _DisplayModeRec * prev;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct _DisplayModeRec * next;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * name; /* identifier for the mode */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ModeStatus status;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int type;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* These are the values that the user sees/provides */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int Clock; /* pixel clock freq (kHz) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int HDisplay; /* horizontal timing */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int HSyncStart;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int HSyncEnd;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int HTotal;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int HSkew;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int VDisplay; /* vertical timing */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int VSyncStart;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int VSyncEnd;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int VTotal;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int VScan;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int Flags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* These are the values the hardware uses */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int ClockIndex;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int SynthClock; /* Actual clock freq to
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * be programmed (kHz) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcHDisplay;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcHBlankStart;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcHSyncStart;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcHSyncEnd;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcHBlankEnd;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcHTotal;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcHSkew;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcVDisplay;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcVBlankStart;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcVSyncStart;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcVSyncEnd;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcVBlankEnd;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int CrtcVTotal;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool CrtcHAdjusted;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool CrtcVAdjusted;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int PrivSize;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync INT32 * Private;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int PrivFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync float HSync, VRefresh;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DisplayModeRec, *DisplayModePtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* The monitor description */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAX_HSYNC 8
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAX_VREFRESH 8
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct { float hi, lo; } range;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct { CARD32 red, green, blue; } rgb;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct { float red, green, blue; } Gamma;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* The permitted gamma range is 1 / GAMMA_MAX <= g <= GAMMA_MAX */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define GAMMA_MAX 10.0
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define GAMMA_MIN (1.0 / GAMMA_MAX)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define GAMMA_ZERO (GAMMA_MIN / 100.0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * id;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * vendor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * model;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int nHsync;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync range hsync[MAX_HSYNC];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int nVrefresh;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync range vrefresh[MAX_VREFRESH];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DisplayModePtr Modes; /* Start of the monitor's mode list */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DisplayModePtr Last; /* End of the monitor's mode list */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Gamma gamma; /* Gamma of the monitor */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int widthmm;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int heightmm;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer DDC;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool reducedblanking; /* Allow CVT reduced blanking modes? */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxPixClock; /* in kHz, like mode->Clock */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} MonRec, *MonPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* the list of clock ranges */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct x_ClockRange {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct x_ClockRange *next;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int minClock; /* (kHz) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxClock; /* (kHz) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int clockIndex; /* -1 for programmable clocks */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool interlaceAllowed;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool doubleScanAllowed;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int ClockMulFactor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int ClockDivFactor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int PrivFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} ClockRange, *ClockRangePtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The driverFunc. xorgDriverFuncOp specifies the action driver should
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * perform. If requested option is not supported function should return
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * FALSE. pointer can be used to pass arguments to the function or
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * to return data to the caller.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _ScrnInfoRec *ScrnInfoPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* do not change order */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync RR_GET_INFO,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync RR_SET_CONFIG,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync RR_GET_MODE_MM,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync GET_REQUIRED_HW_INTERFACES = 10
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} xorgDriverFuncOp;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef Bool xorgDriverFuncProc (ScrnInfoPtr, xorgDriverFuncOp,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* RR_GET_INFO, RR_SET_CONFIG */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rotation;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rate;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int width;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int height;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} xorgRRConfig;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef union {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync short RRRotations;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xorgRRConfig RRConfig;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} xorgRRRotation, *xorgRRRotationPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* RR_GET_MODE_MM */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DisplayModePtr mode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int virtX;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int virtY;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int mmWidth;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int mmHeight;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} xorgRRModeMM, *xorgRRModeMMPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* GET_REQUIRED_HW_INTERFACES */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define HW_IO 1
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define HW_MMIO 2
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define HW_SKIP_CONSOLE 4
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define NEED_IO_ENABLED(x) (x & HW_IO)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef CARD32 xorgHWFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The driver list struct. This contains the information required for each
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * driver before a ScrnInfoRec has been allocated.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncstruct _DriverRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int driverVersion;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * driverName;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*Identify)(int flags);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool (*Probe)(struct _DriverRec *drv, int flags);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const OptionInfoRec * (*AvailableOptions)(int chipid, int bustype);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer module;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int refCount;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DriverRec1;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncstruct _SymTabRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncstruct _PciChipsets;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _DriverRec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int driverVersion;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * driverName;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*Identify)(int flags);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool (*Probe)(struct _DriverRec *drv, int flags);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const OptionInfoRec * (*AvailableOptions)(int chipid, int bustype);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer module;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int refCount;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xorgDriverFuncProc *driverFunc;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const struct pci_id_match * supported_devices;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool (*PciProbe)( struct _DriverRec * drv, int entity_num,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct pci_device * dev, intptr_t match_data );
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DriverRec, *DriverPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * AddDriver flags
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define HaveDriverFuncs 1
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * These are the private bus types. New types can be added here. Types
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * required for the public interface should be added to xf86str.h, with
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * function prototypes added to xf86.h.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Tolerate prior #include <linux/input.h> */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#if defined(linux) && defined(_INPUT_H)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#undef BUS_NONE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#undef BUS_PCI
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#undef BUS_SBUS
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#undef BUS_last
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync BUS_NONE,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync BUS_PCI,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync BUS_SBUS,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync BUS_last /* Keep last */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} BusType;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncstruct pci_device;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int fbNum;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} SbusBusId;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _bus {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync BusType type;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync union {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct pci_device *pci;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync SbusBusId sbus;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } id;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} BusRec, *BusPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MAXCLOCKS 128
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DAC_BPP8 = 0,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DAC_BPP16,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DAC_BPP24,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DAC_BPP32,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MAXDACSPEEDS
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DacSpeedIndex;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * identifier;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * vendor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * board;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * chipset;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * ramdac;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * driver;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct _confscreenrec * myScreenSection;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool claimed;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dacSpeeds[MAXDACSPEEDS];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numclocks;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int clock[MAXCLOCKS];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * clockchip;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * busID;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool active;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool inUse;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int videoRam;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int textClockFreq;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long BiosBase; /* Base address of video BIOS */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long MemBase; /* Frame buffer base address */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long IOBase;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int chipID;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int chipRev;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int irq;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int screen; /* For multi-CRTC cards */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} GDevRec, *GDevPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int frameX0;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int frameY0;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int virtualX;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int virtualY;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int depth;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int fbbpp;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync rgb weight;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync rgb blackColour;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync rgb whiteColour;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int defaultVisual;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char ** modes;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DispRec, *DispPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _confxvportrec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * identifier;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} confXvPortRec, *confXvPortPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _confxvadaptrec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * identifier;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numports;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confXvPortPtr ports;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} confXvAdaptorRec, *confXvAdaptorPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _confscreenrec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * id;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int screennum;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int defaultdepth;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int defaultbpp;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int defaultfbbpp;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MonPtr monitor;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync GDevPtr device;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numdisplays;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DispPtr displays;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numxvadaptors;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confXvAdaptorPtr xvadaptors;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} confScreenRec, *confScreenPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosObsolete = -1,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosAbsolute = 0,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosRightOf,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosLeftOf,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosAbove,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosBelow,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PosRelative
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} PositionType;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _screenlayoutrec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confScreenPtr screen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * topname;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confScreenPtr top;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * bottomname;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confScreenPtr bottom;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * leftname;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confScreenPtr left;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * rightname;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confScreenPtr right;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PositionType where;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int x;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int y;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * refname;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confScreenPtr refscreen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} screenLayoutRec, *screenLayoutPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _InputInfoRec InputInfoRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _serverlayoutrec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * id;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync screenLayoutPtr screens;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync GDevPtr inactives;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync InputInfoRec** inputs; /* NULL terminated */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} serverLayoutRec, *serverLayoutPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _confdribufferrec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int count;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int size;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86DRI_WC_HINT = 0x0001 /* Placeholder: not implemented */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } flags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} confDRIBufferRec, *confDRIBufferPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _confdrirec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int group;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int mode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int bufs_count;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confDRIBufferRec *bufs;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} confDRIRec, *confDRIPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* These values should be adjusted when new fields are added to ScrnInfoRec */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define NUM_RESERVED_INTS 16
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define NUM_RESERVED_POINTERS 14
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define NUM_RESERVED_FUNCS 10
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef pointer (*funcPointer)(void);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* flags for depth 24 pixmap options */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pix24DontCare = 0,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pix24Use24,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pix24Use32
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} Pix24Flags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Power management events: so far we only support APM */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_UNKNOWN = -1,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_SYS_STANDBY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_SYS_SUSPEND,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_CRITICAL_SUSPEND,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_USER_STANDBY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_USER_SUSPEND,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_STANDBY_RESUME,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_NORMAL_RESUME,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_CRITICAL_RESUME,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_LOW_BATTERY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_POWER_STATUS_CHANGE,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_UPDATE_TIME,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_CAPABILITY_CHANGED,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_STANDBY_FAILED,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XF86_APM_SUSPEND_FAILED
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} pmEvent;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PM_WAIT,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PM_CONTINUE,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PM_FAILED,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PM_NONE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} pmWait;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _PciChipsets {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /**
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Key used to match this device with its name in an array of
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * \c SymTabRec.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numChipset;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /**
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * This value is quirky. Depending on the driver, it can take on one of
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * three meanings. In drivers that have exactly one vendor ID (e.g.,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * radeon, mga, i810) the low 16-bits are the device ID.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * In drivers that can have multiple vendor IDs (e.g., the glint driver
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * can have either 3dlabs' ID or TI's ID, the i740 driver can have either
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Intel's ID or Real3D's ID, etc.) the low 16-bits are the device ID and
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the high 16-bits are the vendor ID.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * In drivers that don't have a specific vendor (e.g., vga) contains the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * device ID for either the generic VGA or generic 8514 devices. This
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * turns out to be the same as the subclass and programming interface
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * value (e.g., the full 24-bit class for the VGA device is 0x030000 (or
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * 0x000101) and for 8514 is 0x030001).
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int PCIid;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* dummy place holders for drivers to build against old/new servers */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define RES_UNDEFINED NULL
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define RES_EXCLUSIVE_VGA NULL
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define RES_SHARED_VGA NULL
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void *dummy;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} PciChipsets;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Entity properties */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*EntityProc)(int entityIndex,pointer private);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _entityInfo {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int index;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync BusRec location;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int chipset;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool active;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync GDevPtr device;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DriverPtr driver;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} EntityInfoRec, *EntityInfoPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* DGA */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int num; /* A unique identifier for the mode (num > 0) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DisplayModePtr mode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int flags; /* DGA_CONCURRENT_ACCESS, etc... */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int imageWidth; /* linear accessible portion (pixels) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int imageHeight;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int pixmapWidth; /* Xlib accessible portion (pixels) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int pixmapHeight; /* both fields ignored if no concurrent access */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int bytesPerScanline;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int byteOrder; /* MSBFirst, LSBFirst */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int depth;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int bitsPerPixel;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long red_mask;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long green_mask;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long blue_mask;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync short visualClass;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int viewportWidth;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int viewportHeight;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int xViewportStep; /* viewport position granularity */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int yViewportStep;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxViewportX; /* max viewport origin */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxViewportY;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int viewportFlags; /* types of page flipping possible */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int offset; /* offset into physical memory */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned char *address; /* server's mapped framebuffer */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int reserved1;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int reserved2;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DGAModeRec, *DGAModePtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DGAModePtr mode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PixmapPtr pPix;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DGADeviceRec, *DGADevicePtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Flags for driver Probe() functions.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define PROBE_DEFAULT 0x00
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define PROBE_DETECT 0x01
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define PROBE_TRYHARD 0x02
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Driver entry point types
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef Bool xf86ProbeProc (DriverPtr, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef Bool xf86PreInitProc (ScrnInfoPtr, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef Bool xf86ScreenInitProc (int, ScreenPtr, int, char**);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef Bool xf86SwitchModeProc (int, DisplayModePtr, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86AdjustFrameProc (int, int, int, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef Bool xf86EnterVTProc (int, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86LeaveVTProc (int, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86FreeScreenProc (int, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef ModeStatus xf86ValidModeProc (int, DisplayModePtr, Bool, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86EnableDisableFBAccessProc(int, Bool);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef int xf86SetDGAModeProc (int, int, DGADevicePtr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef int xf86ChangeGammaProc (int, Gamma);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86PointerMovedProc (int, int, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef Bool xf86PMEventProc (int, pmEvent, Bool);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86DPMSSetProc (ScrnInfoPtr, int, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86LoadPaletteProc (ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86SetOverscanProc (ScrnInfoPtr, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void xf86ModeSetProc (ScrnInfoPtr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ScrnInfoRec
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * There is one of these for each screen, and it holds all the screen-specific
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * information.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Note: the size and layout must be kept the same across versions. New
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * fields are to be added in place of the "reserved*" fields. No fields
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * are to be dependent on compile-time defines.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _ScrnInfoRec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int driverVersion;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * driverName; /* canonical name used in */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* the config file */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ScreenPtr pScreen; /* Pointer to the ScreenRec */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int scrnIndex; /* Number of this screen */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool configured; /* Is this screen valid */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int origIndex; /* initial number assigned to
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * this screen before
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * finalising the number of
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * available screens */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* Display-wide screenInfo values needed by this screen */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int imageByteOrder;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int bitmapScanlineUnit;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int bitmapScanlinePad;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int bitmapBitOrder;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numFormats;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PixmapFormatRec formats[MAXFORMATS];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync PixmapFormatRec fbFormat;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int bitsPerPixel; /* fb bpp */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Pix24Flags pixmap24; /* pixmap pref for depth 24 */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int depth; /* depth of default visual */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MessageType depthFrom; /* set from config? */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MessageType bitsPerPixelFrom; /* set from config? */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync rgb weight; /* r/g/b weights */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync rgb mask; /* rgb masks */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync rgb offset; /* rgb offsets */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rgbBits; /* Number of bits in r/g/b */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Gamma gamma; /* Gamma of the monitor */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int defaultVisual; /* default visual class */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxHValue; /* max horizontal timing */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxVValue; /* max vertical timing value */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int virtualX; /* Virtual width */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int virtualY; /* Virtual height */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int xInc; /* Horizontal timing increment */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MessageType virtualFrom; /* set from config? */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int displayWidth; /* memory pitch */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int frameX0; /* viewport position */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int frameY0;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int frameX1;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int frameY1;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int zoomLocked; /* Disallow mode changes */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DisplayModePtr modePool; /* list of compatible modes */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DisplayModePtr modes; /* list of actual modes */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DisplayModePtr currentMode; /* current mode
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * This was previously
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * overloaded with the modes
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * field, which is a pointer
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * into a circular list */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync confScreenPtr confScreen; /* Screen config info */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync MonPtr monitor; /* Monitor information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DispPtr display; /* Display information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int * entityList; /* List of device entities */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numEntities;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int widthmm; /* physical display dimensions
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * in mm */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int heightmm;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int xDpi; /* width DPI */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int yDpi; /* height DPI */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * name; /* Name to prefix messages */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer driverPrivate; /* Driver private area */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DevUnion * privates; /* Other privates can hook in
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * here */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DriverPtr drv; /* xf86DriverList[] entry */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer module; /* Pointer to module head */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int colorKey;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int overlayFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* Some of these may be moved out of here into the driver private area */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * chipset; /* chipset name */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * ramdac; /* ramdac name */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char * clockchip; /* clock name */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool progClock; /* clock is programmable */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int numClocks; /* number of clocks */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int clock[MAXCLOCKS]; /* list of clock frequencies */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int videoRam; /* amount of video ram (kb) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long biosBase; /* Base address of video BIOS */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long memPhysBase; /* Physical address of FB */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long fbOffset; /* Offset of FB in the above */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync IOADDRESS domainIOBase; /* Domain I/O base address */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int memClk; /* memory clock */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int textClockFreq; /* clock of text mode */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool flipPixels; /* swap default black/white */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer options;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int chipID;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int chipRev;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* Allow screens to be enabled/disabled individually */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool vtSema;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* hw cursor moves at SIGIO time */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool silkenMouse;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* Storage for clockRanges and adjustFlags for use with the VidMode ext */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ClockRangePtr clockRanges;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int adjustFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * These can be used when the minor ABI version is incremented.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The NUM_* parameters must be reduced appropriately to keep the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * structure size and alignment unchanged.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int reservedInt[NUM_RESERVED_INTS];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int * entityInstanceList;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync struct pci_device *vgaDev;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pointer reservedPtr[NUM_RESERVED_POINTERS];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Driver entry points.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86ProbeProc *Probe;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86PreInitProc *PreInit;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86ScreenInitProc *ScreenInit;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86SwitchModeProc *SwitchMode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86AdjustFrameProc *AdjustFrame;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86EnterVTProc *EnterVT;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86LeaveVTProc *LeaveVT;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86FreeScreenProc *FreeScreen;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86ValidModeProc *ValidMode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86SetDGAModeProc *SetDGAMode;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86ChangeGammaProc *ChangeGamma;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86PointerMovedProc *PointerMoved;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86PMEventProc *PMEvent;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86DPMSSetProc *DPMSSet;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86LoadPaletteProc *LoadPalette;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86SetOverscanProc *SetOverscan;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xorgDriverFuncProc *DriverFunc;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync xf86ModeSetProc *ModeSet;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * This can be used when the minor ABI version is incremented.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The NUM_* parameter must be reduced appropriately to keep the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * structure size and alignment unchanged.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync funcPointer reservedFuncs[NUM_RESERVED_FUNCS];
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} ScrnInfoRec;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool (*OpenFramebuffer)(
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ScrnInfoPtr pScrn,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync char **name,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned char **mem,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int *size,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int *offset,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int *extra
f78b12e570284aa8291f4ca1add24937fd107403vboxsync );
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*CloseFramebuffer)(ScrnInfoPtr pScrn);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync Bool (*SetMode)(ScrnInfoPtr pScrn, DGAModePtr pMode);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*SetViewport)(ScrnInfoPtr pScrn, int x, int y, int flags);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int (*GetViewport)(ScrnInfoPtr pScrn);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*Sync)(ScrnInfoPtr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*FillRect)(
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ScrnInfoPtr pScrn,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int x, int y, int w, int h,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long color
f78b12e570284aa8291f4ca1add24937fd107403vboxsync );
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*BlitRect)(
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ScrnInfoPtr pScrn,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int srcx, int srcy,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int w, int h,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dstx, int dsty
f78b12e570284aa8291f4ca1add24937fd107403vboxsync );
f78b12e570284aa8291f4ca1add24937fd107403vboxsync void (*BlitTransRect)(
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ScrnInfoPtr pScrn,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int srcx, int srcy,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int w, int h,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int dstx, int dsty,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long color
f78b12e570284aa8291f4ca1add24937fd107403vboxsync );
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} DGAFunctionRec, *DGAFunctionPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef struct _SymTabRec {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int token; /* id of the token */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync const char * name; /* token name */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} SymTabRec, *SymTabPtr;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* flags for xf86LookupMode */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync LOOKUP_DEFAULT = 0, /* Use default mode lookup method */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync LOOKUP_BEST_REFRESH, /* Pick modes with best refresh */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync LOOKUP_CLOSEST_CLOCK, /* Pick modes with the closest clock */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync LOOKUP_LIST_ORDER, /* Pick first useful mode in list */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync LOOKUP_CLKDIV2 = 0x0100, /* Allow half clocks */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync LOOKUP_OPTIONAL_TOLERANCES = 0x0200 /* Allow missing hsync/vrefresh */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} LookupModeFlags;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define NoDepth24Support 0x00
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define Support24bppFb 0x01 /* 24bpp framebuffer supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define Support32bppFb 0x02 /* 32bpp framebuffer supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define SupportConvert24to32 0x04 /* Can convert 24bpp pixmap to 32bpp */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define SupportConvert32to24 0x08 /* Can convert 32bpp pixmap to 24bpp */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define PreferConvert24to32 0x10 /* prefer 24bpp pixmap to 32bpp conv */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define PreferConvert32to24 0x20 /* prefer 32bpp pixmap to 24bpp conv */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* For DPMS */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*DPMSSetProcPtr)(ScrnInfoPtr, int, int);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Input handler proc */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*InputHandlerProc)(int fd, pointer data);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* These are used by xf86GetClocks */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define CLK_REG_SAVE -1
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define CLK_REG_RESTORE -2
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * misc constants
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define INTERLACE_REFRESH_WEIGHT 1.5
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define SYNC_TOLERANCE 0.01 /* 1 percent */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define CLOCK_TOLERANCE 2000 /* Clock matching tolerance (2MHz) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define OVERLAY_8_32_DUALFB 0x00000001
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define OVERLAY_8_24_DUALFB 0x00000002
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define OVERLAY_8_16_DUALFB 0x00000004
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define OVERLAY_8_32_PLANAR 0x00000008
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Values of xf86Info.mouseFlags */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MF_CLEAR_DTR 1
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define MF_CLEAR_RTS 2
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/* Action Events */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ACTION_TERMINATE = 0, /* Terminate Server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ACTION_NEXT_MODE = 10, /* Switch to next video mode */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ACTION_PREV_MODE,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ACTION_SWITCHSCREEN = 100, /* VT switch */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ACTION_SWITCHSCREEN_NEXT,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync ACTION_SWITCHSCREEN_PREV,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync} ActionEvent;
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif /* _XF86STR_H */