1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
|
diff --git a/COPYING b/COPYING
index 7f33cbf..727ca51 100644
--- a/COPYING
+++ b/COPYING
@@ -1,12 +1,60 @@
-This is a stub file. This package has not yet had its complete licensing
-information compiled. Please see the individual source files for details on
-your rights to use and modify this software.
+Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
-Please submit updated COPYING files to the Xorg bugzilla:
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
-https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-All licensing questions regarding this software should be directed at the
-Xorg mailing list:
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
+NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the XFree86 Project shall not
+be used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the XFree86 Project.
+
+Written by Jake Richter Copyright (c) 1989, 1990 Panacea Inc., Londonderry,
+NH - All Rights Reserved
+
+This code may be freely incorporated in any program without royalty, as long
+as the copyright notice stays intact.
+
+Additions by Kevin E. Martin (martin@cs.unc.edu)
+
+KEVIN E. MARTIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEVIN E. MARTIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+Copyright 2007 George Sapountzis
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
-http://lists.freedesktop.org/mailman/listinfo/xorg
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 8ef0a7c..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,69 +0,0 @@
-2006-04-07 Adam Jackson <ajax@freedesktop.org>
-
- * configure.ac:
- * src/s3v_driver.c:
- Bump to 1.9.1 for Xv changes.
-
-2006-04-07 Aaron Plattner <aplattner@nvidia.com>
-
- * src/s3v_xv.c:
- Add a DrawablePtr argument to the XV functions to pave the way for
- redirected video.
-
-2006-04-07 Adam Jackson <ajax@freedesktop.org>
-
- * configure.ac:
- * src/s3v.h:
- * src/s3v_dga.c:
- * src/s3v_driver.c:
- * src/s3v_i2c.c:
- * src/s3v_shadow.c:
- Unlibcwrap. Bump server version requirement. Bump to 1.9.0.
-
-2006-02-08 Luc Verhaegen <libv@skynet.be>
-
- * src/s3v.h:
- * src/s3v_driver.c: (S3VPreInit):
-
- Remove another insane use of pScrn->clock. Code ended up being ignored
- anyway.
-
-2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
-
- * configure.ac:
- Update package version for X11R7 release.
-
-2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
-
- * configure.ac:
- Update package version number for final X11R7 release candidate.
-
-2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
-
- * man/Makefile.am:
- Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
-
-2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
-
- * configure.ac:
- Update package version number for X11R7 RC3 release.
-
-2005-12-01 Kevin E. Martin <kem-at-freedesktop-dot-org>
-
- * configure.ac:
- Remove extraneous AC_MSG_RESULT.
-
-2005-11-29 Adam Jackson <ajax@freedesktop.org>
-
- * configure.ac:
- Only build dlloader modules by default.
-
-2005-11-09 Kevin E. Martin <kem-at-freedesktop-dot-org>
-
- * configure.ac:
- Update package version number for X11R7 RC2 release.
-
-2005-11-01 Kevin E. Martin <kem-at-freedesktop-dot-org>
-
- * configure.ac:
- Update pkgcheck dependencies to work with separate build roots.
diff --git a/Makefile.am b/Makefile.am
index 4443535..8467821 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,12 +18,17 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-AUTOMAKE_OPTIONS = foreign
SUBDIRS = src man
+MAINTAINERCLEANFILES = ChangeLog INSTALL
-if BUILD_LINUXDOC
-README: README.sgml
- $(MAKE_TEXT) README.sgml && mv README.txt README
-endif
+EXTRA_DIST = CALLMAP
-EXTRA_DIST = CALLMAP TODO_NOTES README.sgml
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/README b/README
index 72b75b2..036eec8 100644
--- a/README
+++ b/README
@@ -1,112 +1,88 @@
-xf86-video-s3virge - S3 ViRGE video driver for the Xorg X server
-
-Please submit bugs & patches to the Xorg bugzilla:
-
- https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-All questions regarding this software should be directed at the
-Xorg mailing list:
-
- http://lists.freedesktop.org/mailman/listinfo/xorg
-
-The master development code repository can be found at:
-
- git://anongit.freedesktop.org/git/xorg/driver/xf86-video-s3virge
-
- http://cgit.freedesktop.org/xorg/driver/xf86-video-s3virge
-
-For more information on the git code manager, see:
-
- http://wiki.x.org/wiki/GitPage
-
-------------------------------------------------------------------------
-What works:
-- Supports 8bpp, 15/16bpp, 24bpp and 32bpp. Heavy testing on ViRGE DX.
-- There is some known instability in ViRGE GX2, please report problems.
-- Silken Mouse is enabled by default, use the generic server option of
- -nosilk to disable it.
-
-XCONFIG options:
-
-The driver supports quite a few different XConfig options, which can
-be used to tune the driver and improve performance. Without any options,
-the driver will use conservative settings which should work on most
-hardware. Large improvements in performance are possible by selecting
-the proper options, which will probably work on most systems.
-
-Cursor:
-
-- "hwcursor" "off" behaves exactly like "swcursor". Default: "on"
-- "swcursor" will disable the HW Cursor. HW Cursor is used by default and
- no option is needed to enable it.
-
-Display:
-- "ShadowFB" Use shadow framebuffer. Disables HW acceleration. Default: off.
-- "Rotate" " cw "|" ccw " Rotate the screen CW - clockwise or CCW - counter
- clockwise. Disables HW Acceleration and HW Cursor, uses ShadowFB.
- Default: no rotation.
-- "XVideo" Disable XVideo support by using the off option. This changes FIFO
- settings which prevent screen noise for high-res modes. Default: on
-
-Video memory:
-
-- "slow_edodram" will switch the standard ViRGE to 2-cycle edo mode. Try this
- if you encounter pixel corruption on the ViRGE. Using this option will
- cause a large decrease in performance.
-- "fpm_vram" will switch the ViRGE/VX to fast page mode vram mode
-- "slow_dram " | " fast_dram" Change Trio 3D and 3D/2X memory options.
- Default: Use BIOS defaults.
-- "early_ras_precharge", "late_ras_precharge" adjust memory parameters. One
- of these will us the same settings as your video card defaults, and
- using neither in the config file does the same.
-- "set_mclk" sets the memory clock, format is:
- Option "set_mclk" "50000"
- in the XF86Config file. Valid values are any
- integer <= 100000, where 100000 == 100 MHz.
-- "set_refclk" sets the ref clock for ViRGE MX, format is:
- Option "set_refclk" "50000"
-
-Acceleration and graphic engine:
-
-- "NoAccel" turns off all acceleration
-- "fifo_aggressive", "fifo_moderate" and "fifo_conservative" alter the settings
- for the threshold at which the pixel FIFO takes over the internal
- memory bus to refill itself. The smaller this threshold, the better
- the acceleration performance of the card. You may try the fastest
- setting ("aggressive") and move down if you encounter pixel corruption.
- The optimal setting will probably depend on dot-clock and on color
- depth. Note that specifying any of these options will also alter other
- memory settings which should increase performance, so you should at
- least use "fifo_conservative" (this uses the chip defaults).
-- Common XAA acceleration options to disable primitives for test purposes:
- "XaaNoScreenToScreenCopy"
- "XaaNoSolidFillRect"
- "XaaNoColor8x8PatternFillRect"
- "XaaNoImageWriteRect"
- "XaaNoPixmapCache"
-
-PCI bus:
-- "pci_burst" will enable PCI burst mode. This should work on all but a
- few "broken" PCI chipsets, and will increase performance. Option may
- take a parameter "on", "off", "yes", etc...
-- "pci_retry" will allow the driver to rely on PCI Retry to program the
- ViRGE registers. "pci_burst" must be enabled for this to work.
- This will increase performance, especially for small fills/blits,
- because the driver does not have to poll the ViRGE before sending it
- commands to make sure it is ready. It should work on most
- recent PCI chipsets.
-
-ViRGE MX LCD options:
-- "lcd_center"
-- "set_lcdclk" allows setting the clock for a ViRGE MX LCD display. Format is:
- Option "set_lcdclk" "30000"
- in the config file. Valid values are ?
-
-Debug:
-- "ShowCache" Enable or disable viewing offscreen cache memory. A
- development debug option. Default: off.
-- "mx_cr3a_fix" Enable or disable a cr3a fix added for ViRGE MX.
- Default: on.
-
-
-$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/README,v 1.9 2000/06/14 21:57:54 dawes Exp $
+ Information for S3 ViRGE Users
+ The XFree86 Project Inc.
+ 19 Dec 2001
+ ____________________________________________________________
+
+ Table of Contents
+
+
+ 1. Supported hardware
+ 2. Features:
+ 3. Configuration:
+ 4. Documentation:
+ 5. Support:
+ 6. Authors
+
+
+ ______________________________________________________________________
+
+ 1. Supported hardware
+
+ The s3virge driver in X11R7.5 supports the S3 ViRGE, ViRGE DX, GX,
+ GX2, MX, MX+, and VX chipsets. It also supports Trio3D and Trio3D/2x
+ chips. A majority of testing is done on ViRGE DX chips, making them
+ the most stable to date. This release has added support for doublescan
+ modes on DX.
+
+ This driver is moderately stable, however please use caution with any
+ new install. Please report any problems to bugzilla.freedesktop.org,
+ using the xorg component.
+
+
+ 2. Features:
+
+
+
+ o Fully accelerated support for S3 ViRGE family video adapters
+
+ o uses linear frame buffer
+
+ o supports resolutions up to 2048x2048
+
+ o supports color depths of 8, 15, 16 and 24
+
+ o full use of video card memory for acceleration caching when visible
+ framebuffer leaves extra memory
+
+ o XVideo on DX, GX, GX2, MX, MX+ and Trio3D/2X at depth 16 and 24
+
+ o Doublescan modes on DX, possibly others (untested)
+
+
+ 3. Configuration:
+
+
+ The driver auto-detects RAM size, RAMDAC and ClockChip. Do not bother
+ putting these in your "Device" section.
+
+
+ 4. Documentation:
+
+
+ The driver has several supported options which are documented in the
+ s3virge man page. Please refer to it for additional details about
+ configuration options.
+
+
+ 5. Support:
+
+ For support with X11R7.5 video drivers please refer to our web site at
+ wiki.x.org <http://wiki.x.org>.
+
+
+ 6. Authors
+
+
+
+ o Mark Vojkovich <mailto:mvojkovich@nvidia.com>
+
+ o Sebastien Marineau
+
+ o Harald Koenig <mailto:koenig@tat.physik.uni-tuebingen.de>
+
+ o Matt Grossman <mailto:mattg@oz.net>
+
+ o Kevin Brosius <mailto:cobra@compuserve.com>
+
+
+
diff --git a/README.sgml b/README.sgml
deleted file mode 100644
index e47b8c4..0000000
--- a/README.sgml
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE linuxdoc PUBLIC "-//Xorg//DTD linuxdoc//EN" [
-<!ENTITY % defs SYSTEM "defs.ent"> %defs;
-]>
-
-<article>
-<title> Information for S3 ViRGE Users
-<author>The XFree86 Project Inc.
-<date>19 Dec 2001
-
-<ident>
-</ident>
-
-<toc>
-
-<sect> Supported hardware
-<p>
-The s3virge driver in X11R&relvers; supports the S3 ViRGE, ViRGE DX, GX, GX2, MX, MX+, and VX chipsets. It also supports Trio3D and Trio3D/2x chips. A majority of testing is done on ViRGE DX chips, making them the most stable to date. This release has added support for doublescan modes on DX.
-
-This driver is moderately stable, however please use caution with any new install. Please report any problems to bugzilla.freedesktop.org, using the xorg component.
-
-<sect>Features:
-<p>
-
-<itemize>
-<item>Fully accelerated support for S3 ViRGE family video adapters
-<item>uses linear frame buffer
-<item>supports resolutions up to 2048x2048
-<item>supports color depths of 8, 15, 16 and 24
-<item>full use of video card memory for acceleration caching when visible framebuffer leaves extra memory
-<item>XVideo on DX, GX, GX2, MX, MX+ and Trio3D/2X at depth 16 and 24
-<item>Doublescan modes on DX, possibly others (untested)
-</itemize>
-
-<sect>Configuration:
-<p>
-
-The driver auto-detects RAM size, RAMDAC and ClockChip. Do not bother putting
-these in your "Device" section.
-
-<sect>Documentation:
-<p>
-
-The driver has several supported options which are documented in the s3virge man
-page. Please refer to it for additional details about configuration options.
-
-<sect>Support:
-<p>
-For support with X11R&relvers video drivers please refer to our web site at <url name="wiki.x.org" url="http://wiki.x.org">.
-
-<sect>Authors
-<p>
-
-<itemize>
-<item>Mark Vojkovich <email>mvojkovich@nvidia.com</email>
-<item>Sebastien Marineau
-<item>Harald Koenig <email>koenig@tat.physik.uni-tuebingen.de</email>
-<item>Matt Grossman <email>mattg@oz.net</email>
-<item>Kevin Brosius <email>cobra@compuserve.com</email>
-</itemize>
-
-</article>
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..de5920b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,326 @@
+S3 ViRGE 4.0 devel notes
+
+
+
+Status
+------
+1/26/2003
+Ver 1.8.6
+Pre-4.3.0 release. 320x240 doublescan support w/mouse adjust,
+power management printouts, DAC error printout fix, log XVideo status based
+on chipset, preliminary support for disabling XV when a mode doesn't
+support it.
+
+5/18/2002
+Ver 1.8.5
+320x240 mode support (doublescan).
+
+2/2/02
+Ver 1.8.4
+Make 320x240 mode work in depth 15 & 16.
+Testing, need to switch streams on/off based on dblscan_v flag and mode.
+Virge MX panel_on test (doesn't work.)
+
+1/10/02
+Ver 1.8.3
+DGA fix, buffer pointer used wrong value. Submitted for 4.2.0 (late).
+
+Ver 1.8.2
+DPMS testing (display DPMS status, disable MX LCD panel), DGA testing.
+
+11/11/01 KJB
+Ver 1.8.1
+ViRGE MX (& GX2) fix to CR63 for problems with modes < 1024x768 from
+max <sunmax@libero.it>. Submitted for 4.2.0.
+
+11/5/01 KJB
+Ver 1.8.0
+ViRGE MX & GX2 XVideo changes. Fix overlap/color keying on MX, fix
+and enable GX2 XVideo.
+Submitted for 4.2.0.
+
+11/4/01 KJB
+Ver 1.7.0
+Bump version for 4.2.0. Update man and README.
+
+11/3/01 KJB
+Ver 1.6.16
+Pre-4.2.0 patch. cr3a fix, virge mx xvideo support, xvideo disable option
+(helps with high res modes on dx and screen noise), remove accel solid
+fill rect for trio3d, bring over some trio3d and mx fixes from 4.0.3 test
+drivers. Includes VERBLEV bump to 5 to remove register dumps in log file.
+
+Ver 1.6.15
+Experimental - Scanline color expand - GX2
+
+9/21/01 KJB
+Ver 1.6.14
+ModeInit - cr3a for MX/GX2, don't clear reserved bit 0x40 (revert change).
+Back out previous cr3a patch for testing.
+
+9/18/01 KJB
+Ver 1.6.13
+Option "xvideo" added. Add patch provided by Sven Menke
+<Menke@SLAC.Stanford.EDU> for XV support on MX (slight changes to logic).
+
+Ver 1.6.12
+Adam J. Richter's cr3a fix (possibly temporary).
+
+5/30/01 KJB
+Ver 1.6.10
+Disable MaxHValue & MaxVValue setting.
+
+1/03/01 KJB
+Ver 1.6.0
+Revert ViRGE to pre-Xv changes. ViRGE DX still supports Xv, but changes
+added for Xv and ViRGE caused problems with normal display.
+
+11/27/00 KJB
+Ver 1.5.0
+Clean up, bump version for 4.0.2 submission.
+CR3A, bit 0x40 (reserved) cleared for MX/GX2. Update man page.
+
+11/24/00 KJB
+Disable CPU to screen color expansion on GX2, causes lockups on GX2 with
+'locate html' in an xterm. Add WaitCmd code to prevent accelerator and
+reg command path activity at the same time on GX2.
+XVideo fixes, left side clipping fixed for video windows extending off left
+side of screen. Add horizontal filtering modes for 1-2x and >3x scaling.
+
+11/7/00 KJB
+Ver 1.4.0
+Enable MX fixes, testing with accel BLT_BUG set is worse on GX2, so left
+it out. BLT_BUG wasn't being enabled on ViRGE & VX because of case usage,
+enabled now. Re-enable silken mouse for GX2. Add Render/fbPicture support.
+Fix a few compiler warnings.
+
+11/5/00 KJB
+Continued work on GX2, much stabler now, but I think there is a lockup case
+left if you enable pci_burst and pci_retry with accel. I still see screen
+flashes with vertical bars once in a while, and the log reports a GEReset.
+Added fbPicture (render) support, untested. XV code for GX2 is added,
+but not working yet.
+
+10/29/00 KJB
+Much work on GX2, now SWCursor locks up but HWCursor is stable, go figure.
+Loading Netscape a couple times with the mail window was enough to lock it
+up twice in a row. Server was locked but not a box (PCI) lock. Also,
+vertical barring still occurred a couple times, so HW cursor wasn't causing
+that. Try blt_bug flag again for lock up case. And attach to debug server
+and bt... Sleep now...
+
+10/21/00 KJB
+Ver 1.3.0
+Depth 16 Xv support added. Testing on ViRGE DX. 1280x1024x24 is noisy, so
+needs FIFO tuning.
+
+9/27/00 KJB
+Initial Xv support in depth 24.
+
+9/10/00 KJB
+Convert to FB. Add option "UseFB", default true. Added
+VerticalRetraceWait timeout back as default. #if0 out the line accel
+code in s3v_accel.c. The Subsequent...Bresenham line code causes a lockup
+when used with fb. We didn't have any hardware accel in there anyway...
+
+7/25/00 KJB
+Started Xv additions.
+
+6/26/00 KJB
+GX2 seems to have an accel bug. I see the entire screen go solid color or
+a wide stripe pattern for about 1 second. The S3VGEReset gets called twice,
+and then everything is okay. Unless SilkenMouse is enabled... That seems to
+get you a server lock instead. Short term is to disable SilkenMouse for GX2
+only. SilkenMouse isn't really the problem of course, it just happens that if
+we move the mouse during the 1 second engine lockup we appear more likely to
+never recover.
+
+6/23/00 KJB
+Ver 1.2.0 - Fix console corruption on GX2 caused by reserved bit use in CR3A.
+Fix GX2 noise on screen in hi-res depth 24 by increasing FIFO fill threshold.
+
+6/12/00 KJB
+Ver 1.1.0 - Add Init for SilkenMouse, add xf86SetBackingStore call, move
+int10Symbols[] to remove warnings.
+
+3/3/00 KJB
+Ver 1.0.0 - S3VProbeDDC code for X -configure option added, add timeout to
+WAITIDLE macro in s3v_macros.h, change ImageWriteFlags adding NO_GXCOPY.
+Start of GX2 fixes, use CR regs for FIFO settings. Update copyrights.
+
+2/11/00 KJB
+Ver 0.11.0 - Add cfb16/24BresS to module symbols to remove warnings.
+Fix viewport restore problem after EnterVT in 24 bpp.
+Clean up log output, removing register dumps from normal console log.
+
+6/26/99 KJB
+Make the memory settings for fifo_conservative the default, 'fifo_conservative'
+does nothing additional now. Patch includes DGA2 additions below, non-working.
+Expected to be included in 3.9Pu.
+
+Changes in 3.9Pt by others include additions for newer RAC support. Some reports
+say multi-head works now with ViRGE.
+
+6/17/99 KJB
+Ver 0.9.0 - Prelim DGA2 support modeled after MGA.
+
+5/28/99 KJB
+Ver 0.8.0 - Changes to 3.9Po - Cleaned up debug register printing function, minor
+changes to man page, remove S3V.sgml and add new s3virge.sgml in doc/sgml, also
+remove README.S3V from doc directory.
+
+
+4/5/99 KJB
+3.9Ph - Ver 0.7.0 - Virge man page added, HW Cursor fixed, rename chipsets removing
+slashes in the names.
+
+03/27/99 KJB
+Ver 0.6.0 - hwcursor additions, added s3v_hwcurs.c and Option "swcursor".
+Default is hwcursor, Option "swcursor" will disable it.
+
+Ver 0.5.0 - patch against 3.9Pf (seq 2615), fix depth 24 and Accel flags, sync pci_burst option to previous changes, remove s3v_comp.h and s3v_pio.c and merge as needed.
+
+03/21/99 KJB
+3.9Pf has Matt Grossman's Alpha changes.
+For next patch - remove s3v_pio.c and s3v_comp.h. Include the EnableMMIO and
+DisableMMIO functions from s3v_pio.c in s3v_driver.c.
+
+03/02/99 KJB
+3.9Pc - depth 24 doesn't work on my ViRGE DX. NoAccel doesn't start, accel does
+but has blocky noise.
+
+03/01/99 KJB
+Macro change done, VGAIN/VGAOUT for register access, INREG/OUTREG for s3v_accel.c.
+Added Mark Vojkovich's re-write of the accel code. It may only be clean for ViRGE DX
+at the moment. x11perf showed a couple artifacts in 'move window via parent'.
+In progress, attempt to call cfbScreenInit() functions after MapMem/EnterVT. Not
+working yet. Version stamped 0.4.0.
+
+02/22/99 KJB
+Macro change coming to add Mark's accel update. VGAOUT for old stuff and MEMOUT
+for new stuff? That way there's no confusion with the old INREG/OUTREG macros.
+Or maybe just stick with INREG/OUTREG for new stuff.
+
+01/30/99 KJB
+Version stamp 0.3.0. Changed Chipset flags to use PCI IDs exclusively, also use
+common/xf86PciInfo.h for PCI IDs rather than coding them in regs3v.h.
+
+11/28/98 KJB
+Bumped version stamp to 0.2, expect code in 3.9No. Cleaned up s3v.h and
+s3v_driver.c by removing unused definition & code sections. Added
+options set_mclk (from 3.3.2) and set_lcdclk (3.3.3 MX). Code support
+from 3.3.3 for ViRGE GX2 and MX+ is included.
+Disabled call to 32 bpp AccelInit to get -depth 24 -bpp 32 working again.
+
+11/27/98 KJB
+More 3.3.3 import.
+New registers saved, CR40,CR45,SR8,(for MX) SR29,SR45,SR55,SR56,SR57.
+Reviewed s3vdriver.h, rehs3v.h, newmmio.h, s3v_accel.c, s3v_driver.c.
+Added ViRGE MX, MX+ & GX2 support. Re-synced parts of mode save and init
+with 3.3.3 versions. Added timeout ability for WaitIdle() and friends.
+Added chipnames and numbers to Chipsets struct.
+
+11/26/98 KJB
+Import additions from 3.3.3, newmmio.h, regs3v.h,
+
+Trap fills disabled because they don't match cfb, pixmap cache & ImageWrite
+working, fixed depth 8 color loss on VT switches, INREG & OUTREG modified to
+use a single offset value instead of adding the base and offset together.
+
+11/18/98 KJB
+3.9Nn
+Acceleration working for Bitblt, ScreenToScreenCopy, Color 8x8 Rect fills,
+and Rect/Trap fills.
+Trap fills do not support transparency, so that needs to be exported to XAA.
+
+
+10/31/98 KJB
+Working depth 8, discolored dep 16 but runs, dep 24 screen goes black,
+C-A-Bkspc restores text console. At 3.9Nk tree level, module would not
+load in Loader server. why? Static server tested.
+
+10/29/98 KJB
+ModeInit() needs work, options are heavily #if'd to try and get 8bpp
+working.
+
+10/16/98 KJB
+General 4.0 architecture is setup. Presently at 3.9Nc level, if moved
+to a newer tree you will need to add the resource handling functions from
+Egbert (I haven't tackled that yet).
+
+At the moment the ScreenInit() function is coded to return FALSE. On my
+ViRGE DX card this version does not lock up, but it does destroy the
+video mode. Make sure you have an external terminal or network connection
+if you run it (or blindly do a restart from your main terminal). I make
+no guarantees that it won't hard lock other versions of ViRGE.
+
+I've left out the Alpha memory mapping, along with all option processing.
+Those will need to be done once the driver is minimally working.
+
+Note that everything in s3v_driver.c is MMIO only. There are a pair of
+PIO functions in s3v_pio.c, but that is the only place. See notes below
+about my ViRGE DX BIOS and why I needed to do this on my hardware.
+
+Other stuff...
+Some test stuff is assuming 8bpp, so 16 & 24 are broken.
+On my hardware, I am presently trying to get the Save/Restore sequence to
+recover the video mode. At the moment, when I run this driver, I get:
+ScreenInit() runs to completion.
+It returns FALSE, so the Server aborts.
+LeaveVT() is called, and runs to completion.
+The Server exits gracefully, but my monitor goes powersaver and the video
+mode is not recovered.
+
+
+
+TODO items
+----------
+1/30/03 General option "videoram" is ignored by the virge driver.
+ (Meelis Roos)
+3/24/02 Xv reported to not work as secondary in Xinerama multihead.
+ (xav on irc)
+3/24/02 DPMS doesn't fully disable the screen. Blue line across the
+ center in all modes. (xav on irc)
+3/25/02 Secondary reports primary BIOS during int10 detection. ie:
+
+(II) S3VIRGE(1): VESA BIOS detected
+(II) S3VIRGE(1): VESA VBE Version 2.0
+(II) S3VIRGE(1): VESA VBE Total Mem: 4194240 kB
+(II) S3VIRGE(1): VESA VBE OEM: ATI RAGE128
+(II) S3VIRGE(1): VESA VBE OEM Software Rev: 1.0
+(II) S3VIRGE(1): VESA VBE OEM Vendor: ATI Technologies Inc.
+(II) S3VIRGE(1): VESA VBE OEM Product: R128
+(II) S3VIRGE(1): VESA VBE OEM Product Rev: 01.00
+
+(xav on irc)
+
+
+Check CR65 usage, bit 2 set based on S3_EARLY_SC? In my manual bit 2 is
+enable MMIO to RAMDAC registers.
+
+Notes:
+----------
+
+/config/cf/xfree86.cf
+
+have to add s3v to XF86CardDrivers for imake to make the
+drivers/s3v Makefile.
+
+To remake makefiles, after editing Imakefile, go to dir above drivers/s3v
+and do a 'make Makefiles'.
+
+For debug, make CDEBUGFLAGS='-g -DDEBUG', adding -DMetroLink enables
+timeout for VerticalRetraceWait().
+
+
+
+S3 ViRGE DX stuff:
+
+Card seems to power up (or BIOS forces) with MMIO disabled. All flavors are
+disabled, because CR53 comes up as 0. This may preclude using this card
+as the second device in a multi-head situation although David D. says that
+the new config. management stuff may help here.
+
+
+
+$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES,v 1.23 2003/02/13 03:21:33 dawes Exp $
diff --git a/TODO_NOTES b/TODO_NOTES
deleted file mode 100644
index de5920b..0000000
--- a/TODO_NOTES
+++ /dev/null
@@ -1,326 +0,0 @@
-S3 ViRGE 4.0 devel notes
-
-
-
-Status
-------
-1/26/2003
-Ver 1.8.6
-Pre-4.3.0 release. 320x240 doublescan support w/mouse adjust,
-power management printouts, DAC error printout fix, log XVideo status based
-on chipset, preliminary support for disabling XV when a mode doesn't
-support it.
-
-5/18/2002
-Ver 1.8.5
-320x240 mode support (doublescan).
-
-2/2/02
-Ver 1.8.4
-Make 320x240 mode work in depth 15 & 16.
-Testing, need to switch streams on/off based on dblscan_v flag and mode.
-Virge MX panel_on test (doesn't work.)
-
-1/10/02
-Ver 1.8.3
-DGA fix, buffer pointer used wrong value. Submitted for 4.2.0 (late).
-
-Ver 1.8.2
-DPMS testing (display DPMS status, disable MX LCD panel), DGA testing.
-
-11/11/01 KJB
-Ver 1.8.1
-ViRGE MX (& GX2) fix to CR63 for problems with modes < 1024x768 from
-max <sunmax@libero.it>. Submitted for 4.2.0.
-
-11/5/01 KJB
-Ver 1.8.0
-ViRGE MX & GX2 XVideo changes. Fix overlap/color keying on MX, fix
-and enable GX2 XVideo.
-Submitted for 4.2.0.
-
-11/4/01 KJB
-Ver 1.7.0
-Bump version for 4.2.0. Update man and README.
-
-11/3/01 KJB
-Ver 1.6.16
-Pre-4.2.0 patch. cr3a fix, virge mx xvideo support, xvideo disable option
-(helps with high res modes on dx and screen noise), remove accel solid
-fill rect for trio3d, bring over some trio3d and mx fixes from 4.0.3 test
-drivers. Includes VERBLEV bump to 5 to remove register dumps in log file.
-
-Ver 1.6.15
-Experimental - Scanline color expand - GX2
-
-9/21/01 KJB
-Ver 1.6.14
-ModeInit - cr3a for MX/GX2, don't clear reserved bit 0x40 (revert change).
-Back out previous cr3a patch for testing.
-
-9/18/01 KJB
-Ver 1.6.13
-Option "xvideo" added. Add patch provided by Sven Menke
-<Menke@SLAC.Stanford.EDU> for XV support on MX (slight changes to logic).
-
-Ver 1.6.12
-Adam J. Richter's cr3a fix (possibly temporary).
-
-5/30/01 KJB
-Ver 1.6.10
-Disable MaxHValue & MaxVValue setting.
-
-1/03/01 KJB
-Ver 1.6.0
-Revert ViRGE to pre-Xv changes. ViRGE DX still supports Xv, but changes
-added for Xv and ViRGE caused problems with normal display.
-
-11/27/00 KJB
-Ver 1.5.0
-Clean up, bump version for 4.0.2 submission.
-CR3A, bit 0x40 (reserved) cleared for MX/GX2. Update man page.
-
-11/24/00 KJB
-Disable CPU to screen color expansion on GX2, causes lockups on GX2 with
-'locate html' in an xterm. Add WaitCmd code to prevent accelerator and
-reg command path activity at the same time on GX2.
-XVideo fixes, left side clipping fixed for video windows extending off left
-side of screen. Add horizontal filtering modes for 1-2x and >3x scaling.
-
-11/7/00 KJB
-Ver 1.4.0
-Enable MX fixes, testing with accel BLT_BUG set is worse on GX2, so left
-it out. BLT_BUG wasn't being enabled on ViRGE & VX because of case usage,
-enabled now. Re-enable silken mouse for GX2. Add Render/fbPicture support.
-Fix a few compiler warnings.
-
-11/5/00 KJB
-Continued work on GX2, much stabler now, but I think there is a lockup case
-left if you enable pci_burst and pci_retry with accel. I still see screen
-flashes with vertical bars once in a while, and the log reports a GEReset.
-Added fbPicture (render) support, untested. XV code for GX2 is added,
-but not working yet.
-
-10/29/00 KJB
-Much work on GX2, now SWCursor locks up but HWCursor is stable, go figure.
-Loading Netscape a couple times with the mail window was enough to lock it
-up twice in a row. Server was locked but not a box (PCI) lock. Also,
-vertical barring still occurred a couple times, so HW cursor wasn't causing
-that. Try blt_bug flag again for lock up case. And attach to debug server
-and bt... Sleep now...
-
-10/21/00 KJB
-Ver 1.3.0
-Depth 16 Xv support added. Testing on ViRGE DX. 1280x1024x24 is noisy, so
-needs FIFO tuning.
-
-9/27/00 KJB
-Initial Xv support in depth 24.
-
-9/10/00 KJB
-Convert to FB. Add option "UseFB", default true. Added
-VerticalRetraceWait timeout back as default. #if0 out the line accel
-code in s3v_accel.c. The Subsequent...Bresenham line code causes a lockup
-when used with fb. We didn't have any hardware accel in there anyway...
-
-7/25/00 KJB
-Started Xv additions.
-
-6/26/00 KJB
-GX2 seems to have an accel bug. I see the entire screen go solid color or
-a wide stripe pattern for about 1 second. The S3VGEReset gets called twice,
-and then everything is okay. Unless SilkenMouse is enabled... That seems to
-get you a server lock instead. Short term is to disable SilkenMouse for GX2
-only. SilkenMouse isn't really the problem of course, it just happens that if
-we move the mouse during the 1 second engine lockup we appear more likely to
-never recover.
-
-6/23/00 KJB
-Ver 1.2.0 - Fix console corruption on GX2 caused by reserved bit use in CR3A.
-Fix GX2 noise on screen in hi-res depth 24 by increasing FIFO fill threshold.
-
-6/12/00 KJB
-Ver 1.1.0 - Add Init for SilkenMouse, add xf86SetBackingStore call, move
-int10Symbols[] to remove warnings.
-
-3/3/00 KJB
-Ver 1.0.0 - S3VProbeDDC code for X -configure option added, add timeout to
-WAITIDLE macro in s3v_macros.h, change ImageWriteFlags adding NO_GXCOPY.
-Start of GX2 fixes, use CR regs for FIFO settings. Update copyrights.
-
-2/11/00 KJB
-Ver 0.11.0 - Add cfb16/24BresS to module symbols to remove warnings.
-Fix viewport restore problem after EnterVT in 24 bpp.
-Clean up log output, removing register dumps from normal console log.
-
-6/26/99 KJB
-Make the memory settings for fifo_conservative the default, 'fifo_conservative'
-does nothing additional now. Patch includes DGA2 additions below, non-working.
-Expected to be included in 3.9Pu.
-
-Changes in 3.9Pt by others include additions for newer RAC support. Some reports
-say multi-head works now with ViRGE.
-
-6/17/99 KJB
-Ver 0.9.0 - Prelim DGA2 support modeled after MGA.
-
-5/28/99 KJB
-Ver 0.8.0 - Changes to 3.9Po - Cleaned up debug register printing function, minor
-changes to man page, remove S3V.sgml and add new s3virge.sgml in doc/sgml, also
-remove README.S3V from doc directory.
-
-
-4/5/99 KJB
-3.9Ph - Ver 0.7.0 - Virge man page added, HW Cursor fixed, rename chipsets removing
-slashes in the names.
-
-03/27/99 KJB
-Ver 0.6.0 - hwcursor additions, added s3v_hwcurs.c and Option "swcursor".
-Default is hwcursor, Option "swcursor" will disable it.
-
-Ver 0.5.0 - patch against 3.9Pf (seq 2615), fix depth 24 and Accel flags, sync pci_burst option to previous changes, remove s3v_comp.h and s3v_pio.c and merge as needed.
-
-03/21/99 KJB
-3.9Pf has Matt Grossman's Alpha changes.
-For next patch - remove s3v_pio.c and s3v_comp.h. Include the EnableMMIO and
-DisableMMIO functions from s3v_pio.c in s3v_driver.c.
-
-03/02/99 KJB
-3.9Pc - depth 24 doesn't work on my ViRGE DX. NoAccel doesn't start, accel does
-but has blocky noise.
-
-03/01/99 KJB
-Macro change done, VGAIN/VGAOUT for register access, INREG/OUTREG for s3v_accel.c.
-Added Mark Vojkovich's re-write of the accel code. It may only be clean for ViRGE DX
-at the moment. x11perf showed a couple artifacts in 'move window via parent'.
-In progress, attempt to call cfbScreenInit() functions after MapMem/EnterVT. Not
-working yet. Version stamped 0.4.0.
-
-02/22/99 KJB
-Macro change coming to add Mark's accel update. VGAOUT for old stuff and MEMOUT
-for new stuff? That way there's no confusion with the old INREG/OUTREG macros.
-Or maybe just stick with INREG/OUTREG for new stuff.
-
-01/30/99 KJB
-Version stamp 0.3.0. Changed Chipset flags to use PCI IDs exclusively, also use
-common/xf86PciInfo.h for PCI IDs rather than coding them in regs3v.h.
-
-11/28/98 KJB
-Bumped version stamp to 0.2, expect code in 3.9No. Cleaned up s3v.h and
-s3v_driver.c by removing unused definition & code sections. Added
-options set_mclk (from 3.3.2) and set_lcdclk (3.3.3 MX). Code support
-from 3.3.3 for ViRGE GX2 and MX+ is included.
-Disabled call to 32 bpp AccelInit to get -depth 24 -bpp 32 working again.
-
-11/27/98 KJB
-More 3.3.3 import.
-New registers saved, CR40,CR45,SR8,(for MX) SR29,SR45,SR55,SR56,SR57.
-Reviewed s3vdriver.h, rehs3v.h, newmmio.h, s3v_accel.c, s3v_driver.c.
-Added ViRGE MX, MX+ & GX2 support. Re-synced parts of mode save and init
-with 3.3.3 versions. Added timeout ability for WaitIdle() and friends.
-Added chipnames and numbers to Chipsets struct.
-
-11/26/98 KJB
-Import additions from 3.3.3, newmmio.h, regs3v.h,
-
-Trap fills disabled because they don't match cfb, pixmap cache & ImageWrite
-working, fixed depth 8 color loss on VT switches, INREG & OUTREG modified to
-use a single offset value instead of adding the base and offset together.
-
-11/18/98 KJB
-3.9Nn
-Acceleration working for Bitblt, ScreenToScreenCopy, Color 8x8 Rect fills,
-and Rect/Trap fills.
-Trap fills do not support transparency, so that needs to be exported to XAA.
-
-
-10/31/98 KJB
-Working depth 8, discolored dep 16 but runs, dep 24 screen goes black,
-C-A-Bkspc restores text console. At 3.9Nk tree level, module would not
-load in Loader server. why? Static server tested.
-
-10/29/98 KJB
-ModeInit() needs work, options are heavily #if'd to try and get 8bpp
-working.
-
-10/16/98 KJB
-General 4.0 architecture is setup. Presently at 3.9Nc level, if moved
-to a newer tree you will need to add the resource handling functions from
-Egbert (I haven't tackled that yet).
-
-At the moment the ScreenInit() function is coded to return FALSE. On my
-ViRGE DX card this version does not lock up, but it does destroy the
-video mode. Make sure you have an external terminal or network connection
-if you run it (or blindly do a restart from your main terminal). I make
-no guarantees that it won't hard lock other versions of ViRGE.
-
-I've left out the Alpha memory mapping, along with all option processing.
-Those will need to be done once the driver is minimally working.
-
-Note that everything in s3v_driver.c is MMIO only. There are a pair of
-PIO functions in s3v_pio.c, but that is the only place. See notes below
-about my ViRGE DX BIOS and why I needed to do this on my hardware.
-
-Other stuff...
-Some test stuff is assuming 8bpp, so 16 & 24 are broken.
-On my hardware, I am presently trying to get the Save/Restore sequence to
-recover the video mode. At the moment, when I run this driver, I get:
-ScreenInit() runs to completion.
-It returns FALSE, so the Server aborts.
-LeaveVT() is called, and runs to completion.
-The Server exits gracefully, but my monitor goes powersaver and the video
-mode is not recovered.
-
-
-
-TODO items
-----------
-1/30/03 General option "videoram" is ignored by the virge driver.
- (Meelis Roos)
-3/24/02 Xv reported to not work as secondary in Xinerama multihead.
- (xav on irc)
-3/24/02 DPMS doesn't fully disable the screen. Blue line across the
- center in all modes. (xav on irc)
-3/25/02 Secondary reports primary BIOS during int10 detection. ie:
-
-(II) S3VIRGE(1): VESA BIOS detected
-(II) S3VIRGE(1): VESA VBE Version 2.0
-(II) S3VIRGE(1): VESA VBE Total Mem: 4194240 kB
-(II) S3VIRGE(1): VESA VBE OEM: ATI RAGE128
-(II) S3VIRGE(1): VESA VBE OEM Software Rev: 1.0
-(II) S3VIRGE(1): VESA VBE OEM Vendor: ATI Technologies Inc.
-(II) S3VIRGE(1): VESA VBE OEM Product: R128
-(II) S3VIRGE(1): VESA VBE OEM Product Rev: 01.00
-
-(xav on irc)
-
-
-Check CR65 usage, bit 2 set based on S3_EARLY_SC? In my manual bit 2 is
-enable MMIO to RAMDAC registers.
-
-Notes:
-----------
-
-/config/cf/xfree86.cf
-
-have to add s3v to XF86CardDrivers for imake to make the
-drivers/s3v Makefile.
-
-To remake makefiles, after editing Imakefile, go to dir above drivers/s3v
-and do a 'make Makefiles'.
-
-For debug, make CDEBUGFLAGS='-g -DDEBUG', adding -DMetroLink enables
-timeout for VerticalRetraceWait().
-
-
-
-S3 ViRGE DX stuff:
-
-Card seems to power up (or BIOS forces) with MMIO disabled. All flavors are
-disabled, because CR53 comes up as 0. This may preclude using this card
-as the second device in a multi-head situation although David D. says that
-the new config. management stuff may help here.
-
-
-
-$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES,v 1.23 2003/02/13 03:21:33 dawes Exp $
diff --git a/configure.ac b/configure.ac
index 317b5bf..1c7e9f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,46 +20,51 @@
#
# Process this file with autoconf to produce a configure script
-AC_PREREQ(2.57)
+# Initialize Autoconf
+AC_PREREQ([2.60])
AC_INIT([xf86-video-s3virge],
- 1.10.4,
+ [1.10.4],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
- xf86-video-s3virge)
-
+ [xf86-video-s3virge])
AC_CONFIG_SRCDIR([Makefile.am])
-AM_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE([dist-bzip2])
-
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Checks for programs.
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+
+# Initialize libtool
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
-AC_PROG_CC
AH_TOP([#include "xorg-server.h"])
+# Define a configure option for an alternate module directory
AC_ARG_WITH(xorg-module-dir,
- AC_HELP_STRING([--with-xorg-module-dir=DIR],
+ AS_HELP_STRING([--with-xorg-module-dir=DIR],
[Default xorg module directory [[default=$libdir/xorg/modules]]]),
[moduledir="$withval"],
[moduledir="$libdir/xorg/modules"])
-# Checks for extensions
+# Store the list of server defined optional extensions in REQUIRED_MODULES
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
-# Checks for pkg-config packages
+# Obtain compiler/linker options for the driver dependencies
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
HAVE_XEXTPROTO_71="no")
AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
SAVE_CPPFLAGS="$CPPFLAGS"
@@ -69,8 +74,6 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
[#include "xorg-server.h"])
CPPFLAGS="$SAVE_CPPFLAGS"
-# Checks for header files.
-AC_HEADER_STDC
if test "x$XSERVER_LIBPCIACCESS" = xyes; then
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
@@ -78,20 +81,14 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
fi
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
-
-AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])
DRIVER_NAME=s3virge
AC_SUBST([DRIVER_NAME])
-XORG_MANPAGE_SECTIONS
-XORG_RELEASE_VERSION
-
-XORG_CHECK_LINUXDOC
-
-AC_OUTPUT([
- Makefile
- src/Makefile
- man/Makefile
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+ man/Makefile
])
+AC_OUTPUT
diff --git a/man/Makefile.am b/man/Makefile.am
index f0eb29b..b3688ce 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,27 +1,24 @@
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation.
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the copyright holders shall
-# not be used in advertising or otherwise to promote the sale, use or
-# other dealings in this Software without prior written authorization
-# from the copyright holders.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
#
drivermandir = $(DRIVER_MAN_DIR)
@@ -34,25 +31,11 @@ EXTRA_DIST = @DRIVER_NAME@.man
CLEANFILES = $(driverman_DATA)
-SED = sed
-# Strings to replace in man pages
-XORGRELSTRING = @PACKAGE_STRING@
- XORGMANNAME = X Version 11
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
-MAN_SUBSTS = \
- -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
- -e 's|__xservername__|Xorg|g' \
- -e 's|__xconfigfile__|xorg.conf|g' \
- -e 's|__projectroot__|$(prefix)|g' \
- -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
- -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
- -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
- -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
- -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
.man.$(DRIVER_MAN_SUFFIX):
- sed $(MAN_SUBSTS) < $< > $@
+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/src/s3v.h b/src/s3v.h
index 42b1f83..f4976ca 100644
--- a/src/s3v.h
+++ b/src/s3v.h
@@ -40,9 +40,6 @@ in this Software without prior written authorization from the XFree86 Project.
/* Everything using inb/outb, etc needs "compiler.h" */
#include "compiler.h"
-/* Drivers for PCI hardware need this */
-#include "xf86PciInfo.h"
-
/* Drivers that need to access the PCI config space directly need this */
#include "xf86Pci.h"
diff --git a/src/s3v_accel.c b/src/s3v_accel.c
index 528ab8a..7837e4a 100644
--- a/src/s3v_accel.c
+++ b/src/s3v_accel.c
@@ -28,7 +28,9 @@ in this Software without prior written authorization from the XFree86 Project.
#include "config.h"
#endif
+#include <unistd.h>
#include "s3v.h"
+#include "s3v_pciids.h"
#include "miline.h"
/* fb includes are in s3v.h */
diff --git a/src/s3v_dga.c b/src/s3v_dga.c
index 7ad42db..ecf8571 100644
--- a/src/s3v_dga.c
+++ b/src/s3v_dga.c
@@ -62,7 +62,6 @@ in this Software without prior written authorization from the XFree86 Project.
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Pci.h"
-#include "xf86PciInfo.h"
#include "xaa.h"
#include "xaalocal.h"
#include "s3v.h"
@@ -116,15 +115,15 @@ S3VDGAInit(ScreenPtr pScreen)
to be rewritten to accommodate depth changes in DGA mode */
if(0 /*pScrn->displayWidth != pMode->HDisplay*/) {
- newmodes = xrealloc(modes, (num + 2) * sizeof(DGAModeRec));
+ newmodes = realloc(modes, (num + 2) * sizeof(DGAModeRec));
oneMore = TRUE;
} else {
- newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec));
+ newmodes = realloc(modes, (num + 1) * sizeof(DGAModeRec));
oneMore = FALSE;
}
if(!newmodes) {
- xfree(modes);
+ free(modes);
return FALSE;
}
modes = newmodes;
diff --git a/src/s3v_driver.c b/src/s3v_driver.c
index 0928a7f..7064b1e 100644
--- a/src/s3v_driver.c
+++ b/src/s3v_driver.c
@@ -57,8 +57,9 @@ in this Software without prior written authorization from the XFree86 Project.
*/
- /* Most xf86 commons are already in s3v.h */
-#include "s3v.h"
+/* Most xf86 commons are already in s3v.h */
+#include "s3v.h"
+#include "s3v_pciids.h"
#include "globals.h"
@@ -383,7 +384,7 @@ S3VFreeRec(ScrnInfoPtr pScrn)
PVERB5(" S3VFreeRec\n");
if (pScrn->driverPrivate == NULL)
return;
- xfree(pScrn->driverPrivate);
+ free(pScrn->driverPrivate);
pScrn->driverPrivate = NULL;
}
@@ -435,7 +436,7 @@ S3VProbe(DriverPtr drv, int flags)
numDevSections, drv, &usedChips);
/* Free it since we don't need that list after this */
- xfree(devSections);
+ free(devSections);
if (numUsed <= 0)
return FALSE;
@@ -463,7 +464,7 @@ S3VProbe(DriverPtr drv, int flags)
foundScreen = TRUE;
}
}
- xfree(usedChips);
+ free(usedChips);
PVERB5(" S3VProbe end\n");
return foundScreen;
}
@@ -519,7 +520,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
*/
if (!vgaHWGetHWRec(pScrn))
return FALSE;
-
+ vgaHWSetStdFuncs(VGAHWPTR(pScrn));
/* Set pScrn->monitor */
pScrn->monitor = pScrn->confScreen->monitor;
@@ -601,7 +602,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
}
/* Process the options */
- if (!(ps3v->Options = xalloc(sizeof(S3VOptions))))
+ if (!(ps3v->Options = malloc(sizeof(S3VOptions))))
return FALSE;
memcpy(ps3v->Options, S3VOptions, sizeof(S3VOptions));
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ps3v->Options);
@@ -797,7 +798,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
#ifndef XSERVER_LIBPCIACCESS
if (pEnt->resources) {
- xfree(pEnt);
+ free(pEnt);
S3VFreeRec(pScrn);
return FALSE;
}
@@ -851,7 +852,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
} else {
ps3v->ChipRev = PCI_DEV_REVISION(ps3v->PciInfo);
}
- xfree(pEnt);
+ free(pEnt);
/*
* This shouldn't happen because such problems should be caught in
@@ -1328,8 +1329,11 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
/* Load XAA if needed */
if (!ps3v->NoAccel || ps3v->hwcursor ) {
if (!xf86LoadSubModule(pScrn, "xaa")) {
- S3VFreeRec(pScrn);
- return FALSE;
+ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, VERBLEV,
+ "Falling back to shadowfb\n");
+ ps3v->NoAccel = 1;
+ ps3v->hwcursor = 0;
+ ps3v->shadowFB = 1;
}
}
@@ -2326,8 +2330,6 @@ S3VScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pScrn = xf86Screens[pScreen->myNum];
/* Get S3V rec */
ps3v = S3VPTR(pScrn);
- /* Make sure we have card access */
-/* xf86EnableAccess(pScrn);*/
/* Map MMIO regs and framebuffer */
if( !S3VMapMem(pScrn) )
return FALSE;
@@ -2525,7 +2527,7 @@ S3VInternalScreenInit( int scrnIndex, ScreenPtr pScreen)
if(ps3v->shadowFB) {
ps3v->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
- ps3v->ShadowPtr = xalloc(ps3v->ShadowPitch * height);
+ ps3v->ShadowPtr = malloc(ps3v->ShadowPitch * height);
displayWidth = ps3v->ShadowPitch / (pScrn->bitsPerPixel >> 3);
FBStart = ps3v->ShadowPtr;
} else {
@@ -3309,7 +3311,7 @@ S3VCloseScreen(int scrnIndex, ScreenPtr pScreen)
if (ps3v->AccelInfoRec)
XAADestroyInfoRec(ps3v->AccelInfoRec);
if (ps3v->DGAModes)
- xfree(ps3v->DGAModes);
+ free(ps3v->DGAModes);
pScrn->vtSema = FALSE;
@@ -3518,11 +3520,17 @@ S3VEnableMmio(ScrnInfoPtr pScrn)
S3VPtr ps3v;
IOADDRESS vgaCRIndex, vgaCRReg;
unsigned char val;
-
+ unsigned int PIOOffset = 0;
+
PVERB5(" S3VEnableMmio\n");
hwp = VGAHWPTR(pScrn);
ps3v = S3VPTR(pScrn);
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+ PIOOffset = hwp->PIOOffset;
+#endif
+
/*
* enable chipset (seen on uninitialized secondary cards)
* might not be needed once we use the VGA softbooter
@@ -3535,17 +3543,17 @@ S3VEnableMmio(ScrnInfoPtr pScrn)
* to be set correctly already and MMIO _has_ to be
* enabled.
*/
- val = inb(hwp->PIOOffset + 0x3C3); /*@@@EE*/
- outb(hwp->PIOOffset + 0x3C3, val | 0x01);
+ val = inb(PIOOffset + 0x3C3); /*@@@EE*/
+ outb(PIOOffset + 0x3C3, val | 0x01);
/*
* set CR registers to color mode
* in mono mode extended CR registers
* are not accessible. (EE 05/04/99)
*/
- val = inb(hwp->PIOOffset + VGA_MISC_OUT_R); /*@@@EE*/
- outb(hwp->PIOOffset + VGA_MISC_OUT_W, val | 0x01);
+ val = inb(PIOOffset + VGA_MISC_OUT_R); /*@@@EE*/
+ outb(PIOOffset + VGA_MISC_OUT_W, val | 0x01);
vgaHWGetIOBase(hwp); /* Get VGA I/O base */
- vgaCRIndex = hwp->PIOOffset + hwp->IOBase + 4;
+ vgaCRIndex = PIOOffset + hwp->IOBase + 4;
vgaCRReg = vgaCRIndex + 1;
#if 1
/*
@@ -3564,7 +3572,7 @@ S3VEnableMmio(ScrnInfoPtr pScrn)
/* Enable new MMIO, if TRIO mmio is already */
/* enabled, then it stays enabled. */
outb(vgaCRReg, ps3v->EnableMmioCR53 | 0x08);
- outb(hwp->PIOOffset + VGA_MISC_OUT_W, val);
+ outb(PIOOffset + VGA_MISC_OUT_W, val);
if (S3_TRIO_3D_SERIES(ps3v->Chipset)) {
outb(vgaCRIndex, 0x40);
val = inb(vgaCRReg);
@@ -3586,7 +3594,10 @@ S3VDisableMmio(ScrnInfoPtr pScrn)
hwp = VGAHWPTR(pScrn);
ps3v = S3VPTR(pScrn);
- vgaCRIndex = hwp->PIOOffset + hwp->IOBase + 4;
+ vgaCRIndex = hwp->IOBase + 4;
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
+ vgaCRIndex += hwp->PIOOffset;
+#endif
vgaCRReg = vgaCRIndex + 1;
outb(vgaCRIndex, 0x53);
/* Restore register's original state */
diff --git a/src/s3v_hwcurs.c b/src/s3v_hwcurs.c
index 53c539f..58e8fd9 100644
--- a/src/s3v_hwcurs.c
+++ b/src/s3v_hwcurs.c
@@ -39,6 +39,7 @@ in this Software without prior written authorization from the XFree86 Project.
#include "s3v.h"
+#include "s3v_pciids.h"
/* protos */
diff --git a/src/s3v_i2c.c b/src/s3v_i2c.c
index cbac21f..6bbfd1e 100644
--- a/src/s3v_i2c.c
+++ b/src/s3v_i2c.c
@@ -58,7 +58,6 @@ in this Software without prior written authorization from the XFree86 Project.
#include "compiler.h"
#include "xf86Pci.h"
-#include "xf86PciInfo.h"
#include "vgaHW.h"
diff --git a/src/s3v_pciids.h b/src/s3v_pciids.h
new file mode 100644
index 0000000..5d11333
--- /dev/null
+++ b/src/s3v_pciids.h
@@ -0,0 +1,18 @@
+#ifndef S3V_PCIIDS_H
+#define S3V_PCIIDS_H
+
+#define PCI_VENDOR_S3 0x5333
+#define PCI_CHIP_VIRGE 0x5631
+#define PCI_CHIP_TRIO 0x8811
+#define PCI_CHIP_TRIO64UVP 0x8814
+#define PCI_CHIP_VIRGE_VX 0x883D
+#define PCI_CHIP_TRIO64V2_DXGX 0x8901
+#define PCI_CHIP_Trio3D 0x8904
+#define PCI_CHIP_VIRGE_DXGX 0x8A01
+#define PCI_CHIP_VIRGE_GX2 0x8A10
+#define PCI_CHIP_Trio3D_2X 0x8A13
+#define PCI_CHIP_VIRGE_MX 0x8C01
+#define PCI_CHIP_VIRGE_MXPLUS 0x8C02
+#define PCI_CHIP_VIRGE_MXP 0x8C03
+
+#endif /* S3V_PCIIDS_H */
diff --git a/src/s3v_shadow.c b/src/s3v_shadow.c
index e2e1269..82b763f 100644
--- a/src/s3v_shadow.c
+++ b/src/s3v_shadow.c
@@ -60,7 +60,6 @@ in this Software without prior written authorization from the XFree86 Project.
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86PciInfo.h"
#include "xf86Pci.h"
#include "shadowfb.h"
#include "servermd.h"
diff --git a/src/s3v_xv.c b/src/s3v_xv.c
index 7e7c243..2466789 100644
--- a/src/s3v_xv.c
+++ b/src/s3v_xv.c
@@ -40,8 +40,9 @@ in this Software without prior written authorization from the XFree86 Project.
#include "config.h"
#endif
- /* Most xf86 commons are already in s3v.h */
-#include "s3v.h"
+/* Most xf86 commons are already in s3v.h */
+#include "s3v.h"
+#include "s3v_pciids.h"
#if 0
#define OFF_DELAY 250 /* milliseconds */
@@ -137,7 +138,7 @@ void S3VInitVideo(ScreenPtr pScreen)
adaptors = &newAdaptor;
} else {
newAdaptors = /* need to free this someplace */
- xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
+ malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
if(newAdaptors) {
memcpy(newAdaptors, adaptors, num_adaptors *
sizeof(XF86VideoAdaptorPtr));
@@ -152,7 +153,7 @@ void S3VInitVideo(ScreenPtr pScreen)
xf86XVScreenInit(pScreen, adaptors, num_adaptors);
if(newAdaptors)
- xfree(newAdaptors);
+ free(newAdaptors);
}
/* client libraries expect an encoding */
@@ -301,10 +302,10 @@ S3VAllocAdaptor(ScrnInfoPtr pScrn)
if(!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn)))
return NULL;
- if(!(pPriv = xcalloc(1, sizeof(S3VPortPrivRec) +
+ if(!(pPriv = calloc(1, sizeof(S3VPortPrivRec) +
(sizeof(DevUnion) * S3V_MAX_PORTS))))
{
- xfree(adapt);
+ free(adapt);
return NULL;
}
|