~ubuntu-branches/ubuntu/hardy/xserver-xorg-video-ati/hardy

« back to all changes in this revision

Viewing changes to debian/patches/04_remove_cruft.diff

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2007-10-06 12:13:31 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20071006121331-l0jcbuztjsmie3a9
Tags: 1:6.7.195-1ubuntu1
* Merge with Debian experimental, remaining changes:
  - debian/control
    * Ease the Build-Depends on xserver-xorg-dev.
    * Change Maintainer-address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: xserver-xorg-video-ati-6.7.194/src/radeon_bios.c
2
 
===================================================================
3
 
--- xserver-xorg-video-ati-6.7.194.orig/src/radeon_bios.c       2007-09-30 21:45:27.000000000 +0200
4
 
+++ xserver-xorg-video-ati-6.7.194/src/radeon_bios.c    2007-09-30 21:45:39.000000000 +0200
5
 
@@ -41,20 +41,6 @@
6
 
 #include "radeon_probe.h"
7
 
 #include "vbe.h"
8
 
 
9
 
-int RADEONBIOSApplyConnectorQuirks(ScrnInfoPtr pScrn, int connector_found)
10
 
-{
11
 
-    RADEONInfoPtr  info   = RADEONPTR(pScrn);
12
 
-
13
 
-    /* quirk for compaq nx6125 - the bios lies about the VGA DDC */
14
 
-    if (info->PciInfo->subsysVendor == PCI_VENDOR_HP) {
15
 
-      if (info->PciInfo->subsysCard == 0x308b) {
16
 
-       if (info->BiosConnector[1].DDCType == DDC_CRT2)
17
 
-         info->BiosConnector[1].DDCType = DDC_MONID;
18
 
-      }
19
 
-    }
20
 
-    return connector_found;
21
 
-}
22
 
-
23
 
 /* Read the Video BIOS block and the FP registers (if applicable). */
24
 
 Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr  pInt10)
25
 
 {
26
 
@@ -332,218 +318,6 @@
27
 
        return RADEONGetLegacyConnectorInfoFromBIOS(pScrn);
28
 
 }
29
 
 
30
 
-#if 0
31
 
-Bool RADEONGetConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
32
 
-{
33
 
-    RADEONInfoPtr info = RADEONPTR (pScrn);
34
 
-    int i = 0, j, tmp, tmp0=0, tmp1=0;
35
 
-    RADEONBIOSConnector tempConnector;
36
 
-
37
 
-    if(!info->VBIOS) return FALSE;
38
 
-
39
 
-    if (info->IsAtomBios) {
40
 
-       if((tmp = RADEON_BIOS16 (info->MasterDataStart + 22))) {
41
 
-           int crtc = 0, id[2];
42
 
-           tmp1 = RADEON_BIOS16 (tmp + 4);
43
 
-           for (i=0; i<8; i++) {
44
 
-               if(tmp1 & (1<<i)) {
45
 
-                   CARD16 portinfo = RADEON_BIOS16(tmp+6+i*2);
46
 
-                   if (crtc < 2) {
47
 
-                       if ((i==2) || (i==6)) continue; /* ignore TV here */
48
 
-
49
 
-                       if (crtc == 1) {
50
 
-                           /* sharing same port with id[0] */
51
 
-                           if (((portinfo>>8) & 0xf) == id[0]) {
52
 
-                               if (i == 3) 
53
 
-                                   info->BiosConnector[0].TMDSType = TMDS_INT;
54
 
-                               else if (i == 7)
55
 
-                                   info->BiosConnector[0].TMDSType = TMDS_EXT;
56
 
-
57
 
-                               if (info->BiosConnector[0].DACType == DAC_UNKNOWN)
58
 
-                                   info->BiosConnector[0].DACType = (portinfo & 0xf) - 1;
59
 
-                               continue;
60
 
-                           }
61
 
-                       }
62
 
-
63
 
-                       id[crtc] = (portinfo>>8) & 0xf; 
64
 
-                       info->BiosConnector[crtc].DACType = (portinfo & 0xf) - 1;
65
 
-                       info->BiosConnector[crtc].ConnectorType = (portinfo>>4) & 0xf;
66
 
-                       if (i == 3) 
67
 
-                           info->BiosConnector[crtc].TMDSType = TMDS_INT;
68
 
-                       else if (i == 7)
69
 
-                           info->BiosConnector[crtc].TMDSType = TMDS_EXT;
70
 
-                       
71
 
-                       if((tmp0 = RADEON_BIOS16 (info->MasterDataStart + 24)) && id[crtc]) {
72
 
-                           switch (RADEON_BIOS16 (tmp0 + 4 + 27 * id[crtc]) * 4) 
73
 
-                           {
74
 
-                           case RADEON_GPIO_MONID:
75
 
-                               info->BiosConnector[crtc].DDCType = DDC_MONID;
76
 
-                               break;
77
 
-                           case RADEON_GPIO_DVI_DDC:
78
 
-                               info->BiosConnector[crtc].DDCType = DDC_DVI;
79
 
-                               break;
80
 
-                           case RADEON_GPIO_VGA_DDC:
81
 
-                               info->BiosConnector[crtc].DDCType = DDC_VGA;
82
 
-                               break;
83
 
-                           case RADEON_GPIO_CRT2_DDC:
84
 
-                               info->BiosConnector[crtc].DDCType = DDC_CRT2;
85
 
-                               break;
86
 
-                           case RADEON_LCD_GPIO_MASK:
87
 
-                               info->BiosConnector[crtc].DDCType = DDC_LCD;
88
 
-                               break;
89
 
-                           default:
90
 
-                               info->BiosConnector[crtc].DDCType = DDC_NONE_DETECTED;
91
 
-                               break;
92
 
-                           }
93
 
-
94
 
-                       } else {
95
 
-                           info->BiosConnector[crtc].DDCType = DDC_NONE_DETECTED;
96
 
-                       }
97
 
-                       crtc++;
98
 
-                   } else {
99
 
-                       /* we have already had two CRTCs assigned. the rest may share the same
100
 
-                        * port with the existing connector, fill in them accordingly.
101
 
-                        */
102
 
-                       for (j=0; j<2; j++) {
103
 
-                           if (((portinfo>>8) & 0xf) == id[j]) {
104
 
-                               if (i == 3) 
105
 
-                                   info->BiosConnector[j].TMDSType = TMDS_INT;
106
 
-                               else if (i == 7)
107
 
-                                   info->BiosConnector[j].TMDSType = TMDS_EXT;
108
 
-
109
 
-                               if (info->BiosConnector[j].DACType == DAC_UNKNOWN)
110
 
-                                   info->BiosConnector[j].DACType = (portinfo & 0xf) - 1;
111
 
-                           }
112
 
-                       }
113
 
-                   }
114
 
-               }
115
 
-           }
116
 
-
117
 
-           /* R4xx seem to get the connector table backwards */
118
 
-           tempConnector = info->BiosConnector[0];
119
 
-           info->BiosConnector[0] = info->BiosConnector[1];
120
 
-           info->BiosConnector[1] = tempConnector;
121
 
-
122
 
-           xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Bios Connector table: \n");
123
 
-           for (i=0; i<2; i++) {
124
 
-               xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Port%d: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
125
 
-                          i, info->BiosConnector[i].DDCType, info->BiosConnector[i].DACType,
126
 
-                          info->BiosConnector[i].TMDSType, info->BiosConnector[i].ConnectorType);
127
 
-           }       
128
 
-       } else {
129
 
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No Device Info Table found!\n");
130
 
-           return FALSE;
131
 
-       }
132
 
-    } else {
133
 
-       /* Some laptops only have one connector (VGA) listed in the connector table, 
134
 
-        * we need to add LVDS in as a non-DDC display. 
135
 
-        * Note, we can't assume the listed VGA will be filled in PortInfo[0],
136
 
-        * when walking through connector table. connector_found has following meaning: 
137
 
-        * 0 -- nothing found, 
138
 
-        * 1 -- only PortInfo[0] filled, 
139
 
-        * 2 -- only PortInfo[1] filled,
140
 
-        * 3 -- both are filled.
141
 
-        */
142
 
-       int connector_found = 0;
143
 
-
144
 
-       if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x50))) {
145
 
-           for (i = 1; i < 4; i++) {
146
 
-
147
 
-               if (!RADEON_BIOS16(tmp + i*2))
148
 
-                       break; /* end of table */
149
 
-               
150
 
-               tmp0 = RADEON_BIOS16(tmp + i*2);
151
 
-               if (((tmp0 >> 12) & 0x0f) == 0) continue;     /* no connector */
152
 
-               if (connector_found > 0) {
153
 
-                   if (info->BiosConnector[tmp1].DDCType == ((tmp0 >> 8) & 0x0f))
154
 
-                       continue;                             /* same connector */
155
 
-               }
156
 
-
157
 
-               /* internal DDC_DVI port will get assigned to PortInfo[0], or if there is no DDC_DVI (like in some IGPs). */
158
 
-               tmp1 = ((((tmp0 >> 8) & 0xf) == DDC_DVI) || (tmp1 == 1)) ? 0 : 1; /* determine port info index */
159
 
-               
160
 
-               info->BiosConnector[tmp1].DDCType        = (tmp0 >> 8) & 0x0f;
161
 
-               if (info->BiosConnector[tmp1].DDCType > DDC_CRT2)
162
 
-                   info->BiosConnector[tmp1].DDCType = DDC_NONE_DETECTED;
163
 
-               info->BiosConnector[tmp1].DACType        = (tmp0 & 0x01) ? DAC_TVDAC : DAC_PRIMARY;
164
 
-               info->BiosConnector[tmp1].ConnectorType  = (tmp0 >> 12) & 0x0f;
165
 
-               if (info->BiosConnector[tmp1].ConnectorType > CONNECTOR_UNSUPPORTED)
166
 
-                   info->BiosConnector[tmp1].ConnectorType = CONNECTOR_UNSUPPORTED;
167
 
-               info->BiosConnector[tmp1].TMDSType       = ((tmp0 >> 4) & 0x01) ? TMDS_EXT : TMDS_INT;
168
 
-
169
 
-               /* some sanity checks */
170
 
-               if (((info->BiosConnector[tmp1].ConnectorType != CONNECTOR_DVI_D) &&
171
 
-                    (info->BiosConnector[tmp1].ConnectorType != CONNECTOR_DVI_I)) &&
172
 
-                   info->BiosConnector[tmp1].TMDSType == TMDS_INT)
173
 
-                   info->BiosConnector[tmp1].TMDSType = TMDS_UNKNOWN;
174
 
-               
175
 
-               connector_found += (tmp1 + 1);
176
 
-           }
177
 
-       } else {
178
 
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No Connector Info Table found!\n");
179
 
-           return FALSE;
180
 
-       }
181
 
-
182
 
-       if (info->IsMobility) {
183
 
-           if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x42))) {
184
 
-               if ((tmp0 = RADEON_BIOS16(tmp + 0x15))) {
185
 
-                   if ((tmp1 = RADEON_BIOS8(tmp0+2) & 0x07)) {     
186
 
-                       info->BiosConnector[0].DDCType  = tmp1;      
187
 
-                       if (info->BiosConnector[0].DDCType > DDC_LCD) {
188
 
-                           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
189
 
-                                      "Unknown DDCType %d found\n",
190
 
-                                      info->BiosConnector[0].DDCType);
191
 
-                           info->BiosConnector[0].DDCType = DDC_NONE_DETECTED;
192
 
-                       }
193
 
-                       xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "LCD DDC Info Table found!\n");
194
 
-                   }
195
 
-               }
196
 
-           } 
197
 
-       } else if (connector_found == 2) {
198
 
-           memcpy (&info->BiosConnector[0], &info->BiosConnector[1], 
199
 
-                   sizeof (info->BiosConnector[0]));   
200
 
-           info->BiosConnector[1].DACType = DAC_UNKNOWN;
201
 
-           info->BiosConnector[1].TMDSType = TMDS_UNKNOWN;
202
 
-           info->BiosConnector[1].DDCType = DDC_NONE_DETECTED;
203
 
-           info->BiosConnector[1].ConnectorType = CONNECTOR_NONE;
204
 
-           connector_found = 1;
205
 
-       }
206
 
-
207
 
-       connector_found = RADEONBIOSApplyConnectorQuirks(pScrn, connector_found);
208
 
-       
209
 
-       if (connector_found == 0) {
210
 
-           xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No connector found in Connector Info Table.\n");
211
 
-       } else {
212
 
-           xf86DrvMsg(0, X_INFO, "Bios Connector0: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
213
 
-                      info->BiosConnector[0].DDCType, info->BiosConnector[0].DACType,
214
 
-                      info->BiosConnector[0].TMDSType, info->BiosConnector[0].ConnectorType);
215
 
-       }
216
 
-       if (connector_found == 3) {
217
 
-           xf86DrvMsg(0, X_INFO, "Bios Connector1: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
218
 
-                      info->BiosConnector[1].DDCType, info->BiosConnector[1].DACType,
219
 
-                      info->BiosConnector[1].TMDSType, info->BiosConnector[1].ConnectorType);
220
 
-       }
221
 
-
222
 
-#if 0
223
 
-/* External TMDS Table, not used now */
224
 
-        if ((tmp0 = RADEON_BIOS16(info->ROMHeaderStart + 0x58))) {
225
 
-
226
 
-            //info->BiosConnector[1].DDCType = (RADEON_BIOS8(tmp0 + 7) & 0x07);
227
 
-            //info->BiosConnector[1].ConnectorType  = CONNECTOR_DVI_I;
228
 
-            //info->BiosConnector[1].TMDSType = TMDS_EXT;
229
 
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "External TMDS found.\n");
230
 
-
231
 
-        } else {
232
 
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NO External TMDS Info found\n");
233
 
-
234
 
-        }
235
 
-#endif
236
 
-
237
 
-    }
238
 
-    return TRUE;
239
 
-}
240
 
-#endif
241
 
-
242
 
 Bool RADEONGetTVInfoFromBIOS (xf86OutputPtr output) {
243
 
     ScrnInfoPtr pScrn = output->scrn;
244
 
     RADEONInfoPtr  info       = RADEONPTR(pScrn);