Mercurial > mplayer.hg
annotate vidix/nvidia_vid.c @ 22874:9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
author | ben |
---|---|
date | Sun, 01 Apr 2007 13:58:06 +0000 |
parents | 6c57087c5a2d |
children | 8b0cfdc71759 |
rev | line source |
---|---|
22850 | 1 /* |
2 nvidia_vid - VIDIX based video driver for NVIDIA chips | |
3 Copyrights 2003 - 2004 Sascha Sommer. This file is based on sources from | |
4 RIVATV (rivatv.sf.net) | |
5 Licence: GPL | |
6 WARNING: THIS DRIVER IS IN BETA STAGE | |
7 | |
8 multi buffer support and TNT2 fixes by Dmitry Baryshkov | |
9 */ | |
10 | |
11 | |
12 #include <errno.h> | |
13 #include <stdio.h> | |
14 #include <stdlib.h> | |
15 #include <string.h> | |
16 #include <math.h> | |
17 #include <inttypes.h> | |
18 #include <unistd.h> | |
19 | |
20 | |
21 #include "vidix.h" | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
22 #include "vidixlib.h" |
22850 | 23 #include "fourcc.h" |
24 #include "../libdha/libdha.h" | |
25 #include "../libdha/pci_ids.h" | |
26 #include "../libdha/pci_names.h" | |
27 #include "../config.h" | |
28 #include "../libavutil/common.h" | |
29 #include "../mpbswap.h" | |
30 | |
31 | |
32 pciinfo_t pci_info; | |
33 | |
34 | |
35 #define MAX_FRAMES 3 | |
36 #define NV04_BES_SIZE 1024*2000*4 | |
37 | |
38 | |
39 static vidix_capability_t nvidia_cap = { | |
40 "NVIDIA RIVA OVERLAY DRIVER", | |
41 "Sascha Sommer <saschasommer@freenet.de>", | |
42 TYPE_OUTPUT, | |
43 { 0, 0, 0, 0 }, | |
44 2046, | |
45 2046, | |
46 4, | |
47 4, | |
48 -1, | |
49 FLAG_UPSCALER|FLAG_DOWNSCALER, | |
50 VENDOR_NVIDIA2, | |
51 -1, | |
52 { 0, 0, 0, 0 } | |
53 }; | |
54 | |
55 #define NV_ARCH_03 0x03 | |
56 #define NV_ARCH_04 0x04 | |
57 #define NV_ARCH_10 0x10 | |
58 #define NV_ARCH_20 0x20 | |
59 #define NV_ARCH_30 0x30 | |
60 | |
61 // since no useful information whatsoever is passed | |
62 // to the equalizer functions we need this | |
63 static struct { | |
64 uint32_t lum; // luminance (brightness + contrast) | |
65 uint32_t chrom; // chrominance (saturation + hue) | |
66 uint8_t red_off; // for NV03/NV04 | |
67 uint8_t green_off; | |
68 uint8_t blue_off; | |
69 vidix_video_eq_t vals; | |
70 } eq; | |
71 | |
72 struct nvidia_cards { | |
73 unsigned short chip_id; | |
74 unsigned short arch; | |
75 }; | |
76 | |
77 | |
78 static struct nvidia_cards nvidia_card_ids[] = { | |
79 /*NV03*/ | |
80 {DEVICE_NVIDIA2_RIVA128, NV_ARCH_03}, | |
81 {DEVICE_NVIDIA2_RIVA128ZX,NV_ARCH_03}, | |
82 /*NV04*/ | |
83 {DEVICE_NVIDIA_NV4_RIVA_TNT,NV_ARCH_04}, | |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
84 {DEVICE_NVIDIA_NV5_RIVA_TNT2_TNT2,NV_ARCH_04}, |
22850 | 85 {DEVICE_NVIDIA_NV5_RIVA_TNT2,NV_ARCH_04}, |
86 {DEVICE_NVIDIA_NV5_RIVA_TNT22,NV_ARCH_04}, | |
87 {DEVICE_NVIDIA_NV5_RIVA_TNT23,NV_ARCH_04}, | |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
88 {DEVICE_NVIDIA_NV6_VANTA_VANTA_LT,NV_ARCH_04}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
89 {DEVICE_NVIDIA_NV5M64_RIVA_TNT2,NV_ARCH_04}, |
22850 | 90 {DEVICE_NVIDIA_NV6_VANTA,NV_ARCH_04}, |
91 {DEVICE_NVIDIA_NV6_VANTA2,NV_ARCH_04}, | |
92 {DEVICE_NVIDIA2_TNT,NV_ARCH_04}, | |
93 {DEVICE_NVIDIA2_TNT2,NV_ARCH_04}, | |
94 {DEVICE_NVIDIA2_VTNT2,NV_ARCH_04}, | |
95 {DEVICE_NVIDIA2_UTNT2 ,NV_ARCH_04}, | |
96 {DEVICE_NVIDIA2_ITNT2,NV_ARCH_04}, | |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
97 {DEVICE_NVIDIA_NV5_ALADDIN_TNT2,NV_ARCH_30}, |
22850 | 98 /*NV10*/ |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
99 {DEVICE_NVIDIA_NV18_GEFORCE_PCX,NV_ARCH_10}, |
22850 | 100 {DEVICE_NVIDIA_NV10_GEFORCE_256,NV_ARCH_10}, |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
101 {DEVICE_NVIDIA_NV10DDR_GEFORCE_256,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
102 {DEVICE_NVIDIA_NV10GL_QUADRO,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
103 {DEVICE_NVIDIA_NV11_GEFORCE2_MX_MX,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
104 {DEVICE_NVIDIA_NV11DDR_GEFORCE2_MX,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
105 {DEVICE_NVIDIA_NV11DDR_GEFORCE2_MX,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
106 {DEVICE_NVIDIA_NV11_GEFORCE2_GO,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
107 {DEVICE_NVIDIA_NV11GL_QUADRO2_MXR_EX_GO,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
108 {DEVICE_NVIDIA_NV15_GEFORCE2_GTS_PRO,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
109 {DEVICE_NVIDIA_NV15DDR_GEFORCE2_TI,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
110 {DEVICE_NVIDIA_NV15BR_GEFORCE2_ULTRA,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
111 {DEVICE_NVIDIA_NV15GL_QUADRO2_PRO,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
112 {DEVICE_NVIDIA_NV17_GEFORCE4_MX,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
113 {DEVICE_NVIDIA_NV17_GEFORCE4_MX2,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
114 {DEVICE_NVIDIA_NV17_GEFORCE4_MX3,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
115 {DEVICE_NVIDIA_NV17_GEFORCE4_MX4,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
116 {DEVICE_NVIDIA_NV17_GEFORCE4_440,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
117 {DEVICE_NVIDIA_NV17_GEFORCE4_420,NV_ARCH_10}, |
22850 | 118 {DEVICE_NVIDIA_NV17_GEFORCE4_4202,NV_ARCH_10}, |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
119 {DEVICE_NVIDIA_NV17_GEFORCE4_460,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
120 {DEVICE_NVIDIA_NV17GL_QUADRO4_550,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
121 {DEVICE_NVIDIA_NV17_GEFORCE4_4203,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
122 {DEVICE_NVIDIA_NV17GL_QUADRO4_200_400,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
123 {DEVICE_NVIDIA_NV17GL_QUADRO4_5502,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
124 {DEVICE_NVIDIA_NV17GL_QUADRO4_550,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
125 {DEVICE_NVIDIA_NV17_GEFORCE4_410,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
126 {DEVICE_NVIDIA_NV18_GEFORCE4_MX,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
127 {DEVICE_NVIDIA_NV18_GEFORCE4_MX2,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
128 {DEVICE_NVIDIA_NV18_GEFORCE4_MX3,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
129 {DEVICE_NVIDIA_NV18_GEFORCE4_MX4,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
130 {DEVICE_NVIDIA_NV18_GEFORCE4_MX5,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
131 {DEVICE_NVIDIA_NV18M_GEFORCE4_448,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
132 {DEVICE_NVIDIA_NV18M_GEFORCE4_488,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
133 {DEVICE_NVIDIA_NV18GL_QUADRO_FX,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
134 {DEVICE_NVIDIA_NV18GL_QUADRO4_580,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
135 {DEVICE_NVIDIA_NV18GL_QUADRO4_NVS,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
136 {DEVICE_NVIDIA_NV18GL_QUADRO4_380,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
137 {DEVICE_NVIDIA_NV18M_GEFORCE4_4482,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
138 {DEVICE_NVIDIA_NVCRUSH11_GEFORCE2_MX,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
139 {DEVICE_NVIDIA_NFORCE2_AGP_DIFFERENT,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
140 {DEVICE_NVIDIA_NFORCE2_AGP,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
141 {DEVICE_NVIDIA_NV18_GEFORCE4_MX5,NV_ARCH_10}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
142 {DEVICE_NVIDIA_NV18_GEFORCE_PCX,NV_ARCH_10}, |
22850 | 143 /*NV20*/ |
144 {DEVICE_NVIDIA_NV20_GEFORCE3,NV_ARCH_20}, | |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
145 {DEVICE_NVIDIA_NV20_GEFORCE3_TI,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
146 {DEVICE_NVIDIA_NV20_GEFORCE3_TI2,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
147 {DEVICE_NVIDIA_NV20DCC_QUADRO_DCC,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
148 {DEVICE_NVIDIA_NV25_GEFORCE4_TI,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
149 {DEVICE_NVIDIA_NV25_GEFORCE4_TI2,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
150 {DEVICE_NVIDIA_NV25_GEFORCE4_TI3,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
151 {DEVICE_NVIDIA_NV25_GEFORCE4_TI4,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
152 {DEVICE_NVIDIA_NV25GL_QUADRO4_900,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
153 {DEVICE_NVIDIA_NV25GL_QUADRO4_750,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
154 {DEVICE_NVIDIA_NV25GL_QUADRO4_700,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
155 {DEVICE_NVIDIA_NV28_GEFORCE4_TI,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
156 {DEVICE_NVIDIA_NV28_GEFORCE4_TI2,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
157 {DEVICE_NVIDIA_NV28_GEFORCE4_TI3,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
158 {DEVICE_NVIDIA_NV28_GEFORCE4_TI4,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
159 {DEVICE_NVIDIA_NV28GL_QUADRO4_980,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
160 {DEVICE_NVIDIA_NV28GL_QUADRO4_780,NV_ARCH_20}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
161 {DEVICE_NVIDIA_NV28GLM_QUADRO4_700,NV_ARCH_20}, |
22850 | 162 /*NV30*/ |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
163 {DEVICE_NVIDIA_NV30_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
164 {DEVICE_NVIDIA_NV30_GEFORCE_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
165 {DEVICE_NVIDIA_NV30_GEFORCE_FX3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
166 {DEVICE_NVIDIA_NV30GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
167 {DEVICE_NVIDIA_NV30GL_QUADRO_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
168 {DEVICE_NVIDIA_NV31_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
169 {DEVICE_NVIDIA_NV31_GEFORCE_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
170 {DEVICE_NVIDIA_NV31,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
171 {DEVICE_NVIDIA_NV31_GEFORCE_FX3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
172 {DEVICE_NVIDIA_NV31M,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
173 {DEVICE_NVIDIA_NV31M_PRO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
174 {DEVICE_NVIDIA_NV31M_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
175 {DEVICE_NVIDIA_NV31M_GEFORCE_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
176 {DEVICE_NVIDIA_NVIDIA_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
177 {DEVICE_NVIDIA_NV31GLM,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
178 {DEVICE_NVIDIA_NV31GLM_PRO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
179 {DEVICE_NVIDIA_NV31GLM_PRO2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
180 {DEVICE_NVIDIA_NV34_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
181 {DEVICE_NVIDIA_NV34_GEFORCE_FX2,NV_ARCH_30}, |
22850 | 182 {DEVICE_NVIDIA_NV34_GEFORCE_FX3,NV_ARCH_30}, |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
183 {DEVICE_NVIDIA_NV34_GEFORCE_FX4,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
184 {DEVICE_NVIDIA_NV34M_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
185 {DEVICE_NVIDIA_NV34M_GEFORCE_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
186 {DEVICE_NVIDIA_NV34_GEFORCE_FX5,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
187 {DEVICE_NVIDIA_NV34_GEFORCE_FX6,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
188 {DEVICE_NVIDIA_NV34M_GEFORCE_FX3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
189 {DEVICE_NVIDIA_NV34M_GEFORCE_FX4,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
190 {DEVICE_NVIDIA_NV34GL_QUADRO_NVS,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
191 {DEVICE_NVIDIA_NV34GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
192 {DEVICE_NVIDIA_NV34GLM_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
193 {DEVICE_NVIDIA_NV34_GEFORCE_FX7,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
194 {DEVICE_NVIDIA_NV34GL,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
195 {DEVICE_NVIDIA_NV35_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
196 {DEVICE_NVIDIA_NV35_GEFORCE_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
197 {DEVICE_NVIDIA_NV35_GEFORCE_FX3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
198 {DEVICE_NVIDIA_NV38_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
199 {DEVICE_NVIDIA_NV35_GEFORCE_FX4,NV_ARCH_30}, |
22850 | 200 {DEVICE_NVIDIA_NV35GL_QUADRO_FX,NV_ARCH_30}, |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
201 {DEVICE_NVIDIA_NV35GL_QUADRO_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
202 {DEVICE_NVIDIA_NV35_GEFORCE_PCX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
203 {DEVICE_NVIDIA_NV36_1_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
204 {DEVICE_NVIDIA_NV36_2_GEFORCE_FX,NV_ARCH_30}, |
22850 | 205 {DEVICE_NVIDIA_NV36_GEFORCE_FX,NV_ARCH_30}, |
22874
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
206 {DEVICE_NVIDIA_NV36_4_GEFORCE_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
207 {DEVICE_NVIDIA_NV36_5,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
208 {DEVICE_NVIDIA_NV36_GEFORCE_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
209 {DEVICE_NVIDIA_NV36_GEFORCE_FX3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
210 {DEVICE_NVIDIA_NV36_GEFORCE_PCX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
211 {DEVICE_NVIDIA_NV36M_PRO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
212 {DEVICE_NVIDIA_NV36MAP,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
213 {DEVICE_NVIDIA_NV36_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
214 {DEVICE_NVIDIA_NV36GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
215 {DEVICE_NVIDIA_NV36GL,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
216 {DEVICE_NVIDIA_NV36_GEFORCE_PCX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
217 {DEVICE_NVIDIA_NV35_GEFORCE_PCX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
218 {DEVICE_NVIDIA_NV37GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
219 {DEVICE_NVIDIA_NV37GL_QUADRO_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
220 {DEVICE_NVIDIA_NV38GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
221 /* FIXME are they different? */ |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
222 {DEVICE_NVIDIA_NV40_GEFORCE_6800,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
223 {DEVICE_NVIDIA_NV40_GEFORCE_68002,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
224 {DEVICE_NVIDIA_NV40_2_GEFORCE_6800,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
225 {DEVICE_NVIDIA_NV40_3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
226 {DEVICE_NVIDIA_NV40_GEFORCE_68003,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
227 {DEVICE_NVIDIA_NV40_GEFORCE_68004,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
228 {DEVICE_NVIDIA_NV40_GEFORCE_68005,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
229 {DEVICE_NVIDIA_NV40_GEFORCE_68006,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
230 {DEVICE_NVIDIA_NV40_GEFORCE_68007,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
231 {DEVICE_NVIDIA_NV40_GEFORCE_68008,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
232 {DEVICE_NVIDIA_NV40_GEFORCE_68009,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
233 {DEVICE_NVIDIA_NV40_GEFORCE_680010,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
234 {DEVICE_NVIDIA_NV40_GEFORCE_680011,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
235 {DEVICE_NVIDIA_NV40_GEFORCE_680012,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
236 {DEVICE_NVIDIA_NV40_GEFORCE_68008,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
237 {DEVICE_NVIDIA_NV40GL,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
238 {DEVICE_NVIDIA_NV40GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
239 {DEVICE_NVIDIA_NV40GL_QUADRO_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
240 {DEVICE_NVIDIA_NV41_GEFORCE_6800,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
241 {DEVICE_NVIDIA_NV41_1_GEFORCE_6800,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
242 {DEVICE_NVIDIA_NV41_2_GEFORCE_6800,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
243 {DEVICE_NVIDIA_NV41_8_GEFORCE_GO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
244 {DEVICE_NVIDIA_NV41_9_GEFORCE_GO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
245 {DEVICE_NVIDIA_NV41_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
246 {DEVICE_NVIDIA_NV41_QUADRO_FX2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
247 {DEVICE_NVIDIA_NV41GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
248 {DEVICE_NVIDIA_NV41GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
249 {DEVICE_NVIDIA_NV40_GEFORCE_6800_GEFORCE,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
250 {DEVICE_NVIDIA_NV43_GEFORCE_6600_GEFORCE,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
251 {DEVICE_NVIDIA_NV43_GEFORCE_6600_GEFORCE2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
252 {DEVICE_NVIDIA_NV43_GEFORCE_6200,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
253 {DEVICE_NVIDIA_NV43_GEFORCE_62002,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
254 {DEVICE_NVIDIA_NV43_GEFORCE_6600,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
255 {DEVICE_NVIDIA_NV43_GEFORCE_66002,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
256 {DEVICE_NVIDIA_NV43_GEFORCE_66003,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
257 {DEVICE_NVIDIA_NV43_GEFORCE_66004,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
258 {DEVICE_NVIDIA_NV43_GEFORCE_66005,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
259 {DEVICE_NVIDIA_NV43_GEFORCE_GO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
260 {DEVICE_NVIDIA_NV43_GEFORCE_GO2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
261 {DEVICE_NVIDIA_NV43_GEFORCE_GO3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
262 {DEVICE_NVIDIA_NV43_GEFORCE_GO4,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
263 {DEVICE_NVIDIA_NV43_GEFORCE_GO5,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
264 {DEVICE_NVIDIA_NV43_GEFORCE_GO6,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
265 {DEVICE_NVIDIA_NV43_GEFORCE_6610,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
266 {DEVICE_NVIDIA_NV43GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
267 {DEVICE_NVIDIA_GEFORCE_6100_NFORCE,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
268 {DEVICE_NVIDIA_GEFORCE_6100_NFORCE2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
269 {DEVICE_NVIDIA_GEFORCE_6100_NFORCE3,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
270 {DEVICE_NVIDIA_GEFORCE_6100_NFORCE4,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
271 {DEVICE_NVIDIA_C51G_GEFORCE_6100,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
272 {DEVICE_NVIDIA_C51PV_GEFORCE_6150,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
273 {DEVICE_NVIDIA_NV44_GEFORCE_6200,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
274 {DEVICE_NVIDIA_NV44_GEFORCE_62002,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
275 {DEVICE_NVIDIA_NV44_GEFORCE_62003,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
276 {DEVICE_NVIDIA_NV44_GEFORCE_GO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
277 {DEVICE_NVIDIA_NV44_QUADRO_NVS,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
278 {DEVICE_NVIDIA_GEFORCE_GO_6200,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
279 {DEVICE_NVIDIA_NV44A_GEFORCE_6200,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
280 {DEVICE_NVIDIA_NV45GL_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
281 {DEVICE_NVIDIA_GEFORCE_GO_7200,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
282 {DEVICE_NVIDIA_QUADRO_NVS_110M,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
283 {DEVICE_NVIDIA_GEFORCE_GO_7400,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
284 {DEVICE_NVIDIA_QUADRO_NVS_110M2,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
285 {DEVICE_NVIDIA_QUADRO_FX_350,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
286 {DEVICE_NVIDIA_G70_GEFORCE_7300,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
287 {DEVICE_NVIDIA_GEFORCE_7300_GS,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
288 {DEVICE_NVIDIA_G70_GEFORCE_7600,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
289 {DEVICE_NVIDIA_G70_GEFORCE_76002,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
290 {DEVICE_NVIDIA_GEFORCE_7600_GS,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
291 {DEVICE_NVIDIA_G70_GEFORCE_GO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
292 {DEVICE_NVIDIA_QUADRO_FX_560,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
293 {DEVICE_NVIDIA_G70_GEFORCE_7800,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
294 {DEVICE_NVIDIA_G70_GEFORCE_78002,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
295 {DEVICE_NVIDIA_G70_GEFORCE_78003,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
296 {DEVICE_NVIDIA_G70_GEFORCE_78004,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
297 {DEVICE_NVIDIA_G70_GEFORCE_78005,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
298 {DEVICE_NVIDIA_GEFORCE_GO_7800,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
299 {DEVICE_NVIDIA_GEFORCE_7900_GTX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
300 {DEVICE_NVIDIA_GEFORCE_7900_GT,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
301 {DEVICE_NVIDIA_GEFORCE_7900_GS,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
302 {DEVICE_NVIDIA_GEFORCE_GO_7900,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
303 {DEVICE_NVIDIA_GEFORCE_GO_79002,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
304 {DEVICE_NVIDIA_GE_FORCE_GO,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
305 {DEVICE_NVIDIA_G70GL_QUADRO_FX4500,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
306 {DEVICE_NVIDIA_G71_QUADRO_FX,NV_ARCH_30}, |
9a8f6901e888
updated pci ids list, fixed vidix drivers compilation and added nearly exhaustive pci ids for nvidia driver
ben
parents:
22858
diff
changeset
|
307 {DEVICE_NVIDIA_G71_QUADRO_FX2,NV_ARCH_30} |
22850 | 308 }; |
309 | |
310 | |
311 static int find_chip(unsigned chip_id){ | |
312 unsigned i; | |
313 for(i = 0;i < sizeof(nvidia_card_ids)/sizeof(struct nvidia_cards);i++) | |
314 { | |
315 if(chip_id == nvidia_card_ids[i].chip_id)return i; | |
316 } | |
317 return -1; | |
318 } | |
319 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
320 static int nv_probe(int verbose, int force){ |
22850 | 321 pciinfo_t lst[MAX_PCI_DEVICES]; |
322 unsigned i,num_pci; | |
323 int err; | |
324 | |
325 if (force) | |
326 printf("[nvidia_vid]: warning: forcing not supported yet!\n"); | |
327 err = pci_scan(lst,&num_pci); | |
328 if(err){ | |
329 printf("[nvidia_vid] Error occurred during pci scan: %s\n",strerror(err)); | |
330 return err; | |
331 } | |
332 else { | |
333 err = ENXIO; | |
334 for(i=0; i < num_pci; i++){ | |
335 if(lst[i].vendor == VENDOR_NVIDIA2 || lst[i].vendor == VENDOR_NVIDIA){ | |
336 int idx; | |
337 const char *dname; | |
338 idx = find_chip(lst[i].device); | |
339 if(idx == -1) | |
340 continue; | |
341 dname = pci_device_name(lst[i].vendor, lst[i].device); | |
342 dname = dname ? dname : "Unknown chip"; | |
343 printf("[nvidia_vid] Found chip: %s\n", dname); | |
344 if ((lst[i].command & PCI_COMMAND_IO) == 0){ | |
345 printf("[nvidia_vid] Device is disabled, ignoring\n"); | |
346 continue; | |
347 } | |
348 nvidia_cap.device_id = lst[i].device; | |
349 err = 0; | |
350 memcpy(&pci_info, &lst[i], sizeof(pciinfo_t)); | |
351 break; | |
352 } | |
353 } | |
354 } | |
355 if(err && verbose) printf("[nvidia_vid] Can't find chip\n"); | |
356 return err; | |
357 } | |
358 | |
359 | |
360 | |
361 | |
362 /* | |
363 * PCI-Memory IO access macros. | |
364 */ | |
365 | |
366 #define MEM_BARRIER() __asm__ __volatile__ ("" : : : "memory") | |
367 | |
368 #undef VID_WR08 | |
369 #define VID_WR08(p,i,val) ({ MEM_BARRIER(); ((uint8_t *)(p))[(i)]=(val); }) | |
370 #undef VID_RD08 | |
371 #define VID_RD08(p,i) ({ MEM_BARRIER(); ((uint8_t *)(p))[(i)]; }) | |
372 | |
373 #undef VID_WR32 | |
374 #define VID_WR32(p,i,val) ({ MEM_BARRIER(); ((uint32_t *)(p))[(i)/4]=val; }) | |
375 #undef VID_RD32 | |
376 #define VID_RD32(p,i) ({ MEM_BARRIER(); ((uint32_t *)(p))[(i)/4]; }) | |
377 | |
378 #define VID_AND32(p,i,val) VID_WR32(p,i,VID_RD32(p,i)&(val)) | |
379 #define VID_OR32(p,i,val) VID_WR32(p,i,VID_RD32(p,i)|(val)) | |
380 #define VID_XOR32(p,i,val) VID_WR32(p,i,VID_RD32(p,i)^(val)) | |
381 | |
382 | |
383 | |
384 | |
385 | |
386 | |
387 struct rivatv_chip { | |
388 volatile uint32_t *PMC; /* general control */ | |
389 volatile uint32_t *PME; /* multimedia port */ | |
390 volatile uint32_t *PFB; /* framebuffer control */ | |
391 volatile uint32_t *PVIDEO; /* overlay control */ | |
392 volatile uint8_t *PCIO; /* SVGA (CRTC, ATTR) registers */ | |
393 volatile uint8_t *PVIO; /* SVGA (MISC, GRAPH, SEQ) registers */ | |
394 volatile uint32_t *PRAMIN; /* instance memory */ | |
395 volatile uint32_t *PRAMHT; /* hash table */ | |
396 volatile uint32_t *PRAMFC; /* fifo context table */ | |
397 volatile uint32_t *PRAMRO; /* fifo runout table */ | |
398 volatile uint32_t *PFIFO; /* fifo control region */ | |
399 volatile uint32_t *FIFO; /* fifo channels (USER) */ | |
400 volatile uint32_t *PGRAPH; /* graphics engine */ | |
401 | |
402 unsigned long fbsize; /* framebuffer size */ | |
403 int arch; /* compatible NV_ARCH_XX define */ | |
404 int realarch; /* real architecture */ | |
405 void (* lock) (struct rivatv_chip *, int); | |
406 }; | |
407 typedef struct rivatv_chip rivatv_chip; | |
408 | |
409 | |
410 struct rivatv_info { | |
411 unsigned int use_colorkey; | |
412 unsigned int colorkey; /* saved xv colorkey*/ | |
413 unsigned int vidixcolorkey; /*currently used colorkey*/ | |
414 unsigned int depth; | |
415 unsigned int format; | |
416 unsigned int pitch; | |
417 unsigned int width,height; | |
418 unsigned int d_width,d_height; /*scaled width && height*/ | |
419 unsigned int wx,wy; /*window x && y*/ | |
420 unsigned int screen_x; /*screen width*/ | |
421 unsigned int screen_y; /*screen height*/ | |
422 unsigned long buffer_size; /* size of the image buffer */ | |
423 struct rivatv_chip chip; /* NV architecture structure */ | |
424 void* video_base; /* virtual address of control region */ | |
425 void* control_base; /* virtual address of fb region */ | |
426 void* picture_base; /* direct pointer to video picture */ | |
427 unsigned long picture_offset; /* offset of video picture in frame buffer */ | |
428 // struct rivatv_dma dma; /* DMA structure */ | |
429 unsigned int cur_frame; | |
430 unsigned int num_frames; /* number of buffers */ | |
431 int bps; /* bytes per line */ | |
432 }; | |
433 typedef struct rivatv_info rivatv_info; | |
434 | |
435 //framebuffer size funcs | |
436 static unsigned long rivatv_fbsize_nv03 (struct rivatv_chip *chip){ | |
437 if (VID_RD32 (chip->PFB, 0) & 0x00000020) { | |
438 if (((VID_RD32 (chip->PMC, 0) & 0xF0) == 0x20) | |
439 && ((VID_RD32 (chip->PMC, 0) & 0x0F) >= 0x02)) { | |
440 /* SDRAM 128 ZX. */ | |
441 return ((1 << (VID_RD32 (chip->PFB, 0) & 0x03)) * 1024 * 1024); | |
442 } | |
443 else { | |
444 return 1024 * 1024 * 8; | |
445 } | |
446 } | |
447 else { | |
448 /* SGRAM 128. */ | |
449 switch (VID_RD32(chip->PFB, 0) & 0x00000003) { | |
450 case 0: | |
451 return 1024 * 1024 * 8; | |
452 break; | |
453 case 2: | |
454 return 1024 * 1024 * 4; | |
455 break; | |
456 default: | |
457 return 1024 * 1024 * 2; | |
458 break; | |
459 } | |
460 } | |
461 } | |
462 static unsigned long rivatv_fbsize_nv04 (struct rivatv_chip *chip){ | |
463 if (VID_RD32 (chip->PFB, 0) & 0x00000100) { | |
464 return ((VID_RD32 (chip->PFB, 0) >> 12) & 0x0F) * 1024 * 1024 * 2 | |
465 + 1024 * 1024 * 2; | |
466 } else { | |
467 switch (VID_RD32 (chip->PFB, 0) & 0x00000003) { | |
468 case 0: | |
469 return 1024 * 1024 * 32; | |
470 break; | |
471 case 1: | |
472 return 1024 * 1024 * 4; | |
473 break; | |
474 case 2: | |
475 return 1024 * 1024 * 8; | |
476 break; | |
477 case 3: | |
478 default: | |
479 return 1024 * 1024 * 16; | |
480 break; | |
481 } | |
482 } | |
483 } | |
484 | |
485 static unsigned long rivatv_fbsize_nv10 (struct rivatv_chip *chip){ | |
486 return VID_RD32 (chip->PFB, 0x20C) & 0xFFF00000; | |
487 } | |
488 | |
489 //lock funcs | |
490 static void rivatv_lock_nv03 (struct rivatv_chip *chip, int LockUnlock){ | |
491 VID_WR08 (chip->PVIO, 0x3C4, 0x06); | |
492 VID_WR08 (chip->PVIO, 0x3C5, LockUnlock ? 0x99 : 0x57); | |
493 } | |
494 | |
495 static void rivatv_lock_nv04 (struct rivatv_chip *chip, int LockUnlock){ | |
496 VID_WR08 (chip->PCIO, 0x3C4, 0x06); | |
497 VID_WR08 (chip->PCIO, 0x3C5, LockUnlock ? 0x99 : 0x57); | |
498 VID_WR08 (chip->PCIO, 0x3D4, 0x1F); | |
499 VID_WR08 (chip->PCIO, 0x3D5, LockUnlock ? 0x99 : 0x57); | |
500 } | |
501 | |
502 | |
503 | |
504 | |
505 /* Enable PFB (Framebuffer), PVIDEO (Overlay unit) and PME (Mediaport) if neccessary. */ | |
506 static void rivatv_enable_PMEDIA (struct rivatv_info *info){ | |
507 uint32_t reg; | |
508 | |
509 /* switch off interrupts once for a while */ | |
510 // VID_WR32 (info->chip.PME, 0x200140, 0x00); | |
511 // VID_WR32 (info->chip.PMC, 0x000140, 0x00); | |
512 | |
513 reg = VID_RD32 (info->chip.PMC, 0x000200); | |
514 | |
515 /* NV3 (0x10100010): NV03_PMC_ENABLE_PMEDIA, NV03_PMC_ENABLE_PFB, NV03_PMC_ENABLE_PVIDEO */ | |
516 | |
517 if ((reg & 0x10100010) != 0x10100010) { | |
518 printf("PVIDEO and PFB disabled, enabling...\n"); | |
519 VID_OR32 (info->chip.PMC, 0x000200, 0x10100010); | |
520 } | |
521 | |
522 /* save the current colorkey */ | |
523 switch (info->chip.arch ) { | |
524 case NV_ARCH_10: | |
525 case NV_ARCH_20: | |
526 case NV_ARCH_30: | |
527 /* NV_PVIDEO_COLOR_KEY */ | |
528 info->colorkey = VID_RD32 (info->chip.PVIDEO, 0xB00); | |
529 break; | |
530 case NV_ARCH_03: | |
531 case NV_ARCH_04: | |
532 /* NV_PVIDEO_KEY */ | |
533 info->colorkey = VID_RD32 (info->chip.PVIDEO, 0x240); | |
534 break; | |
535 } | |
536 | |
537 | |
538 /* re-enable interrupts again */ | |
539 // VID_WR32 (info->chip.PMC, 0x000140, 0x01); | |
540 // VID_WR32 (info->chip.PME, 0x200140, 0x01); | |
541 } | |
542 | |
543 /* Stop overlay video. */ | |
544 static void rivatv_overlay_stop (struct rivatv_info *info) { | |
545 switch (info->chip.arch ) { | |
546 case NV_ARCH_10: | |
547 case NV_ARCH_20: | |
548 case NV_ARCH_30: | |
549 /* NV_PVIDEO_COLOR_KEY */ | |
550 /* Xv-Extension-Hack: Restore previously saved value. */ | |
551 VID_WR32 (info->chip.PVIDEO, 0xB00, info->colorkey); | |
552 /* NV_PVIDEO_STOP */ | |
553 VID_OR32 (info->chip.PVIDEO, 0x704, 0x11); | |
554 /* NV_PVIDEO_BUFFER */ | |
555 VID_AND32 (info->chip.PVIDEO, 0x700, ~0x11); | |
556 /* NV_PVIDEO_INTR_EN_BUFFER */ | |
557 // VID_AND32 (info->chip.PVIDEO, 0x140, ~0x11); | |
558 break; | |
559 case NV_ARCH_03: | |
560 case NV_ARCH_04: | |
561 /* NV_PVIDEO_KEY */ | |
562 VID_WR32 (info->chip.PVIDEO, 0x240, info->colorkey); | |
563 /* NV_PVIDEO_OVERLAY_VIDEO_OFF */ | |
564 VID_AND32 (info->chip.PVIDEO, 0x244, ~0x01); | |
565 /* NV_PVIDEO_INTR_EN_0_NOTIFY */ | |
566 // VID_AND32 (info->chip.PVIDEO, 0x140, ~0x01); | |
567 /* NV_PVIDEO_OE_STATE */ | |
568 VID_WR32 (info->chip.PVIDEO, 0x224, 0); | |
569 /* NV_PVIDEO_SU_STATE */ | |
570 VID_WR32 (info->chip.PVIDEO, 0x228, 0); | |
571 /* NV_PVIDEO_RM_STATE */ | |
572 VID_WR32 (info->chip.PVIDEO, 0x22C, 0); | |
573 break; | |
574 } | |
575 } | |
576 | |
577 /* Get pan offset of the physical screen. */ | |
578 static uint32_t rivatv_overlay_pan (struct rivatv_info *info){ | |
579 uint32_t pan; | |
580 info->chip.lock (&info->chip, 0); | |
581 VID_WR08 (info->chip.PCIO, 0x3D4, 0x0D); | |
582 pan = VID_RD08 (info->chip.PCIO, 0x3D5); | |
583 VID_WR08 (info->chip.PCIO, 0x3D4, 0x0C); | |
584 pan |= VID_RD08 (info->chip.PCIO, 0x3D5) << 8; | |
585 VID_WR08 (info->chip.PCIO, 0x3D4, 0x19); | |
586 pan |= (VID_RD08 (info->chip.PCIO, 0x3D5) & 0x1F) << 16; | |
587 VID_WR08 (info->chip.PCIO, 0x3D4, 0x2D); | |
588 pan |= (VID_RD08 (info->chip.PCIO, 0x3D5) & 0x60) << 16; | |
589 return pan << 2; | |
590 } | |
591 | |
592 /* Compute and set colorkey depending on the colour depth. */ | |
593 static void rivatv_overlay_colorkey (rivatv_info* info, unsigned int chromakey){ | |
594 uint32_t r, g, b, key = 0; | |
595 | |
596 r = (chromakey & 0x00FF0000) >> 16; | |
597 g = (chromakey & 0x0000FF00) >> 8; | |
598 b = chromakey & 0x000000FF; | |
599 switch (info->depth) { | |
600 case 15: | |
601 key = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)); | |
602 #ifndef WIN32 | |
603 key = key | 0x00008000; | |
604 #endif | |
605 break; | |
606 case 16: // XXX unchecked | |
607 key = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3)); | |
608 #ifndef WIN32 | |
609 key = key | 0x00008000; | |
610 #endif | |
611 break; | |
612 case 24: // XXX unchecked, maybe swap order of masking - FIXME Can the card be in 24 bit mode anyway? | |
613 key = (chromakey & 0x00FFFFFF) | 0x00800000; | |
614 break; | |
615 case 32: | |
616 key = chromakey; | |
617 #ifndef WIN32 | |
618 key = key | 0x80000000; | |
619 #endif | |
620 break; | |
621 } | |
622 //printf("[nvidia_vid] depth=%d %08X \n", info->depth, chromakey); | |
623 switch (info->chip.arch) { | |
624 case NV_ARCH_10: | |
625 case NV_ARCH_20: | |
626 case NV_ARCH_30: | |
627 VID_WR32 (info->chip.PVIDEO, 0xB00, key); | |
628 break; | |
629 case NV_ARCH_03: | |
630 case NV_ARCH_04: | |
631 VID_WR32 (info->chip.PVIDEO, 0x240, key); | |
632 break; | |
633 } | |
634 } | |
635 | |
636 static void nv_getscreenproperties(struct rivatv_info *info){ | |
637 uint32_t bpp=0,x; | |
638 info->chip.lock(&info->chip, 0); | |
639 /*get screen depth*/ | |
640 VID_WR08(info->chip.PCIO, 0x03D4,0x28); | |
641 bpp = VID_RD08(info->chip.PCIO,0x03D5)&0x3; | |
642 if((bpp == 2) && (VID_RD32(info->chip.PVIDEO,0x600) & 0x00001000) == 0x0)info->depth=15; | |
643 else info->depth = 0x04 << bpp; | |
644 /*get screen width*/ | |
645 VID_WR08(info->chip.PCIO, 0x03D4, 0x1); | |
646 info->screen_x = (1 + VID_RD08(info->chip.PCIO, 0x3D5)) * 8; | |
647 /*get screen height*/ | |
648 /* get first 8 bits in VT_DISPLAY_END*/ | |
649 VID_WR08(info->chip.PCIO, 0x03D4, 0x12); | |
650 info->screen_y = VID_RD08(info->chip.PCIO,0x03D5); | |
651 VID_WR08(info->chip.PCIO,0x03D4,0x07); | |
652 /* get 9th bit in CRTC_OVERFLOW*/ | |
653 info->screen_y |= (VID_RD08(info->chip.PCIO,0x03D5) &0x02)<<7; | |
654 /* and the 10th in CRTC_OVERFLOW*/ | |
655 info->screen_y |=(VID_RD08(info->chip.PCIO,0x03D5) &0x40)<<3; | |
656 ++info->screen_y; | |
657 | |
658 /* NV_PCRTC_OFFSET */ | |
659 VID_WR08 (info->chip.PCIO, 0x3D4, 0x13); | |
660 x = VID_RD08 (info->chip.PCIO, 0x3D5); | |
661 /* NV_PCRTC_REPAINT0_OFFSET_10_8 */ | |
662 VID_WR08 (info->chip.PCIO, 0x3D4, 0x19); | |
663 x |= (VID_RD08 (info->chip.PCIO, 0x3D5) & 0xE0) << 3; | |
664 /* NV_PCRTC_EXTRA_OFFSET_11 */ | |
665 VID_WR08 (info->chip.PCIO, 0x3D4, 0x25); | |
666 x |= (VID_RD08 (info->chip.PCIO, 0x3D5) & 0x20) << 6; x <<= 3; | |
667 info->bps = x * bpp; | |
668 } | |
669 | |
670 | |
671 | |
672 | |
673 /* Start overlay video. */ | |
674 static void rivatv_overlay_start (struct rivatv_info *info,int bufno){ | |
675 uint32_t base, size, offset, xscale, yscale, pan; | |
676 uint32_t value; | |
677 int x=info->wx, y=info->wy; | |
678 int lwidth=info->d_width, lheight=info->d_height; | |
679 | |
680 size = info->buffer_size; | |
681 base = info->picture_offset; | |
682 offset = bufno*size; | |
683 /*update depth & dimensions here because it may change with vo vesa or vo fbdev*/ | |
684 nv_getscreenproperties(info); | |
685 | |
686 if(info->depth){ | |
687 /* get pan offset of the physical screen */ | |
688 pan = rivatv_overlay_pan (info); | |
689 /* adjust window position depending on the pan offset */ | |
690 if (info->bps != 0) | |
691 { | |
692 x = info->wx - (pan % info->bps) * 8 / info->depth; | |
693 y = info->wy - (pan / info->bps); | |
694 } | |
695 } else { | |
696 // we can't adjust the window position correctly in textmode | |
697 // setting y to 8 seems to work ok, though | |
698 if(info->chip.arch < NV_ARCH_10 && y < 8) y = 8; | |
699 } | |
700 | |
701 /* adjust negative output window variables */ | |
702 if (x < 0) { | |
703 lwidth = info->d_width + x; | |
704 offset += (-x * info->width / info->d_width) << 1; | |
705 // offset += (-window->x * port->vld_width / window->width) << 1; | |
706 x = 0; | |
707 } | |
708 if (y < 0) { | |
709 lheight = info->d_height + y; | |
710 offset += (-y * info->height / info->d_height * info->width) << 1; | |
711 // offset += (-window->y * port->vld_height / window->height * port->org_width) << 1; | |
712 y = 0; | |
713 } | |
714 | |
715 switch (info->chip.arch) { | |
716 case NV_ARCH_10: | |
717 case NV_ARCH_20: | |
718 case NV_ARCH_30: | |
719 | |
720 /* NV_PVIDEO_BASE */ | |
721 VID_WR32 (info->chip.PVIDEO, 0x900 + 0, base + offset); | |
722 //VID_WR32 (info->chip.PVIDEO, 0x900 + 4, base); | |
723 /* NV_PVIDEO_LIMIT */ | |
724 VID_WR32 (info->chip.PVIDEO, 0x908 + 0, base + offset + size - 1); | |
725 //VID_WR32 (info->chip.PVIDEO, 0x908 + 4, base + size - 1); | |
726 | |
727 /* extra code for NV20 && NV30 architectures */ | |
728 if (info->chip.arch == NV_ARCH_20 || info->chip.arch == NV_ARCH_30) { | |
729 VID_WR32 (info->chip.PVIDEO, 0x800 + 0, base + offset); | |
730 //VID_WR32 (info->chip.PVIDEO, 0x800 + 4, base); | |
731 VID_WR32 (info->chip.PVIDEO, 0x808 + 0, base + offset + size - 1); | |
732 //VID_WR32 (info->chip.PVIDEO, 0x808 + 4, base + size - 1); | |
733 } | |
734 | |
735 /* NV_PVIDEO_LUMINANCE */ | |
736 VID_WR32 (info->chip.PVIDEO, 0x910 + 0, eq.lum); | |
737 //VID_WR32 (info->chip.PVIDEO, 0x910 + 4, 0x00001000); | |
738 /* NV_PVIDEO_CHROMINANCE */ | |
739 VID_WR32 (info->chip.PVIDEO, 0x918 + 0, eq.chrom); | |
740 //VID_WR32 (info->chip.PVIDEO, 0x918 + 4, 0x00001000); | |
741 | |
742 /* NV_PVIDEO_OFFSET */ | |
743 VID_WR32 (info->chip.PVIDEO, 0x920 + 0, 0x0); | |
744 //VID_WR32 (info->chip.PVIDEO, 0x920 + 4, offset + pitch); | |
745 /* NV_PVIDEO_SIZE_IN */ | |
746 VID_WR32 (info->chip.PVIDEO, 0x928 + 0, ((info->height) << 16) | info->width); | |
747 //VID_WR32 (info->chip.PVIDEO, 0x928 + 4, ((port->org_height/2) << 16) | port->org_width); | |
748 /* NV_PVIDEO_POINT_IN */ | |
749 VID_WR32 (info->chip.PVIDEO, 0x930 + 0, 0x00000000); | |
750 //VID_WR32 (info->chip.PVIDEO, 0x930 + 4, 0x00000000); | |
751 /* NV_PVIDEO_DS_DX_RATIO */ | |
752 VID_WR32 (info->chip.PVIDEO, 0x938 + 0, (info->width << 20) / info->d_width); | |
753 //VID_WR32 (info->chip.PVIDEO, 0x938 + 4, (port->org_width << 20) / window->width); | |
754 /* NV_PVIDEO_DT_DY_RATIO */ | |
755 VID_WR32 (info->chip.PVIDEO, 0x940 + 0, ((info->height) << 20) / info->d_height); | |
756 //VID_WR32 (info->chip.PVIDEO, 0x940 + 4, ((port->org_height/2) << 20) / window->height); | |
757 | |
758 /* NV_PVIDEO_POINT_OUT */ | |
759 VID_WR32 (info->chip.PVIDEO, 0x948 + 0, ((y + 0) << 16) | x); | |
760 //VID_WR32 (info->chip.PVIDEO, 0x948 + 4, ((y + 0) << 16) | x); | |
761 /* NV_PVIDEO_SIZE_OUT */ | |
762 VID_WR32 (info->chip.PVIDEO, 0x950 + 0, (lheight << 16) | lwidth); | |
763 //VID_WR32 (info->chip.PVIDEO, 0x950 + 4, (height << 16) | width); | |
764 | |
765 /* NV_PVIDEO_FORMAT */ | |
766 value = info->pitch; | |
767 if(info->use_colorkey)value |= 1 << 20; | |
768 if(info->format == IMGFMT_YUY2)value |= 1 << 16; | |
769 VID_WR32 (info->chip.PVIDEO, 0x958 + 0, value); | |
770 //VID_WR32 (info->chip.PVIDEO, 0x958 + 4, (pitch << 1) | 0x00100000); | |
771 | |
772 /* NV_PVIDEO_INTR_EN_BUFFER */ | |
773 // VID_OR32 (info->chip.PVIDEO, 0x140, 0x01/*0x11*/); | |
774 /* NV_PVIDEO_STOP */ | |
775 VID_WR32 (info->chip.PVIDEO, 0x704,0x0); | |
776 /* NV_PVIDEO_BUFFER */ | |
777 VID_WR32 (info->chip.PVIDEO, 0x700, 0x01/*0x11*/); | |
778 break; | |
779 | |
780 case NV_ARCH_03: | |
781 case NV_ARCH_04: | |
782 | |
783 | |
784 /* NV_PVIDEO_OE_STATE */ | |
785 VID_WR32 (info->chip.PVIDEO, 0x224, 0); | |
786 /* NV_PVIDEO_SU_STATE */ | |
787 VID_WR32 (info->chip.PVIDEO, 0x228, 0); | |
788 /* NV_PVIDEO_RM_STATE */ | |
789 VID_WR32 (info->chip.PVIDEO, 0x22C, 0); | |
790 | |
791 /* NV_PVIDEO_BUFF0_START_ADDRESS */ | |
792 VID_WR32 (info->chip.PVIDEO, 0x20C + 0, base + offset + 0); | |
793 VID_WR32 (info->chip.PVIDEO, 0x20C + 4, base + offset + 0); | |
794 /* NV_PVIDEO_BUFF0_PITCH_LENGTH */ | |
795 VID_WR32 (info->chip.PVIDEO, 0x214 + 0, info->pitch); | |
796 VID_WR32 (info->chip.PVIDEO, 0x214 + 4, info->pitch); | |
797 | |
798 /* NV_PVIDEO_WINDOW_START */ | |
799 VID_WR32 (info->chip.PVIDEO, 0x230, (y << 16) | x); | |
800 /* NV_PVIDEO_WINDOW_SIZE */ | |
801 VID_WR32 (info->chip.PVIDEO, 0x234, (lheight << 16) | lwidth); | |
802 /* NV_PVIDEO_STEP_SIZE */ | |
803 yscale = ((info->height - 1) << 11) / (info->d_height - 1); | |
804 xscale = ((info->width - 1) << 11) / (info->d_width - 1); | |
805 VID_WR32 (info->chip.PVIDEO, 0x200, (yscale << 16) | xscale); | |
806 | |
807 /* NV_PVIDEO_RED_CSC_OFFSET */ | |
808 VID_WR32 (info->chip.PVIDEO, 0x280, eq.red_off); | |
809 /* NV_PVIDEO_GREEN_CSC_OFFSET */ | |
810 VID_WR32 (info->chip.PVIDEO, 0x284, eq.green_off); | |
811 /* NV_PVIDEO_BLUE_CSC_OFFSET */ | |
812 VID_WR32 (info->chip.PVIDEO, 0x288, eq.blue_off); | |
813 /* NV_PVIDEO_CSC_ADJUST */ | |
814 VID_WR32 (info->chip.PVIDEO, 0x28C, 0x00000); /* No colour correction! */ | |
815 | |
816 /* NV_PVIDEO_CONTROL_Y (BLUR_ON, LINE_HALF) */ | |
817 VID_WR32 (info->chip.PVIDEO, 0x204, 0x001); | |
818 /* NV_PVIDEO_CONTROL_X (WEIGHT_HEAVY, SHARPENING_ON, SMOOTHING_ON) */ | |
819 VID_WR32 (info->chip.PVIDEO, 0x208, 0x111); /*directx overlay 0x110 */ | |
820 | |
821 /* NV_PVIDEO_FIFO_BURST_LENGTH */ | |
822 VID_WR32 (info->chip.PVIDEO, 0x23C, 0x03); | |
823 /* NV_PVIDEO_FIFO_THRES_SIZE */ | |
824 VID_WR32 (info->chip.PVIDEO, 0x238, 0x38); /*windows uses 0x40*/ | |
825 | |
826 /* NV_PVIDEO_BUFF0_OFFSET */ | |
827 VID_WR32 (info->chip.PVIDEO, 0x21C + 0, 0); | |
828 VID_WR32 (info->chip.PVIDEO, 0x21C + 4, 0); | |
829 | |
830 /* NV_PVIDEO_INTR_EN_0_NOTIFY_ENABLED */ | |
831 // VID_OR32 (info->chip.PVIDEO, 0x140, 0x01); | |
832 | |
833 /* NV_PVIDEO_OVERLAY (KEY_ON, VIDEO_ON, FORMAT_CCIR) */ | |
834 value = 0x1; /*video on*/ | |
835 if(info->format==IMGFMT_YUY2)value |= 0x100; | |
836 if(info->use_colorkey)value |=0x10; | |
837 VID_WR32 (info->chip.PVIDEO, 0x244, value); | |
838 | |
839 /* NV_PVIDEO_SU_STATE */ | |
840 VID_XOR32 (info->chip.PVIDEO, 0x228, 1 << 16); | |
841 break; | |
842 } | |
843 /*set colorkey*/ | |
844 rivatv_overlay_colorkey(info,info->vidixcolorkey); | |
845 | |
846 } | |
847 | |
848 | |
849 | |
850 | |
851 | |
852 | |
853 | |
854 static rivatv_info* info; | |
855 | |
856 | |
857 | |
858 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
859 static int nv_init(void){ |
22850 | 860 int mtrr; |
861 info = calloc(1,sizeof(rivatv_info)); | |
862 info->control_base = map_phys_mem(pci_info.base0, 0x00C00000 + 0x00008000); | |
863 info->chip.arch = nvidia_card_ids[find_chip(pci_info.device)].arch; | |
864 printf("[nvidia_vid] arch %x register base %p\n",info->chip.arch,info->control_base); | |
865 info->chip.PFIFO = (uint32_t *) (info->control_base + 0x00002000); | |
866 info->chip.FIFO = (uint32_t *) (info->control_base + 0x00800000); | |
867 info->chip.PMC = (uint32_t *) (info->control_base + 0x00000000); | |
868 info->chip.PFB = (uint32_t *) (info->control_base + 0x00100000); | |
869 info->chip.PME = (uint32_t *) (info->control_base + 0x00000000); | |
870 info->chip.PCIO = (uint8_t *) (info->control_base + 0x00601000); | |
871 info->chip.PVIO = (uint8_t *) (info->control_base + 0x000C0000); | |
872 info->chip.PGRAPH = (uint32_t *) (info->control_base + 0x00400000); | |
873 /* setup chip specific functions */ | |
874 switch (info->chip.arch) { | |
875 case NV_ARCH_03: | |
876 info->chip.lock = rivatv_lock_nv03; | |
877 info->chip.fbsize = rivatv_fbsize_nv03 (&info->chip); | |
878 info->chip.PVIDEO = (uint32_t *) (info->control_base + 0x00680000); | |
879 break; | |
880 case NV_ARCH_04: | |
881 info->chip.lock = rivatv_lock_nv04; | |
882 info->chip.fbsize = rivatv_fbsize_nv04 (&info->chip); | |
883 info->chip.PRAMIN = (uint32_t *) (info->control_base + 0x00700000); | |
884 info->chip.PVIDEO = (uint32_t *) (info->control_base + 0x00680000); | |
885 break; | |
886 case NV_ARCH_10: | |
887 case NV_ARCH_20: | |
888 case NV_ARCH_30: | |
889 info->chip.lock = rivatv_lock_nv04; | |
890 info->chip.fbsize = rivatv_fbsize_nv10 (&info->chip); | |
891 info->chip.PRAMIN = (uint32_t *) (info->control_base + 0x00700000); | |
892 info->chip.PVIDEO = (uint32_t *) (info->control_base + 0x00008000); | |
893 break; | |
894 } | |
895 switch (info->chip.arch) { | |
896 case NV_ARCH_03: | |
897 { | |
898 /* This maps framebuffer @6MB, thus 2MB are left for video. */ | |
899 info->video_base = map_phys_mem(pci_info.base1, info->chip.fbsize); | |
900 /* This may trash your screen for resolutions greater than 1024x768, sorry. */ | |
901 info->picture_offset = 1024*768* 4 * ((info->chip.fbsize > 4194304)?2:1); | |
902 info->picture_base = info->video_base + info->picture_offset; | |
903 info->chip.PRAMIN = (uint32_t *) (info->video_base + 0x00C00000); | |
904 break; | |
905 } | |
906 case NV_ARCH_04: | |
907 case NV_ARCH_10: | |
908 case NV_ARCH_20: | |
909 case NV_ARCH_30: | |
910 { | |
911 info->video_base = map_phys_mem(pci_info.base1, info->chip.fbsize); | |
912 info->picture_offset = info->chip.fbsize - NV04_BES_SIZE; | |
913 if(info->chip.fbsize > 16*1024*1024) | |
914 info->picture_offset -= NV04_BES_SIZE; | |
915 // info->picture_base = (unsigned long)map_phys_mem(pci_info.base1+info->picture_offset,NV04_BES_SIZE); | |
916 info->picture_base = info->video_base + info->picture_offset; | |
917 break; | |
918 } | |
919 } | |
920 | |
921 printf("[nvidia_vid] detected memory size %u MB\n",(uint32_t)(info->chip.fbsize /1024/1024)); | |
922 | |
923 if ((mtrr = mtrr_set_type(pci_info.base1, info->chip.fbsize, MTRR_TYPE_WRCOMB))!= 0) | |
924 printf("[nvidia_vid] unable to setup MTRR: %s\n", strerror(mtrr)); | |
925 else | |
926 printf("[nvidia_vid] MTRR set up\n"); | |
927 | |
928 nv_getscreenproperties(info); | |
929 if(!info->depth)printf("[nvidia_vid] text mode: %ux%u\n",info->screen_x,info->screen_y); | |
930 else printf("[nvidia_vid] video mode: %ux%u@%u\n",info->screen_x,info->screen_y, info->depth); | |
931 | |
932 | |
933 rivatv_enable_PMEDIA(info); | |
934 info->cur_frame = 0; | |
935 info->use_colorkey = 0; | |
936 | |
937 eq.lum = 0x00001000; | |
938 eq.chrom = 0x00001000; | |
939 memset(&eq.vals, 0, sizeof(vidix_video_eq_t)); | |
940 eq.vals.cap = VEQ_CAP_BRIGHTNESS; | |
941 if (info->chip.arch > NV_ARCH_04) | |
942 eq.vals.cap |= VEQ_CAP_CONTRAST | VEQ_CAP_SATURATION | VEQ_CAP_HUE; | |
943 eq.red_off = 0x69; | |
944 eq.green_off = 0x3e; | |
945 eq.blue_off = 0x89; | |
946 return 0; | |
947 } | |
948 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
949 static void nv_destroy(void){ |
22850 | 950 unmap_phys_mem(info->control_base ,0x00C00000 + 0x00008000); |
951 unmap_phys_mem(info->video_base, info->chip.fbsize); | |
952 free(info); | |
953 } | |
954 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
955 static int nv_get_caps(vidix_capability_t *to){ |
22850 | 956 memcpy(to, &nvidia_cap, sizeof(vidix_capability_t)); |
957 return 0; | |
958 } | |
959 | |
960 inline static int is_supported_fourcc(uint32_t fourcc) | |
961 { | |
962 if (fourcc == IMGFMT_UYVY || fourcc == IMGFMT_YUY2) | |
963 return 1; | |
964 else | |
965 return 0; | |
966 } | |
967 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
968 static int nv_query_fourcc(vidix_fourcc_t *to){ |
22850 | 969 if(is_supported_fourcc(to->fourcc)){ |
970 to->depth = VID_DEPTH_1BPP | VID_DEPTH_2BPP | | |
971 VID_DEPTH_4BPP | VID_DEPTH_8BPP | | |
972 VID_DEPTH_12BPP| VID_DEPTH_15BPP| | |
973 VID_DEPTH_16BPP| VID_DEPTH_24BPP| | |
974 VID_DEPTH_32BPP; | |
975 to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK | VID_CAP_COLORKEY; | |
976 return 0; | |
977 } | |
978 else to->depth = to->flags = 0; | |
979 return ENOSYS; | |
980 } | |
981 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
982 static int nv_config_playback(vidix_playback_t *vinfo){ |
22850 | 983 uint32_t i; |
984 printf("called %s\n", __FUNCTION__); | |
985 if (! is_supported_fourcc(vinfo->fourcc)) | |
986 return ENOSYS; | |
987 | |
988 info->width = vinfo->src.w; | |
989 info->height = vinfo->src.h; | |
990 | |
991 info->d_width = vinfo->dest.w; | |
992 info->d_height = vinfo->dest.h; | |
993 info->wx = vinfo->dest.x; | |
994 info->wy = vinfo->dest.y; | |
995 info->format = vinfo->fourcc; | |
996 | |
997 printf("[nvidia_vid] setting up a %dx%d-%dx%d video window (src %dx%d), format 0x%X\n", | |
998 info->d_width, info->d_height, info->wx, info->wy, info->width, info->height, vinfo->fourcc); | |
999 | |
1000 | |
1001 vinfo->dga_addr=info->picture_base; | |
1002 | |
1003 switch (vinfo->fourcc) | |
1004 { | |
1005 case IMGFMT_YUY2: | |
1006 case IMGFMT_UYVY: | |
1007 | |
1008 vinfo->dest.pitch.y = 64; | |
1009 vinfo->dest.pitch.u = 0; | |
1010 vinfo->dest.pitch.v = 0; | |
1011 | |
1012 vinfo->offset.y = 0; | |
1013 vinfo->offset.v = 0; | |
1014 vinfo->offset.u = 0; | |
1015 info->pitch = ((info->width << 1) + (vinfo->dest.pitch.y-1)) & ~(vinfo->dest.pitch.y-1); | |
1016 vinfo->frame_size = info->pitch * info->height; | |
1017 break; | |
1018 } | |
1019 info->buffer_size = vinfo->frame_size; | |
1020 info->num_frames = vinfo->num_frames= (info->chip.fbsize - info->picture_offset)/vinfo->frame_size; | |
1021 if(vinfo->num_frames > MAX_FRAMES)vinfo->num_frames = MAX_FRAMES; | |
1022 // vinfo->num_frames = 1; | |
1023 // printf("[nvidia_vid] Number of frames %i\n",vinfo->num_frames); | |
1024 for(i=0;i <vinfo->num_frames;i++)vinfo->offsets[i] = vinfo->frame_size*i; | |
1025 return 0; | |
1026 } | |
1027 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1028 static int nv_playback_on(void){ |
22850 | 1029 rivatv_overlay_start(info,info->cur_frame); |
1030 return 0; | |
1031 } | |
1032 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1033 static int nv_playback_off(void){ |
22850 | 1034 rivatv_overlay_stop(info); |
1035 return 0; | |
1036 } | |
1037 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1038 static int nv_set_gkeys( const vidix_grkey_t * grkey){ |
22850 | 1039 if (grkey->ckey.op == CKEY_FALSE) |
1040 { | |
1041 info->use_colorkey = 0; | |
1042 printf("[nvidia_vid] colorkeying disabled\n"); | |
1043 } | |
1044 else { | |
1045 info->use_colorkey = 1; | |
1046 info->vidixcolorkey = ((grkey->ckey.red<<16)|(grkey->ckey.green<<8)|grkey->ckey.blue); | |
1047 printf("[nvidia_vid] set colorkey 0x%x\n",info->vidixcolorkey); | |
1048 } | |
1049 if(info->d_width && info->d_height)rivatv_overlay_start(info,0); | |
1050 return 0; | |
1051 } | |
1052 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1053 static int nv_frame_sel(unsigned int frame){ |
22850 | 1054 // printf("selecting buffer %d\n", frame); |
1055 rivatv_overlay_start(info, frame); | |
1056 if (info->num_frames >= 1) | |
1057 info->cur_frame = frame/*(frame+1)%info->num_frames*/; | |
1058 return 0; | |
1059 } | |
1060 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1061 static int nv_set_eq(const vidix_video_eq_t *eq_parm) { |
22850 | 1062 double angle; |
1063 int16_t chrom_cos, chrom_sin; | |
1064 if (eq_parm->cap & VEQ_CAP_BRIGHTNESS) | |
1065 eq.vals.brightness = eq_parm->brightness; | |
1066 if (eq_parm->cap & VEQ_CAP_CONTRAST) | |
1067 eq.vals.contrast = eq_parm->contrast; | |
1068 if (eq_parm->cap & VEQ_CAP_SATURATION) | |
1069 eq.vals.saturation = eq_parm->saturation; | |
1070 if (eq_parm->cap & VEQ_CAP_HUE) | |
1071 eq.vals.hue = eq_parm->hue; | |
1072 eq.lum = (((eq.vals.brightness * 512 + 500) / 1000) << 16) | | |
1073 ((((eq.vals.contrast + 1000) * 8191 + 1000) / 2000) & 0xffff); | |
1074 angle = (double)eq.vals.hue / 1000.0 * 3.1415927; | |
1075 chrom_cos = ((eq.vals.saturation + 1000) * 8191 * cos(angle) + 1000) / 2000; | |
1076 chrom_sin = ((eq.vals.saturation + 1000) * 8191 * sin(angle) + 1000) / 2000; | |
1077 eq.chrom = chrom_sin << 16 | chrom_cos; | |
1078 eq.red_off = 0x69 - eq.vals.brightness * 62 / 1000; | |
1079 eq.green_off = 0x3e + eq.vals.brightness * 62 / 1000; | |
1080 eq.blue_off = 0x89 - eq.vals.brightness * 62 / 1000; | |
1081 return 0; | |
1082 } | |
1083 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1084 static int nv_get_eq(vidix_video_eq_t *eq_parm) { |
22850 | 1085 memcpy(eq_parm, &eq.vals, sizeof(vidix_video_eq_t)); |
1086 return 0; | |
1087 } | |
1088 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1089 VDXDriver nvidia_drv = { |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1090 "nvidia", |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1091 NULL, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1092 .probe = nv_probe, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1093 .get_caps = nv_get_caps, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1094 .query_fourcc = nv_query_fourcc, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1095 .init = nv_init, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1096 .destroy = nv_destroy, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1097 .config_playback = nv_config_playback, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1098 .playback_on = nv_playback_on, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1099 .playback_off = nv_playback_off, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1100 .frame_sel = nv_frame_sel, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1101 .get_eq = nv_get_eq, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1102 .set_eq = nv_set_eq, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1103 .set_gkey = nv_set_gkeys, |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
22850
diff
changeset
|
1104 }; |