3 * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
23 * Except as contained in this notice, the name of the copyright holder(s)
24 * and author(s) shall not be used in advertising or otherwise to promote
25 * the sale, use or other dealings in this Software without prior written
26 * authorization from the copyright holder(s) and author(s).
30 * This file contains definitions of the public XFree86 data structures/types.
31 * Any data structures that video drivers need to access should go here.
39 #include "scrnintstr.h"
40 #include "pixmapstr.h"
41 #include "colormapst.h"
42 #include "xf86Module.h"
46 * Integer type that is of the size of the addressable memory (machine size).
47 * On most platforms \c uintptr_t will suffice. However, on some mixed
48 * 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this
52 #if defined(__powerpc__)
53 typedef uint64_t memType
;
55 typedef uintptr_t memType
;
58 /* Video mode flags */
70 V_HSKEW
= 0x0200, /* hskew provided */
78 INTERLACE_HALVE_V
= 0x0001 /* Halve V values for interlacing */
81 /* Flags passed to ChipValidMode() */
83 MODECHECK_INITIAL
= 0,
87 /* These are possible return values for xf86CheckMode() and ValidMode() */
89 MODE_OK
= 0, /* Mode OK */
90 MODE_HSYNC
, /* hsync out of range */
91 MODE_VSYNC
, /* vsync out of range */
92 MODE_H_ILLEGAL
, /* mode has illegal horizontal timings */
93 MODE_V_ILLEGAL
, /* mode has illegal horizontal timings */
94 MODE_BAD_WIDTH
, /* requires an unsupported linepitch */
95 MODE_NOMODE
, /* no mode with a maching name */
96 MODE_NO_INTERLACE
, /* interlaced mode not supported */
97 MODE_NO_DBLESCAN
, /* doublescan mode not supported */
98 MODE_NO_VSCAN
, /* multiscan mode not supported */
99 MODE_MEM
, /* insufficient video memory */
100 MODE_VIRTUAL_X
, /* mode width too large for specified virtual size */
101 MODE_VIRTUAL_Y
, /* mode height too large for specified virtual size */
102 MODE_MEM_VIRT
, /* insufficient video memory given virtual size */
103 MODE_NOCLOCK
, /* no fixed clock available */
104 MODE_CLOCK_HIGH
, /* clock required is too high */
105 MODE_CLOCK_LOW
, /* clock required is too low */
106 MODE_CLOCK_RANGE
, /* clock/mode isn't in a ClockRange */
107 MODE_BAD_HVALUE
, /* horizontal timing was out of range */
108 MODE_BAD_VVALUE
, /* vertical timing was out of range */
109 MODE_BAD_VSCAN
, /* VScan value out of range */
110 MODE_HSYNC_NARROW
, /* horizontal sync too narrow */
111 MODE_HSYNC_WIDE
, /* horizontal sync too wide */
112 MODE_HBLANK_NARROW
, /* horizontal blanking too narrow */
113 MODE_HBLANK_WIDE
, /* horizontal blanking too wide */
114 MODE_VSYNC_NARROW
, /* vertical sync too narrow */
115 MODE_VSYNC_WIDE
, /* vertical sync too wide */
116 MODE_VBLANK_NARROW
, /* vertical blanking too narrow */
117 MODE_VBLANK_WIDE
, /* vertical blanking too wide */
118 MODE_PANEL
, /* exceeds panel dimensions */
119 MODE_INTERLACE_WIDTH
, /* width too large for interlaced mode */
120 MODE_ONE_WIDTH
, /* only one width is supported */
121 MODE_ONE_HEIGHT
, /* only one height is supported */
122 MODE_ONE_SIZE
, /* only one resolution is supported */
123 MODE_NO_REDUCED
, /* monitor doesn't accept reduced blanking */
124 MODE_BANDWIDTH
, /* mode requires too much memory bandwidth */
125 MODE_BAD
= -2, /* unspecified reason */
126 MODE_ERROR
= -1 /* error condition */
130 * The mode sets are, from best to worst: USERDEF, DRIVER, and DEFAULT/BUILTIN.
131 * Preferred will bubble a mode to the top within a set.
133 #define M_T_BUILTIN 0x01 /* built-in mode */
134 #define M_T_CLOCK_C (0x02 | M_T_BUILTIN) /* built-in mode - configure clock */
135 #define M_T_CRTC_C (0x04 | M_T_BUILTIN) /* built-in mode - configure CRTC */
136 #define M_T_CLOCK_CRTC_C (M_T_CLOCK_C | M_T_CRTC_C)
137 /* built-in mode - configure CRTC and clock */
138 #define M_T_PREFERRED 0x08 /* preferred mode within a set */
139 #define M_T_DEFAULT 0x10 /* (VESA) default modes */
140 #define M_T_USERDEF 0x20 /* One of the modes from the config file */
141 #define M_T_DRIVER 0x40 /* Supplied by the driver (EDID, etc) */
142 #define M_T_USERPREF 0x80 /* mode preferred by the user config */
145 typedef struct _DisplayModeRec
{
146 struct _DisplayModeRec
*prev
;
147 struct _DisplayModeRec
*next
;
148 char *name
; /* identifier for the mode */
152 /* These are the values that the user sees/provides */
153 int Clock
; /* pixel clock freq (kHz) */
154 int HDisplay
; /* horizontal timing */
159 int VDisplay
; /* vertical timing */
166 /* These are the values the hardware uses */
168 int SynthClock
; /* Actual clock freq to
169 * be programmed (kHz) */
189 float HSync
, VRefresh
;
190 } DisplayModeRec
, *DisplayModePtr
;
192 /* The monitor description */
195 #define MAX_VREFRESH 8
202 CARD32 red
, green
, blue
;
206 float red
, green
, blue
;
209 /* The permitted gamma range is 1 / GAMMA_MAX <= g <= GAMMA_MAX */
210 #define GAMMA_MAX 10.0
211 #define GAMMA_MIN (1.0 / GAMMA_MAX)
212 #define GAMMA_ZERO (GAMMA_MIN / 100.0)
219 range hsync
[MAX_HSYNC
];
221 range vrefresh
[MAX_VREFRESH
];
222 DisplayModePtr Modes
; /* Start of the monitor's mode list */
223 DisplayModePtr Last
; /* End of the monitor's mode list */
224 Gamma gamma
; /* Gamma of the monitor */
229 Bool reducedblanking
; /* Allow CVT reduced blanking modes? */
230 int maxPixClock
; /* in kHz, like mode->Clock */
233 /* the list of clock ranges */
234 typedef struct x_ClockRange
{
235 struct x_ClockRange
*next
;
236 int minClock
; /* (kHz) */
237 int maxClock
; /* (kHz) */
238 int clockIndex
; /* -1 for programmable clocks */
239 Bool interlaceAllowed
;
240 Bool doubleScanAllowed
;
244 } ClockRange
, *ClockRangePtr
;
247 * The driverFunc. xorgDriverFuncOp specifies the action driver should
248 * perform. If requested option is not supported function should return
249 * FALSE. pointer can be used to pass arguments to the function or
250 * to return data to the caller.
252 typedef struct _ScrnInfoRec
*ScrnInfoPtr
;
254 /* do not change order */
259 GET_REQUIRED_HW_INTERFACES
= 10
262 typedef Bool
xorgDriverFuncProc(ScrnInfoPtr
, xorgDriverFuncOp
, pointer
);
264 /* RR_GET_INFO, RR_SET_CONFIG */
274 xorgRRConfig RRConfig
;
275 } xorgRRRotation
, *xorgRRRotationPtr
;
284 } xorgRRModeMM
, *xorgRRModeMMPtr
;
286 /* GET_REQUIRED_HW_INTERFACES */
289 #define HW_SKIP_CONSOLE 4
290 #define NEED_IO_ENABLED(x) (x & HW_IO)
292 typedef CARD32 xorgHWFlags
;
295 * The driver list struct. This contains the information required for each
296 * driver before a ScrnInfoRec has been allocated.
303 void (*Identify
) (int flags
);
304 Bool (*Probe
) (struct _DriverRec
* drv
, int flags
);
305 const OptionInfoRec
*(*AvailableOptions
) (int chipid
, int bustype
);
314 struct xf86_platform_device
;
316 typedef struct _DriverRec
{
319 void (*Identify
) (int flags
);
320 Bool (*Probe
) (struct _DriverRec
* drv
, int flags
);
321 const OptionInfoRec
*(*AvailableOptions
) (int chipid
, int bustype
);
324 xorgDriverFuncProc
*driverFunc
;
326 const struct pci_id_match
*supported_devices
;
327 Bool (*PciProbe
) (struct _DriverRec
* drv
, int entity_num
,
328 struct pci_device
* dev
, intptr_t match_data
);
329 Bool (*platformProbe
) (struct _DriverRec
* drv
, int entity_num
, int flags
,
330 struct xf86_platform_device
* dev
, intptr_t match_data
);
331 } DriverRec
, *DriverPtr
;
334 * platform probe flags
336 #define PLATFORM_PROBE_GPU_SCREEN 1
341 #define HaveDriverFuncs 1
344 * These are the private bus types. New types can be added here. Types
345 * required for the public interface should be added to xf86str.h, with
346 * function prototypes added to xf86.h.
349 /* Tolerate prior #include <linux/input.h> */
363 BUS_last
/* Keep last */
370 typedef struct _bus
{
373 struct pci_device
*pci
;
375 struct xf86_platform_device
*plat
;
379 #define MAXCLOCKS 128
395 struct _confscreenrec
*myScreenSection
;
397 int dacSpeeds
[MAXDACSPEEDS
];
399 int clock
[MAXCLOCKS
];
406 unsigned long BiosBase
; /* Base address of video BIOS */
407 unsigned long MemBase
; /* Frame buffer base address */
408 unsigned long IOBase
;
413 int screen
; /* For multi-CRTC cards */
431 typedef struct _confxvportrec
{
434 } confXvPortRec
, *confXvPortPtr
;
436 typedef struct _confxvadaptrec
{
441 } confXvAdaptorRec
, *confXvAdaptorPtr
;
443 typedef struct _confscreenrec
{
454 confXvAdaptorPtr xvadaptors
;
456 } confScreenRec
, *confScreenPtr
;
468 typedef struct _screenlayoutrec
{
469 confScreenPtr screen
;
473 confScreenPtr bottom
;
482 confScreenPtr refscreen
;
483 } screenLayoutRec
, *screenLayoutPtr
;
485 typedef struct _InputInfoRec InputInfoRec
;
487 typedef struct _serverlayoutrec
{
489 screenLayoutPtr screens
;
491 InputInfoRec
**inputs
; /* NULL terminated */
493 } serverLayoutRec
, *serverLayoutPtr
;
495 typedef struct _confdribufferrec
{
499 XF86DRI_WC_HINT
= 0x0001 /* Placeholder: not implemented */
501 } confDRIBufferRec
, *confDRIBufferPtr
;
503 typedef struct _confdrirec
{
507 confDRIBufferRec
*bufs
;
508 } confDRIRec
, *confDRIPtr
;
510 /* These values should be adjusted when new fields are added to ScrnInfoRec */
511 #define NUM_RESERVED_INTS 16
512 #define NUM_RESERVED_POINTERS 14
513 #define NUM_RESERVED_FUNCS 10
515 typedef pointer (*funcPointer
) (void);
517 /* flags for depth 24 pixmap options */
524 /* Power management events: so far we only support APM */
527 XF86_APM_UNKNOWN
= -1,
528 XF86_APM_SYS_STANDBY
,
529 XF86_APM_SYS_SUSPEND
,
530 XF86_APM_CRITICAL_SUSPEND
,
531 XF86_APM_USER_STANDBY
,
532 XF86_APM_USER_SUSPEND
,
533 XF86_APM_STANDBY_RESUME
,
534 XF86_APM_NORMAL_RESUME
,
535 XF86_APM_CRITICAL_RESUME
,
536 XF86_APM_LOW_BATTERY
,
537 XF86_APM_POWER_STATUS_CHANGE
,
538 XF86_APM_UPDATE_TIME
,
539 XF86_APM_CAPABILITY_CHANGED
,
540 XF86_APM_STANDBY_FAILED
,
541 XF86_APM_SUSPEND_FAILED
551 typedef struct _PciChipsets
{
553 * Key used to match this device with its name in an array of
559 * This value is quirky. Depending on the driver, it can take on one of
560 * three meanings. In drivers that have exactly one vendor ID (e.g.,
561 * radeon, mga, i810) the low 16-bits are the device ID.
563 * In drivers that can have multiple vendor IDs (e.g., the glint driver
564 * can have either 3dlabs' ID or TI's ID, the i740 driver can have either
565 * Intel's ID or Real3D's ID, etc.) the low 16-bits are the device ID and
566 * the high 16-bits are the vendor ID.
568 * In drivers that don't have a specific vendor (e.g., vga) contains the
569 * device ID for either the generic VGA or generic 8514 devices. This
570 * turns out to be the same as the subclass and programming interface
571 * value (e.g., the full 24-bit class for the VGA device is 0x030000 (or
572 * 0x000101) and for 8514 is 0x030001).
576 /* dummy place holders for drivers to build against old/new servers */
577 #define RES_UNDEFINED NULL
578 #define RES_EXCLUSIVE_VGA NULL
579 #define RES_SHARED_VGA NULL
583 /* Entity properties */
584 typedef void (*EntityProc
) (int entityIndex
, pointer
private);
586 typedef struct _entityInfo
{
593 } EntityInfoRec
, *EntityInfoPtr
;
598 int num
; /* A unique identifier for the mode (num > 0) */
600 int flags
; /* DGA_CONCURRENT_ACCESS, etc... */
601 int imageWidth
; /* linear accessible portion (pixels) */
603 int pixmapWidth
; /* Xlib accessible portion (pixels) */
604 int pixmapHeight
; /* both fields ignored if no concurrent access */
605 int bytesPerScanline
;
606 int byteOrder
; /* MSBFirst, LSBFirst */
609 unsigned long red_mask
;
610 unsigned long green_mask
;
611 unsigned long blue_mask
;
615 int xViewportStep
; /* viewport position granularity */
617 int maxViewportX
; /* max viewport origin */
619 int viewportFlags
; /* types of page flipping possible */
620 int offset
; /* offset into physical memory */
621 unsigned char *address
; /* server's mapped framebuffer */
624 } DGAModeRec
, *DGAModePtr
;
629 } DGADeviceRec
, *DGADevicePtr
;
632 * Flags for driver Probe() functions.
634 #define PROBE_DEFAULT 0x00
635 #define PROBE_DETECT 0x01
636 #define PROBE_TRYHARD 0x02
639 * Driver entry point types
642 typedef Bool
xf86ProbeProc(DriverPtr
, int);
643 typedef Bool
xf86PreInitProc(ScrnInfoPtr
, int);
644 typedef Bool
xf86ScreenInitProc(ScreenPtr
, int, char **);
645 typedef Bool
xf86SwitchModeProc(ScrnInfoPtr
, DisplayModePtr
);
646 typedef void xf86AdjustFrameProc(ScrnInfoPtr
, int, int);
647 typedef Bool
xf86EnterVTProc(ScrnInfoPtr
);
648 typedef void xf86LeaveVTProc(ScrnInfoPtr
);
649 typedef void xf86FreeScreenProc(ScrnInfoPtr
);
650 typedef ModeStatus
xf86ValidModeProc(ScrnInfoPtr
, DisplayModePtr
, Bool
, int);
651 typedef void xf86EnableDisableFBAccessProc(ScrnInfoPtr
, Bool
);
652 typedef int xf86SetDGAModeProc(ScrnInfoPtr
, int, DGADevicePtr
);
653 typedef int xf86ChangeGammaProc(ScrnInfoPtr
, Gamma
);
654 typedef void xf86PointerMovedProc(ScrnInfoPtr
, int, int);
655 typedef Bool
xf86PMEventProc(ScrnInfoPtr
, pmEvent
, Bool
);
656 typedef void xf86DPMSSetProc(ScrnInfoPtr
, int, int);
657 typedef void xf86LoadPaletteProc(ScrnInfoPtr
, int, int *, LOCO
*, VisualPtr
);
658 typedef void xf86SetOverscanProc(ScrnInfoPtr
, int);
659 typedef void xf86ModeSetProc(ScrnInfoPtr
);
664 * There is one of these for each screen, and it holds all the screen-specific
667 * Note: the size and layout must be kept the same across versions. New
668 * fields are to be added in place of the "reserved*" fields. No fields
669 * are to be dependent on compile-time defines.
672 typedef struct _ScrnInfoRec
{
674 char *driverName
; /* canonical name used in */
675 /* the config file */
676 ScreenPtr pScreen
; /* Pointer to the ScreenRec */
677 int scrnIndex
; /* Number of this screen */
678 Bool configured
; /* Is this screen valid */
679 int origIndex
; /* initial number assigned to
681 * finalising the number of
682 * available screens */
684 /* Display-wide screenInfo values needed by this screen */
686 int bitmapScanlineUnit
;
687 int bitmapScanlinePad
;
690 PixmapFormatRec formats
[MAXFORMATS
];
691 PixmapFormatRec fbFormat
;
693 int bitsPerPixel
; /* fb bpp */
694 Pix24Flags pixmap24
; /* pixmap pref for depth 24 */
695 int depth
; /* depth of default visual */
696 MessageType depthFrom
; /* set from config? */
697 MessageType bitsPerPixelFrom
; /* set from config? */
698 rgb weight
; /* r/g/b weights */
699 rgb mask
; /* rgb masks */
700 rgb offset
; /* rgb offsets */
701 int rgbBits
; /* Number of bits in r/g/b */
702 Gamma gamma
; /* Gamma of the monitor */
703 int defaultVisual
; /* default visual class */
704 int maxHValue
; /* max horizontal timing */
705 int maxVValue
; /* max vertical timing value */
706 int virtualX
; /* Virtual width */
707 int virtualY
; /* Virtual height */
708 int xInc
; /* Horizontal timing increment */
709 MessageType virtualFrom
; /* set from config? */
710 int displayWidth
; /* memory pitch */
711 int frameX0
; /* viewport position */
715 int zoomLocked
; /* Disallow mode changes */
716 DisplayModePtr modePool
; /* list of compatible modes */
717 DisplayModePtr modes
; /* list of actual modes */
718 DisplayModePtr currentMode
; /* current mode
719 * This was previously
720 * overloaded with the modes
721 * field, which is a pointer
722 * into a circular list */
723 confScreenPtr confScreen
; /* Screen config info */
724 MonPtr monitor
; /* Monitor information */
725 DispPtr display
; /* Display information */
726 int *entityList
; /* List of device entities */
728 int widthmm
; /* physical display dimensions
731 int xDpi
; /* width DPI */
732 int yDpi
; /* height DPI */
733 char *name
; /* Name to prefix messages */
734 pointer driverPrivate
; /* Driver private area */
735 DevUnion
*privates
; /* Other privates can hook in
737 DriverPtr drv
; /* xf86DriverList[] entry */
738 pointer module
; /* Pointer to module head */
742 /* Some of these may be moved out of here into the driver private area */
744 char *chipset
; /* chipset name */
745 char *ramdac
; /* ramdac name */
746 char *clockchip
; /* clock name */
747 Bool progClock
; /* clock is programmable */
748 int numClocks
; /* number of clocks */
749 int clock
[MAXCLOCKS
]; /* list of clock frequencies */
750 int videoRam
; /* amount of video ram (kb) */
751 unsigned long biosBase
; /* Base address of video BIOS */
752 unsigned long memPhysBase
; /* Physical address of FB */
753 unsigned long fbOffset
; /* Offset of FB in the above */
754 int memClk
; /* memory clock */
755 int textClockFreq
; /* clock of text mode */
756 Bool flipPixels
; /* swap default black/white */
762 /* Allow screens to be enabled/disabled individually */
765 /* hw cursor moves at SIGIO time */
768 /* Storage for clockRanges and adjustFlags for use with the VidMode ext */
769 ClockRangePtr clockRanges
;
773 * These can be used when the minor ABI version is incremented.
774 * The NUM_* parameters must be reduced appropriately to keep the
775 * structure size and alignment unchanged.
777 int reservedInt
[NUM_RESERVED_INTS
];
779 int *entityInstanceList
;
780 struct pci_device
*vgaDev
;
782 pointer reservedPtr
[NUM_RESERVED_POINTERS
];
785 * Driver entry points.
789 xf86ProbeProc
*Probe
;
790 xf86PreInitProc
*PreInit
;
791 xf86ScreenInitProc
*ScreenInit
;
792 xf86SwitchModeProc
*SwitchMode
;
793 xf86AdjustFrameProc
*AdjustFrame
;
794 xf86EnterVTProc
*EnterVT
;
795 xf86LeaveVTProc
*LeaveVT
;
796 xf86FreeScreenProc
*FreeScreen
;
797 xf86ValidModeProc
*ValidMode
;
798 xf86EnableDisableFBAccessProc
*EnableDisableFBAccess
;
799 xf86SetDGAModeProc
*SetDGAMode
;
800 xf86ChangeGammaProc
*ChangeGamma
;
801 xf86PointerMovedProc
*PointerMoved
;
802 xf86PMEventProc
*PMEvent
;
803 xf86DPMSSetProc
*DPMSSet
;
804 xf86LoadPaletteProc
*LoadPalette
;
805 xf86SetOverscanProc
*SetOverscan
;
806 xorgDriverFuncProc
*DriverFunc
;
807 xf86ModeSetProc
*ModeSet
;
810 * This can be used when the minor ABI version is incremented.
811 * The NUM_* parameter must be reduced appropriately to keep the
812 * structure size and alignment unchanged.
814 funcPointer reservedFuncs
[NUM_RESERVED_FUNCS
];
817 uint32_t capabilities
;
821 Bool (*OpenFramebuffer
) (ScrnInfoPtr pScrn
,
824 int *size
, int *offset
, int *extra
);
825 void (*CloseFramebuffer
) (ScrnInfoPtr pScrn
);
826 Bool (*SetMode
) (ScrnInfoPtr pScrn
, DGAModePtr pMode
);
827 void (*SetViewport
) (ScrnInfoPtr pScrn
, int x
, int y
, int flags
);
828 int (*GetViewport
) (ScrnInfoPtr pScrn
);
829 void (*Sync
) (ScrnInfoPtr
);
830 void (*FillRect
) (ScrnInfoPtr pScrn
,
831 int x
, int y
, int w
, int h
, unsigned long color
);
832 void (*BlitRect
) (ScrnInfoPtr pScrn
,
833 int srcx
, int srcy
, int w
, int h
, int dstx
, int dsty
);
834 void (*BlitTransRect
) (ScrnInfoPtr pScrn
,
837 int dstx
, int dsty
, unsigned long color
);
838 } DGAFunctionRec
, *DGAFunctionPtr
;
840 typedef struct _SymTabRec
{
841 int token
; /* id of the token */
842 const char *name
; /* token name */
843 } SymTabRec
, *SymTabPtr
;
845 /* flags for xf86LookupMode */
847 LOOKUP_DEFAULT
= 0, /* Use default mode lookup method */
848 LOOKUP_BEST_REFRESH
, /* Pick modes with best refresh */
849 LOOKUP_CLOSEST_CLOCK
, /* Pick modes with the closest clock */
850 LOOKUP_LIST_ORDER
, /* Pick first useful mode in list */
851 LOOKUP_CLKDIV2
= 0x0100, /* Allow half clocks */
852 LOOKUP_OPTIONAL_TOLERANCES
= 0x0200 /* Allow missing hsync/vrefresh */
855 #define NoDepth24Support 0x00
856 #define Support24bppFb 0x01 /* 24bpp framebuffer supported */
857 #define Support32bppFb 0x02 /* 32bpp framebuffer supported */
858 #define SupportConvert24to32 0x04 /* Can convert 24bpp pixmap to 32bpp */
859 #define SupportConvert32to24 0x08 /* Can convert 32bpp pixmap to 24bpp */
860 #define PreferConvert24to32 0x10 /* prefer 24bpp pixmap to 32bpp conv */
861 #define PreferConvert32to24 0x20 /* prefer 32bpp pixmap to 24bpp conv */
864 typedef void (*DPMSSetProcPtr
) (ScrnInfoPtr
, int, int);
866 /* Input handler proc */
867 typedef void (*InputHandlerProc
) (int fd
, pointer data
);
869 /* These are used by xf86GetClocks */
870 #define CLK_REG_SAVE -1
871 #define CLK_REG_RESTORE -2
876 #define INTERLACE_REFRESH_WEIGHT 1.5
877 #define SYNC_TOLERANCE 0.01 /* 1 percent */
878 #define CLOCK_TOLERANCE 2000 /* Clock matching tolerance (2MHz) */
880 #define OVERLAY_8_32_DUALFB 0x00000001
881 #define OVERLAY_8_24_DUALFB 0x00000002
882 #define OVERLAY_8_16_DUALFB 0x00000004
883 #define OVERLAY_8_32_PLANAR 0x00000008
885 /* Values of xf86Info.mouseFlags */
886 #define MF_CLEAR_DTR 1
887 #define MF_CLEAR_RTS 2
891 ACTION_TERMINATE
= 0, /* Terminate Server */
892 ACTION_NEXT_MODE
= 10, /* Switch to next video mode */
894 ACTION_SWITCHSCREEN
= 100, /* VT switch */
895 ACTION_SWITCHSCREEN_NEXT
,
896 ACTION_SWITCHSCREEN_PREV
,
899 #endif /* _XF86STR_H */