Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1029 | serge | 1 | /* |
2 | * Copyright 2007 Luc Verhaegen |
||
3 | * Copyright 2007 Matthias Hopf |
||
4 | * Copyright 2007 Egbert Eich |
||
5 | * Copyright 2007 Advanced Micro Devices, Inc. |
||
6 | * |
||
7 | * Permission is hereby granted, free of charge, to any person obtaining a |
||
8 | * copy of this software and associated documentation files (the "Software"), |
||
9 | * to deal in the Software without restriction, including without limitation |
||
10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
||
11 | * and/or sell copies of the Software, and to permit persons to whom the |
||
12 | * Software is furnished to do so, subject to the following conditions: |
||
13 | * |
||
14 | * The above copyright notice and this permission notice shall be included in |
||
15 | * all copies or substantial portions of the Software. |
||
16 | * |
||
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
||
20 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
||
21 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
||
22 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
23 | * OTHER DEALINGS IN THE SOFTWARE. |
||
24 | */ |
||
25 | |||
26 | #ifndef _RHD_MODES_H |
||
27 | #define _RHD_MODES_H |
||
28 | |||
29 | /* |
||
30 | * Define a set of own mode errors. |
||
31 | */ |
||
32 | #define RHD_MODE_STATUS 0x51B00 |
||
33 | #ifndef MONREC_HAS_REDUCED |
||
34 | #define MODE_NO_REDUCED 0x01 + RHD_MODE_STATUS |
||
35 | #endif |
||
36 | #define MODE_MEM_BW 0x02 + RHD_MODE_STATUS |
||
37 | #define MODE_OUTPUT_UNDEF 0x03 + RHD_MODE_STATUS |
||
38 | #define MODE_NOT_PAL 0x04 + RHD_MODE_STATUS |
||
39 | #define MODE_NOT_NTSC 0x05 + RHD_MODE_STATUS |
||
40 | #define MODE_HTOTAL_WIDE 0x06 + RHD_MODE_STATUS |
||
41 | #define MODE_HDISPLAY_WIDE 0x07 + RHD_MODE_STATUS |
||
42 | #define MODE_HSYNC_RANGE 0x08 + RHD_MODE_STATUS |
||
43 | #define MODE_HBLANK_RANGE 0x09 + RHD_MODE_STATUS |
||
44 | #define MODE_VTOTAL_WIDE 0x0A + RHD_MODE_STATUS |
||
45 | #define MODE_VDISPLAY_WIDE 0x0B + RHD_MODE_STATUS |
||
46 | #define MODE_VSYNC_RANGE 0x0C + RHD_MODE_STATUS |
||
47 | #define MODE_VBLANK_RANGE 0x0D + RHD_MODE_STATUS |
||
48 | #define MODE_PITCH 0x0E + RHD_MODE_STATUS |
||
49 | #define MODE_OFFSET 0x0F + RHD_MODE_STATUS |
||
50 | #define MODE_MINHEIGHT 0x10 + RHD_MODE_STATUS |
||
51 | #define MODE_FIXED 0x11 + RHD_MODE_STATUS |
||
52 | #define MODE_SCALE 0x12 + RHD_MODE_STATUS |
||
53 | #define MODE_NO_ENCODER 0x13 + RHD_MODE_STATUS |
||
54 | |||
55 | /* |
||
56 | * In case this isn't in xf86str.h yet. |
||
57 | */ |
||
58 | |||
59 | #define M_T_BUILTIN 0x01 /* built-in mode */ |
||
60 | |||
61 | #ifndef M_T_PREFERRED |
||
62 | #define M_T_PREFERRED 0x08 |
||
63 | #endif |
||
64 | #ifndef M_T_DRIVER |
||
65 | #define M_T_DRIVER 0x40 |
||
66 | #endif |
||
67 | |||
68 | DisplayModePtr RHDCVTMode(int HDisplay, int VDisplay, float VRefresh, |
||
69 | Bool Reduced, Bool Interlaced); |
||
70 | void RHDPrintModeline(DisplayModePtr mode); |
||
71 | DisplayModePtr RHDModesAdd(DisplayModePtr Modes, DisplayModePtr Additions); |
||
72 | const char *RHDModeStatusToString(int Status); |
||
73 | |||
74 | DisplayModePtr RHDModesPoolCreate(ScrnInfoPtr pScrn, Bool Silent); |
||
75 | void RHDModesAttach(ScrnInfoPtr pScrn, DisplayModePtr Modes); |
||
76 | DisplayModePtr RHDModeCopy(DisplayModePtr Mode); |
||
77 | |||
78 | Bool RHDGetVirtualFromConfig(ScrnInfoPtr pScrn); |
||
79 | void RHDGetVirtualFromModesAndFilter(ScrnInfoPtr pScrn, DisplayModePtr Modes, Bool Silent); |
||
80 | |||
81 | int RHDRRModeFixup(ScrnInfoPtr pScrn, DisplayModePtr Mode, struct rhdCrtc *Crtc, |
||
82 | struct rhdConnector *Connector, struct rhdOutput *Output, |
||
83 | struct rhdMonitor *Monitor, Bool ScaledMode); |
||
84 | int RHDValidateScaledToMode(struct rhdCrtc *Crtc, DisplayModePtr Mode); |
||
85 | int RHDRRValidateScaledToMode(struct rhdOutput *Output, DisplayModePtr Mode); |
||
86 | void RHDSynthModes(int scrnIndex, DisplayModePtr Mode); |
||
87 | |||
88 | #endif /* _RHD_MODES_H */ |