Home | History | Annotate | Line # | Download | only in device
      1 /*	$NetBSD: nouveau_nvkm_engine_device_pci.c,v 1.12 2024/04/16 14:34:02 riastradh Exp $	*/
      2 
      3 /*
      4  * Copyright 2015 Red Hat Inc.
      5  *
      6  * Permission is hereby granted, free of charge, to any person obtaining a
      7  * copy of this software and associated documentation files (the "Software"),
      8  * to deal in the Software without restriction, including without limitation
      9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     10  * and/or sell copies of the Software, and to permit persons to whom the
     11  * Software is furnished to do so, subject to the following conditions:
     12  *
     13  * The above copyright notice and this permission notice shall be included in
     14  * all copies or substantial portions of the Software.
     15  *
     16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     19  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
     20  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
     21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     22  * OTHER DEALINGS IN THE SOFTWARE.
     23  *
     24  * Authors: Ben Skeggs <bskeggs (at) redhat.com>
     25  */
     26 #include <sys/cdefs.h>
     27 __KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_device_pci.c,v 1.12 2024/04/16 14:34:02 riastradh Exp $");
     28 
     29 #include <core/pci.h>
     30 #include "priv.h"
     31 
     32 struct nvkm_device_pci_device {
     33 	u16 device;
     34 	const char *name;
     35 	const struct nvkm_device_pci_vendor *vendor;
     36 };
     37 
     38 struct nvkm_device_pci_vendor {
     39 	u16 vendor;
     40 	u16 device;
     41 	const char *name;
     42 	const struct nvkm_device_quirk quirk;
     43 };
     44 
     45 static const struct nvkm_device_pci_vendor
     46 nvkm_device_pci_10de_0189[] = {
     47 	/* Apple iMac G4 NV18 */
     48 	{ 0x10de, 0x0010, NULL, { .tv_gpio = 4 } },
     49 	{}
     50 };
     51 
     52 static const struct nvkm_device_pci_vendor
     53 nvkm_device_pci_10de_01f0[] = {
     54 	/* MSI nForce2 IGP */
     55 	{ 0x1462, 0x5710, NULL, { .tv_pin_mask = 0xc } },
     56 	{}
     57 };
     58 
     59 static const struct nvkm_device_pci_vendor
     60 nvkm_device_pci_10de_0322[] = {
     61 	/* Zotac FX5200 */
     62 	{ 0x19da, 0x1035, NULL, { .tv_pin_mask = 0xc } },
     63 	{ 0x19da, 0x2035, NULL, { .tv_pin_mask = 0xc } },
     64 	{}
     65 };
     66 
     67 static const struct nvkm_device_pci_vendor
     68 nvkm_device_pci_10de_05e7[] = {
     69 	{ 0x10de, 0x0595, "Tesla T10 Processor" },
     70 	{ 0x10de, 0x068f, "Tesla T10 Processor" },
     71 	{ 0x10de, 0x0697, "Tesla M1060" },
     72 	{ 0x10de, 0x0714, "Tesla M1060" },
     73 	{ 0x10de, 0x0743, "Tesla M1060" },
     74 	{}
     75 };
     76 
     77 static const struct nvkm_device_pci_vendor
     78 nvkm_device_pci_10de_0609[] = {
     79 	{ 0x106b, 0x00a7, "GeForce 8800 GS" },
     80 	{}
     81 };
     82 
     83 static const struct nvkm_device_pci_vendor
     84 nvkm_device_pci_10de_062e[] = {
     85 	{ 0x106b, 0x0605, "GeForce GT 130" },
     86 	{}
     87 };
     88 
     89 static const struct nvkm_device_pci_vendor
     90 nvkm_device_pci_10de_0649[] = {
     91 	{ 0x1043, 0x202d, "GeForce GT 220M" },
     92 	{}
     93 };
     94 
     95 static const struct nvkm_device_pci_vendor
     96 nvkm_device_pci_10de_0652[] = {
     97 	{ 0x152d, 0x0850, "GeForce GT 240M LE" },
     98 	{}
     99 };
    100 
    101 static const struct nvkm_device_pci_vendor
    102 nvkm_device_pci_10de_0654[] = {
    103 	{ 0x1043, 0x14a2, "GeForce GT 320M" },
    104 	{ 0x1043, 0x14d2, "GeForce GT 320M" },
    105 	{}
    106 };
    107 
    108 static const struct nvkm_device_pci_vendor
    109 nvkm_device_pci_10de_0655[] = {
    110 	{ 0x106b, 0x0633, "GeForce GT 120" },
    111 	{}
    112 };
    113 
    114 static const struct nvkm_device_pci_vendor
    115 nvkm_device_pci_10de_0656[] = {
    116 	{ 0x106b, 0x0693, "GeForce GT 120" },
    117 	{}
    118 };
    119 
    120 static const struct nvkm_device_pci_vendor
    121 nvkm_device_pci_10de_06d1[] = {
    122 	{ 0x10de, 0x0771, "Tesla C2050" },
    123 	{ 0x10de, 0x0772, "Tesla C2070" },
    124 	{}
    125 };
    126 
    127 static const struct nvkm_device_pci_vendor
    128 nvkm_device_pci_10de_06d2[] = {
    129 	{ 0x10de, 0x088f, "Tesla X2070" },
    130 	{}
    131 };
    132 
    133 static const struct nvkm_device_pci_vendor
    134 nvkm_device_pci_10de_06de[] = {
    135 	{ 0x10de, 0x0773, "Tesla S2050" },
    136 	{ 0x10de, 0x082f, "Tesla M2050" },
    137 	{ 0x10de, 0x0840, "Tesla X2070" },
    138 	{ 0x10de, 0x0842, "Tesla M2050" },
    139 	{ 0x10de, 0x0846, "Tesla M2050" },
    140 	{ 0x10de, 0x0866, "Tesla M2050" },
    141 	{ 0x10de, 0x0907, "Tesla M2050" },
    142 	{ 0x10de, 0x091e, "Tesla M2050" },
    143 	{}
    144 };
    145 
    146 static const struct nvkm_device_pci_vendor
    147 nvkm_device_pci_10de_06e8[] = {
    148 	{ 0x103c, 0x360b, "GeForce 9200M GE" },
    149 	{}
    150 };
    151 
    152 static const struct nvkm_device_pci_vendor
    153 nvkm_device_pci_10de_06f9[] = {
    154 	{ 0x10de, 0x060d, "Quadro FX 370 Low Profile" },
    155 	{}
    156 };
    157 
    158 static const struct nvkm_device_pci_vendor
    159 nvkm_device_pci_10de_06ff[] = {
    160 	{ 0x10de, 0x0711, "HICx8 + Graphics" },
    161 	{}
    162 };
    163 
    164 static const struct nvkm_device_pci_vendor
    165 nvkm_device_pci_10de_0866[] = {
    166 	{ 0x106b, 0x00b1, "GeForce 9400M" },
    167 	{}
    168 };
    169 
    170 static const struct nvkm_device_pci_vendor
    171 nvkm_device_pci_10de_0872[] = {
    172 	{ 0x1043, 0x1c42, "GeForce G205M" },
    173 	{}
    174 };
    175 
    176 static const struct nvkm_device_pci_vendor
    177 nvkm_device_pci_10de_0873[] = {
    178 	{ 0x1043, 0x1c52, "GeForce G205M" },
    179 	{}
    180 };
    181 
    182 static const struct nvkm_device_pci_vendor
    183 nvkm_device_pci_10de_0a6e[] = {
    184 	{ 0x17aa, 0x3607, "Second Generation ION" },
    185 	{}
    186 };
    187 
    188 static const struct nvkm_device_pci_vendor
    189 nvkm_device_pci_10de_0a70[] = {
    190 	{ 0x17aa, 0x3605, "Second Generation ION" },
    191 	{ 0x17aa, 0x3617, "Second Generation ION" },
    192 	{}
    193 };
    194 
    195 static const struct nvkm_device_pci_vendor
    196 nvkm_device_pci_10de_0a73[] = {
    197 	{ 0x17aa, 0x3607, "Second Generation ION" },
    198 	{ 0x17aa, 0x3610, "Second Generation ION" },
    199 	{}
    200 };
    201 
    202 static const struct nvkm_device_pci_vendor
    203 nvkm_device_pci_10de_0a74[] = {
    204 	{ 0x17aa, 0x903a, "GeForce G210" },
    205 	{}
    206 };
    207 
    208 static const struct nvkm_device_pci_vendor
    209 nvkm_device_pci_10de_0a75[] = {
    210 	{ 0x17aa, 0x3605, "Second Generation ION" },
    211 	{}
    212 };
    213 
    214 static const struct nvkm_device_pci_vendor
    215 nvkm_device_pci_10de_0a7a[] = {
    216 	{ 0x1462, 0xaa51, "GeForce 405" },
    217 	{ 0x1462, 0xaa58, "GeForce 405" },
    218 	{ 0x1462, 0xac71, "GeForce 405" },
    219 	{ 0x1462, 0xac82, "GeForce 405" },
    220 	{ 0x1642, 0x3980, "GeForce 405" },
    221 	{ 0x17aa, 0x3950, "GeForce 405M" },
    222 	{ 0x17aa, 0x397d, "GeForce 405M" },
    223 	{ 0x1b0a, 0x90b4, "GeForce 405" },
    224 	{ 0x1bfd, 0x0003, "GeForce 405" },
    225 	{ 0x1bfd, 0x8006, "GeForce 405" },
    226 	{}
    227 };
    228 
    229 static const struct nvkm_device_pci_vendor
    230 nvkm_device_pci_10de_0dd8[] = {
    231 	{ 0x10de, 0x0914, "Quadro 2000D" },
    232 	{}
    233 };
    234 
    235 static const struct nvkm_device_pci_vendor
    236 nvkm_device_pci_10de_0de9[] = {
    237 	{ 0x1025, 0x0692, "GeForce GT 620M" },
    238 	{ 0x1025, 0x0725, "GeForce GT 620M" },
    239 	{ 0x1025, 0x0728, "GeForce GT 620M" },
    240 	{ 0x1025, 0x072b, "GeForce GT 620M" },
    241 	{ 0x1025, 0x072e, "GeForce GT 620M" },
    242 	{ 0x1025, 0x0753, "GeForce GT 620M" },
    243 	{ 0x1025, 0x0754, "GeForce GT 620M" },
    244 	{ 0x17aa, 0x3977, "GeForce GT 640M LE" },
    245 	{ 0x1b0a, 0x2210, "GeForce GT 635M" },
    246 	{}
    247 };
    248 
    249 static const struct nvkm_device_pci_vendor
    250 nvkm_device_pci_10de_0dea[] = {
    251 	{ 0x17aa, 0x365a, "GeForce 615" },
    252 	{ 0x17aa, 0x365b, "GeForce 615" },
    253 	{ 0x17aa, 0x365e, "GeForce 615" },
    254 	{ 0x17aa, 0x3660, "GeForce 615" },
    255 	{ 0x17aa, 0x366c, "GeForce 615" },
    256 	{}
    257 };
    258 
    259 static const struct nvkm_device_pci_vendor
    260 nvkm_device_pci_10de_0df4[] = {
    261 	{ 0x152d, 0x0952, "GeForce GT 630M" },
    262 	{ 0x152d, 0x0953, "GeForce GT 630M" },
    263 	{}
    264 };
    265 
    266 static const struct nvkm_device_pci_vendor
    267 nvkm_device_pci_10de_0fd2[] = {
    268 	{ 0x1028, 0x0595, "GeForce GT 640M LE" },
    269 	{ 0x1028, 0x05b2, "GeForce GT 640M LE" },
    270 	{}
    271 };
    272 
    273 static const struct nvkm_device_pci_vendor
    274 nvkm_device_pci_10de_0fe3[] = {
    275 	{ 0x103c, 0x2b16, "GeForce GT 745A" },
    276 	{ 0x17aa, 0x3675, "GeForce GT 745A" },
    277 	{}
    278 };
    279 
    280 static const struct nvkm_device_pci_vendor
    281 nvkm_device_pci_10de_104b[] = {
    282 	{ 0x1043, 0x844c, "GeForce GT 625" },
    283 	{ 0x1043, 0x846b, "GeForce GT 625" },
    284 	{ 0x1462, 0xb590, "GeForce GT 625" },
    285 	{ 0x174b, 0x0625, "GeForce GT 625" },
    286 	{ 0x174b, 0xa625, "GeForce GT 625" },
    287 	{}
    288 };
    289 
    290 static const struct nvkm_device_pci_vendor
    291 nvkm_device_pci_10de_1058[] = {
    292 	{ 0x103c, 0x2af1, "GeForce 610" },
    293 	{ 0x17aa, 0x3682, "GeForce 800A" },
    294 	{ 0x17aa, 0x3692, "GeForce 705A" },
    295 	{ 0x17aa, 0x3695, "GeForce 800A" },
    296 	{ 0x17aa, 0x36a8, "GeForce 800A" },
    297 	{ 0x17aa, 0x36ac, "GeForce 800A" },
    298 	{ 0x17aa, 0x36ad, "GeForce 800A" },
    299 	{ 0x705a, 0x3682, "GeForce 800A" },
    300 	{}
    301 };
    302 
    303 static const struct nvkm_device_pci_vendor
    304 nvkm_device_pci_10de_105b[] = {
    305 	{ 0x103c, 0x2afb, "GeForce 705A" },
    306 	{ 0x17aa, 0x36a1, "GeForce 800A" },
    307 	{}
    308 };
    309 
    310 static const struct nvkm_device_pci_vendor
    311 nvkm_device_pci_10de_1091[] = {
    312 	{ 0x10de, 0x088e, "Tesla X2090" },
    313 	{ 0x10de, 0x0891, "Tesla X2090" },
    314 	{ 0x10de, 0x0974, "Tesla X2090" },
    315 	{ 0x10de, 0x098d, "Tesla X2090" },
    316 	{}
    317 };
    318 
    319 static const struct nvkm_device_pci_vendor
    320 nvkm_device_pci_10de_1096[] = {
    321 	{ 0x10de, 0x0911, "Tesla C2050" },
    322 	{}
    323 };
    324 
    325 static const struct nvkm_device_pci_vendor
    326 nvkm_device_pci_10de_1140[] = {
    327 	{ 0x1019, 0x999f, "GeForce GT 720M" },
    328 	{ 0x1025, 0x0600, "GeForce GT 620M" },
    329 	{ 0x1025, 0x0606, "GeForce GT 620M" },
    330 	{ 0x1025, 0x064a, "GeForce GT 620M" },
    331 	{ 0x1025, 0x064c, "GeForce GT 620M" },
    332 	{ 0x1025, 0x067a, "GeForce GT 620M" },
    333 	{ 0x1025, 0x0680, "GeForce GT 620M" },
    334 	{ 0x1025, 0x0686, "GeForce 710M" },
    335 	{ 0x1025, 0x0689, "GeForce 710M" },
    336 	{ 0x1025, 0x068b, "GeForce 710M" },
    337 	{ 0x1025, 0x068d, "GeForce 710M" },
    338 	{ 0x1025, 0x068e, "GeForce 710M" },
    339 	{ 0x1025, 0x0691, "GeForce 710M" },
    340 	{ 0x1025, 0x0692, "GeForce GT 620M" },
    341 	{ 0x1025, 0x0694, "GeForce GT 620M" },
    342 	{ 0x1025, 0x0702, "GeForce GT 620M" },
    343 	{ 0x1025, 0x0719, "GeForce GT 620M" },
    344 	{ 0x1025, 0x0725, "GeForce GT 620M" },
    345 	{ 0x1025, 0x0728, "GeForce GT 620M" },
    346 	{ 0x1025, 0x072b, "GeForce GT 620M" },
    347 	{ 0x1025, 0x072e, "GeForce GT 620M" },
    348 	{ 0x1025, 0x0732, "GeForce GT 620M" },
    349 	{ 0x1025, 0x0763, "GeForce GT 720M" },
    350 	{ 0x1025, 0x0773, "GeForce 710M" },
    351 	{ 0x1025, 0x0774, "GeForce 710M" },
    352 	{ 0x1025, 0x0776, "GeForce GT 720M" },
    353 	{ 0x1025, 0x077a, "GeForce 710M" },
    354 	{ 0x1025, 0x077b, "GeForce 710M" },
    355 	{ 0x1025, 0x077c, "GeForce 710M" },
    356 	{ 0x1025, 0x077d, "GeForce 710M" },
    357 	{ 0x1025, 0x077e, "GeForce 710M" },
    358 	{ 0x1025, 0x077f, "GeForce 710M" },
    359 	{ 0x1025, 0x0781, "GeForce GT 720M" },
    360 	{ 0x1025, 0x0798, "GeForce GT 720M" },
    361 	{ 0x1025, 0x0799, "GeForce GT 720M" },
    362 	{ 0x1025, 0x079b, "GeForce GT 720M" },
    363 	{ 0x1025, 0x079c, "GeForce GT 720M" },
    364 	{ 0x1025, 0x0807, "GeForce GT 720M" },
    365 	{ 0x1025, 0x0821, "GeForce 820M" },
    366 	{ 0x1025, 0x0823, "GeForce GT 720M" },
    367 	{ 0x1025, 0x0830, "GeForce GT 720M" },
    368 	{ 0x1025, 0x0833, "GeForce GT 720M" },
    369 	{ 0x1025, 0x0837, "GeForce GT 720M" },
    370 	{ 0x1025, 0x083e, "GeForce 820M" },
    371 	{ 0x1025, 0x0841, "GeForce 710M" },
    372 	{ 0x1025, 0x0853, "GeForce 820M" },
    373 	{ 0x1025, 0x0854, "GeForce 820M" },
    374 	{ 0x1025, 0x0855, "GeForce 820M" },
    375 	{ 0x1025, 0x0856, "GeForce 820M" },
    376 	{ 0x1025, 0x0857, "GeForce 820M" },
    377 	{ 0x1025, 0x0858, "GeForce 820M" },
    378 	{ 0x1025, 0x0863, "GeForce 820M" },
    379 	{ 0x1025, 0x0868, "GeForce 820M" },
    380 	{ 0x1025, 0x0869, "GeForce 810M" },
    381 	{ 0x1025, 0x0873, "GeForce 820M" },
    382 	{ 0x1025, 0x0878, "GeForce 820M" },
    383 	{ 0x1025, 0x087b, "GeForce 820M" },
    384 	{ 0x1025, 0x087f, "GeForce 820M" },
    385 	{ 0x1025, 0x0881, "GeForce 820M" },
    386 	{ 0x1025, 0x0885, "GeForce 820M" },
    387 	{ 0x1025, 0x088a, "GeForce 820M" },
    388 	{ 0x1025, 0x089b, "GeForce 820M" },
    389 	{ 0x1025, 0x0921, "GeForce 820M" },
    390 	{ 0x1025, 0x092e, "GeForce 810M" },
    391 	{ 0x1025, 0x092f, "GeForce 820M" },
    392 	{ 0x1025, 0x0932, "GeForce 820M" },
    393 	{ 0x1025, 0x093a, "GeForce 820M" },
    394 	{ 0x1025, 0x093c, "GeForce 820M" },
    395 	{ 0x1025, 0x093f, "GeForce 820M" },
    396 	{ 0x1025, 0x0941, "GeForce 820M" },
    397 	{ 0x1025, 0x0945, "GeForce 820M" },
    398 	{ 0x1025, 0x0954, "GeForce 820M" },
    399 	{ 0x1025, 0x0965, "GeForce 820M" },
    400 	{ 0x1028, 0x054d, "GeForce GT 630M" },
    401 	{ 0x1028, 0x054e, "GeForce GT 630M" },
    402 	{ 0x1028, 0x0554, "GeForce GT 620M" },
    403 	{ 0x1028, 0x0557, "GeForce GT 620M" },
    404 	{ 0x1028, 0x0562, "GeForce GT625M" },
    405 	{ 0x1028, 0x0565, "GeForce GT 630M" },
    406 	{ 0x1028, 0x0568, "GeForce GT 630M" },
    407 	{ 0x1028, 0x0590, "GeForce GT 630M" },
    408 	{ 0x1028, 0x0592, "GeForce GT625M" },
    409 	{ 0x1028, 0x0594, "GeForce GT625M" },
    410 	{ 0x1028, 0x0595, "GeForce GT625M" },
    411 	{ 0x1028, 0x05a2, "GeForce GT625M" },
    412 	{ 0x1028, 0x05b1, "GeForce GT625M" },
    413 	{ 0x1028, 0x05b3, "GeForce GT625M" },
    414 	{ 0x1028, 0x05da, "GeForce GT 630M" },
    415 	{ 0x1028, 0x05de, "GeForce GT 720M" },
    416 	{ 0x1028, 0x05e0, "GeForce GT 720M" },
    417 	{ 0x1028, 0x05e8, "GeForce GT 630M" },
    418 	{ 0x1028, 0x05f4, "GeForce GT 720M" },
    419 	{ 0x1028, 0x060f, "GeForce GT 720M" },
    420 	{ 0x1028, 0x062f, "GeForce GT 720M" },
    421 	{ 0x1028, 0x064e, "GeForce 820M" },
    422 	{ 0x1028, 0x0652, "GeForce 820M" },
    423 	{ 0x1028, 0x0653, "GeForce 820M" },
    424 	{ 0x1028, 0x0655, "GeForce 820M" },
    425 	{ 0x1028, 0x065e, "GeForce 820M" },
    426 	{ 0x1028, 0x0662, "GeForce 820M" },
    427 	{ 0x1028, 0x068d, "GeForce 820M" },
    428 	{ 0x1028, 0x06ad, "GeForce 820M" },
    429 	{ 0x1028, 0x06ae, "GeForce 820M" },
    430 	{ 0x1028, 0x06af, "GeForce 820M" },
    431 	{ 0x1028, 0x06b0, "GeForce 820M" },
    432 	{ 0x1028, 0x06c0, "GeForce 820M" },
    433 	{ 0x1028, 0x06c1, "GeForce 820M" },
    434 	{ 0x103c, 0x18ef, "GeForce GT 630M" },
    435 	{ 0x103c, 0x18f9, "GeForce GT 630M" },
    436 	{ 0x103c, 0x18fb, "GeForce GT 630M" },
    437 	{ 0x103c, 0x18fd, "GeForce GT 630M" },
    438 	{ 0x103c, 0x18ff, "GeForce GT 630M" },
    439 	{ 0x103c, 0x218a, "GeForce 820M" },
    440 	{ 0x103c, 0x21bb, "GeForce 820M" },
    441 	{ 0x103c, 0x21bc, "GeForce 820M" },
    442 	{ 0x103c, 0x220e, "GeForce 820M" },
    443 	{ 0x103c, 0x2210, "GeForce 820M" },
    444 	{ 0x103c, 0x2212, "GeForce 820M" },
    445 	{ 0x103c, 0x2214, "GeForce 820M" },
    446 	{ 0x103c, 0x2218, "GeForce 820M" },
    447 	{ 0x103c, 0x225b, "GeForce 820M" },
    448 	{ 0x103c, 0x225d, "GeForce 820M" },
    449 	{ 0x103c, 0x226d, "GeForce 820M" },
    450 	{ 0x103c, 0x226f, "GeForce 820M" },
    451 	{ 0x103c, 0x22d2, "GeForce 820M" },
    452 	{ 0x103c, 0x22d9, "GeForce 820M" },
    453 	{ 0x103c, 0x2335, "GeForce 820M" },
    454 	{ 0x103c, 0x2337, "GeForce 820M" },
    455 	{ 0x103c, 0x2aef, "GeForce GT 720A" },
    456 	{ 0x103c, 0x2af9, "GeForce 710A" },
    457 	{ 0x1043, 0x10dd, "NVS 5200M" },
    458 	{ 0x1043, 0x10ed, "NVS 5200M" },
    459 	{ 0x1043, 0x11fd, "GeForce GT 720M" },
    460 	{ 0x1043, 0x124d, "GeForce GT 720M" },
    461 	{ 0x1043, 0x126d, "GeForce GT 720M" },
    462 	{ 0x1043, 0x131d, "GeForce GT 720M" },
    463 	{ 0x1043, 0x13fd, "GeForce GT 720M" },
    464 	{ 0x1043, 0x14c7, "GeForce GT 720M" },
    465 	{ 0x1043, 0x1507, "GeForce GT 620M" },
    466 	{ 0x1043, 0x15ad, "GeForce 820M" },
    467 	{ 0x1043, 0x15ed, "GeForce 820M" },
    468 	{ 0x1043, 0x160d, "GeForce 820M" },
    469 	{ 0x1043, 0x163d, "GeForce 820M" },
    470 	{ 0x1043, 0x165d, "GeForce 820M" },
    471 	{ 0x1043, 0x166d, "GeForce 820M" },
    472 	{ 0x1043, 0x16cd, "GeForce 820M" },
    473 	{ 0x1043, 0x16dd, "GeForce 820M" },
    474 	{ 0x1043, 0x170d, "GeForce 820M" },
    475 	{ 0x1043, 0x176d, "GeForce 820M" },
    476 	{ 0x1043, 0x178d, "GeForce 820M" },
    477 	{ 0x1043, 0x179d, "GeForce 820M" },
    478 	{ 0x1043, 0x2132, "GeForce GT 620M" },
    479 	{ 0x1043, 0x2136, "NVS 5200M" },
    480 	{ 0x1043, 0x21ba, "GeForce GT 720M" },
    481 	{ 0x1043, 0x21fa, "GeForce GT 720M" },
    482 	{ 0x1043, 0x220a, "GeForce GT 720M" },
    483 	{ 0x1043, 0x221a, "GeForce GT 720M" },
    484 	{ 0x1043, 0x223a, "GeForce GT 710M" },
    485 	{ 0x1043, 0x224a, "GeForce GT 710M" },
    486 	{ 0x1043, 0x227a, "GeForce 820M" },
    487 	{ 0x1043, 0x228a, "GeForce 820M" },
    488 	{ 0x1043, 0x22fa, "GeForce 820M" },
    489 	{ 0x1043, 0x232a, "GeForce 820M" },
    490 	{ 0x1043, 0x233a, "GeForce 820M" },
    491 	{ 0x1043, 0x235a, "GeForce 820M" },
    492 	{ 0x1043, 0x236a, "GeForce 820M" },
    493 	{ 0x1043, 0x238a, "GeForce 820M" },
    494 	{ 0x1043, 0x8595, "GeForce GT 720M" },
    495 	{ 0x1043, 0x85ea, "GeForce GT 720M" },
    496 	{ 0x1043, 0x85eb, "GeForce 820M" },
    497 	{ 0x1043, 0x85ec, "GeForce 820M" },
    498 	{ 0x1043, 0x85ee, "GeForce GT 720M" },
    499 	{ 0x1043, 0x85f3, "GeForce 820M" },
    500 	{ 0x1043, 0x860e, "GeForce 820M" },
    501 	{ 0x1043, 0x861a, "GeForce 820M" },
    502 	{ 0x1043, 0x861b, "GeForce 820M" },
    503 	{ 0x1043, 0x8628, "GeForce 820M" },
    504 	{ 0x1043, 0x8643, "GeForce 820M" },
    505 	{ 0x1043, 0x864c, "GeForce 820M" },
    506 	{ 0x1043, 0x8652, "GeForce 820M" },
    507 	{ 0x1043, 0x8660, "GeForce 820M" },
    508 	{ 0x1043, 0x8661, "GeForce 820M" },
    509 	{ 0x105b, 0x0dac, "GeForce GT 720M" },
    510 	{ 0x105b, 0x0dad, "GeForce GT 720M" },
    511 	{ 0x105b, 0x0ef3, "GeForce GT 720M" },
    512 	{ 0x10cf, 0x17f5, "GeForce GT 720M" },
    513 	{ 0x1179, 0xfa01, "GeForce 710M" },
    514 	{ 0x1179, 0xfa02, "GeForce 710M" },
    515 	{ 0x1179, 0xfa03, "GeForce 710M" },
    516 	{ 0x1179, 0xfa05, "GeForce 710M" },
    517 	{ 0x1179, 0xfa11, "GeForce 710M" },
    518 	{ 0x1179, 0xfa13, "GeForce 710M" },
    519 	{ 0x1179, 0xfa18, "GeForce 710M" },
    520 	{ 0x1179, 0xfa19, "GeForce 710M" },
    521 	{ 0x1179, 0xfa21, "GeForce 710M" },
    522 	{ 0x1179, 0xfa23, "GeForce 710M" },
    523 	{ 0x1179, 0xfa2a, "GeForce 710M" },
    524 	{ 0x1179, 0xfa32, "GeForce 710M" },
    525 	{ 0x1179, 0xfa33, "GeForce 710M" },
    526 	{ 0x1179, 0xfa36, "GeForce 710M" },
    527 	{ 0x1179, 0xfa38, "GeForce 710M" },
    528 	{ 0x1179, 0xfa42, "GeForce 710M" },
    529 	{ 0x1179, 0xfa43, "GeForce 710M" },
    530 	{ 0x1179, 0xfa45, "GeForce 710M" },
    531 	{ 0x1179, 0xfa47, "GeForce 710M" },
    532 	{ 0x1179, 0xfa49, "GeForce 710M" },
    533 	{ 0x1179, 0xfa58, "GeForce 710M" },
    534 	{ 0x1179, 0xfa59, "GeForce 710M" },
    535 	{ 0x1179, 0xfa88, "GeForce 710M" },
    536 	{ 0x1179, 0xfa89, "GeForce 710M" },
    537 	{ 0x144d, 0xb092, "GeForce GT 620M" },
    538 	{ 0x144d, 0xc0d5, "GeForce GT 630M" },
    539 	{ 0x144d, 0xc0d7, "GeForce GT 620M" },
    540 	{ 0x144d, 0xc0e2, "NVS 5200M" },
    541 	{ 0x144d, 0xc0e3, "NVS 5200M" },
    542 	{ 0x144d, 0xc0e4, "NVS 5200M" },
    543 	{ 0x144d, 0xc10d, "GeForce 820M" },
    544 	{ 0x144d, 0xc652, "GeForce GT 620M" },
    545 	{ 0x144d, 0xc709, "GeForce 710M" },
    546 	{ 0x144d, 0xc711, "GeForce 710M" },
    547 	{ 0x144d, 0xc736, "GeForce 710M" },
    548 	{ 0x144d, 0xc737, "GeForce 710M" },
    549 	{ 0x144d, 0xc745, "GeForce 820M" },
    550 	{ 0x144d, 0xc750, "GeForce 820M" },
    551 	{ 0x1462, 0x10b8, "GeForce GT 710M" },
    552 	{ 0x1462, 0x10e9, "GeForce GT 720M" },
    553 	{ 0x1462, 0x1116, "GeForce 820M" },
    554 	{ 0x1462, 0xaa33, "GeForce 720M" },
    555 	{ 0x1462, 0xaaa2, "GeForce GT 720M" },
    556 	{ 0x1462, 0xaaa3, "GeForce 820M" },
    557 	{ 0x1462, 0xacb2, "GeForce GT 720M" },
    558 	{ 0x1462, 0xacc1, "GeForce GT 720M" },
    559 	{ 0x1462, 0xae61, "GeForce 720M" },
    560 	{ 0x1462, 0xae65, "GeForce GT 720M" },
    561 	{ 0x1462, 0xae6a, "GeForce 820M" },
    562 	{ 0x1462, 0xae71, "GeForce GT 720M" },
    563 	{ 0x14c0, 0x0083, "GeForce 820M" },
    564 	{ 0x152d, 0x0926, "GeForce 620M" },
    565 	{ 0x152d, 0x0982, "GeForce GT 630M" },
    566 	{ 0x152d, 0x0983, "GeForce GT 630M" },
    567 	{ 0x152d, 0x1005, "GeForce GT820M" },
    568 	{ 0x152d, 0x1012, "GeForce 710M" },
    569 	{ 0x152d, 0x1019, "GeForce 820M" },
    570 	{ 0x152d, 0x1030, "GeForce GT 630M" },
    571 	{ 0x152d, 0x1055, "GeForce 710M" },
    572 	{ 0x152d, 0x1067, "GeForce GT 720M" },
    573 	{ 0x152d, 0x1092, "GeForce 820M" },
    574 	{ 0x17aa, 0x2200, "NVS 5200M" },
    575 	{ 0x17aa, 0x2213, "GeForce GT 720M" },
    576 	{ 0x17aa, 0x2220, "GeForce GT 720M" },
    577 	{ 0x17aa, 0x309c, "GeForce GT 720A" },
    578 	{ 0x17aa, 0x30b4, "GeForce 820A" },
    579 	{ 0x17aa, 0x30b7, "GeForce 720A" },
    580 	{ 0x17aa, 0x30e4, "GeForce 820A" },
    581 	{ 0x17aa, 0x361b, "GeForce 820A" },
    582 	{ 0x17aa, 0x361c, "GeForce 820A" },
    583 	{ 0x17aa, 0x361d, "GeForce 820A" },
    584 	{ 0x17aa, 0x3656, "GeForce GT620M" },
    585 	{ 0x17aa, 0x365a, "GeForce 705M" },
    586 	{ 0x17aa, 0x365e, "GeForce 800M" },
    587 	{ 0x17aa, 0x3661, "GeForce 820A" },
    588 	{ 0x17aa, 0x366c, "GeForce 800M" },
    589 	{ 0x17aa, 0x3685, "GeForce 800M" },
    590 	{ 0x17aa, 0x3686, "GeForce 800M" },
    591 	{ 0x17aa, 0x3687, "GeForce 705A" },
    592 	{ 0x17aa, 0x3696, "GeForce 820A" },
    593 	{ 0x17aa, 0x369b, "GeForce 820A" },
    594 	{ 0x17aa, 0x369c, "GeForce 820A" },
    595 	{ 0x17aa, 0x369d, "GeForce 820A" },
    596 	{ 0x17aa, 0x369e, "GeForce 820A" },
    597 	{ 0x17aa, 0x36a6, "GeForce 820A" },
    598 	{ 0x17aa, 0x36a7, "GeForce 820A" },
    599 	{ 0x17aa, 0x36a9, "GeForce 820A" },
    600 	{ 0x17aa, 0x36af, "GeForce 820A" },
    601 	{ 0x17aa, 0x36b0, "GeForce 820A" },
    602 	{ 0x17aa, 0x36b6, "GeForce 820A" },
    603 	{ 0x17aa, 0x3800, "GeForce GT 720M" },
    604 	{ 0x17aa, 0x3801, "GeForce GT 720M" },
    605 	{ 0x17aa, 0x3802, "GeForce GT 720M" },
    606 	{ 0x17aa, 0x3803, "GeForce GT 720M" },
    607 	{ 0x17aa, 0x3804, "GeForce GT 720M" },
    608 	{ 0x17aa, 0x3806, "GeForce GT 720M" },
    609 	{ 0x17aa, 0x3808, "GeForce GT 720M" },
    610 	{ 0x17aa, 0x380d, "GeForce 820M" },
    611 	{ 0x17aa, 0x380e, "GeForce 820M" },
    612 	{ 0x17aa, 0x380f, "GeForce 820M" },
    613 	{ 0x17aa, 0x3811, "GeForce 820M" },
    614 	{ 0x17aa, 0x3812, "GeForce 820M" },
    615 	{ 0x17aa, 0x3813, "GeForce 820M" },
    616 	{ 0x17aa, 0x3816, "GeForce 820M" },
    617 	{ 0x17aa, 0x3817, "GeForce 820M" },
    618 	{ 0x17aa, 0x3818, "GeForce 820M" },
    619 	{ 0x17aa, 0x381a, "GeForce 820M" },
    620 	{ 0x17aa, 0x381c, "GeForce 820M" },
    621 	{ 0x17aa, 0x381d, "GeForce 820M" },
    622 	{ 0x17aa, 0x3901, "GeForce 610M" },
    623 	{ 0x17aa, 0x3902, "GeForce 710M" },
    624 	{ 0x17aa, 0x3903, "GeForce 710M" },
    625 	{ 0x17aa, 0x3904, "GeForce GT 625M" },
    626 	{ 0x17aa, 0x3905, "GeForce GT 720M" },
    627 	{ 0x17aa, 0x3907, "GeForce 820M" },
    628 	{ 0x17aa, 0x3910, "GeForce GT 720M" },
    629 	{ 0x17aa, 0x3912, "GeForce GT 720M" },
    630 	{ 0x17aa, 0x3913, "GeForce 820M" },
    631 	{ 0x17aa, 0x3915, "GeForce 820M" },
    632 	{ 0x17aa, 0x3983, "GeForce 610M" },
    633 	{ 0x17aa, 0x5001, "GeForce 610M" },
    634 	{ 0x17aa, 0x5003, "GeForce GT 720M" },
    635 	{ 0x17aa, 0x5005, "GeForce 705M" },
    636 	{ 0x17aa, 0x500d, "GeForce GT 620M" },
    637 	{ 0x17aa, 0x5014, "GeForce 710M" },
    638 	{ 0x17aa, 0x5017, "GeForce 710M" },
    639 	{ 0x17aa, 0x5019, "GeForce 710M" },
    640 	{ 0x17aa, 0x501a, "GeForce 710M" },
    641 	{ 0x17aa, 0x501f, "GeForce GT 720M" },
    642 	{ 0x17aa, 0x5025, "GeForce 710M" },
    643 	{ 0x17aa, 0x5027, "GeForce 710M" },
    644 	{ 0x17aa, 0x502a, "GeForce 710M" },
    645 	{ 0x17aa, 0x502b, "GeForce GT 720M" },
    646 	{ 0x17aa, 0x502d, "GeForce 710M" },
    647 	{ 0x17aa, 0x502e, "GeForce GT 720M" },
    648 	{ 0x17aa, 0x502f, "GeForce GT 720M" },
    649 	{ 0x17aa, 0x5030, "GeForce 705M" },
    650 	{ 0x17aa, 0x5031, "GeForce 705M" },
    651 	{ 0x17aa, 0x5032, "GeForce 820M" },
    652 	{ 0x17aa, 0x5033, "GeForce 820M" },
    653 	{ 0x17aa, 0x503e, "GeForce 710M" },
    654 	{ 0x17aa, 0x503f, "GeForce 820M" },
    655 	{ 0x17aa, 0x5040, "GeForce 820M" },
    656 	{ 0x1854, 0x0177, "GeForce 710M" },
    657 	{ 0x1854, 0x0180, "GeForce 710M" },
    658 	{ 0x1854, 0x0190, "GeForce GT 720M" },
    659 	{ 0x1854, 0x0192, "GeForce GT 720M" },
    660 	{ 0x1854, 0x0224, "GeForce 820M" },
    661 	{ 0x1b0a, 0x20dd, "GeForce GT 620M" },
    662 	{ 0x1b0a, 0x20df, "GeForce GT 620M" },
    663 	{ 0x1b0a, 0x210e, "GeForce 820M" },
    664 	{ 0x1b0a, 0x2202, "GeForce GT 720M" },
    665 	{ 0x1b0a, 0x90d7, "GeForce 820M" },
    666 	{ 0x1b0a, 0x90dd, "GeForce 820M" },
    667 	{ 0x1b50, 0x5530, "GeForce 820M" },
    668 	{}
    669 };
    670 
    671 static const struct nvkm_device_pci_vendor
    672 nvkm_device_pci_10de_1185[] = {
    673 	{ 0x10de, 0x106f, "GeForce GTX 760" },
    674 	{}
    675 };
    676 
    677 static const struct nvkm_device_pci_vendor
    678 nvkm_device_pci_10de_1189[] = {
    679 	{ 0x10de, 0x1074, "GeForce GTX 760 Ti OEM" },
    680 	{}
    681 };
    682 
    683 static const struct nvkm_device_pci_vendor
    684 nvkm_device_pci_10de_1199[] = {
    685 	{ 0x1458, 0xd001, "GeForce GTX 760" },
    686 	{}
    687 };
    688 
    689 static const struct nvkm_device_pci_vendor
    690 nvkm_device_pci_10de_11e3[] = {
    691 	{ 0x17aa, 0x3683, "GeForce GTX 760A" },
    692 	{}
    693 };
    694 
    695 static const struct nvkm_device_pci_vendor
    696 nvkm_device_pci_10de_1247[] = {
    697 	{ 0x1043, 0x212a, "GeForce GT 635M" },
    698 	{ 0x1043, 0x212b, "GeForce GT 635M" },
    699 	{ 0x1043, 0x212c, "GeForce GT 635M" },
    700 	{}
    701 };
    702 
    703 static const struct nvkm_device_pci_vendor
    704 nvkm_device_pci_10de_124d[] = {
    705 	{ 0x1462, 0x10cc, "GeForce GT 635M" },
    706 	{}
    707 };
    708 
    709 static const struct nvkm_device_pci_vendor
    710 nvkm_device_pci_10de_1290[] = {
    711 	{ 0x103c, 0x2afa, "GeForce 730A" },
    712 	{}
    713 };
    714 
    715 static const struct nvkm_device_pci_vendor
    716 nvkm_device_pci_10de_1292[] = {
    717 	{ 0x17aa, 0x3675, "GeForce GT 740A" },
    718 	{ 0x17aa, 0x367c, "GeForce GT 740A" },
    719 	{ 0x17aa, 0x3684, "GeForce GT 740A" },
    720 	{}
    721 };
    722 
    723 static const struct nvkm_device_pci_vendor
    724 nvkm_device_pci_10de_1295[] = {
    725 	{ 0x103c, 0x2b0d, "GeForce 710A" },
    726 	{ 0x103c, 0x2b0f, "GeForce 710A" },
    727 	{ 0x103c, 0x2b20, "GeForce 810A" },
    728 	{ 0x103c, 0x2b21, "GeForce 810A" },
    729 	{}
    730 };
    731 
    732 static const struct nvkm_device_pci_vendor
    733 nvkm_device_pci_10de_1299[] = {
    734 	{ 0x17aa, 0x369b, "GeForce 920A" },
    735 	{}
    736 };
    737 
    738 static const struct nvkm_device_pci_vendor
    739 nvkm_device_pci_10de_1340[] = {
    740 	{ 0x103c, 0x2b2b, "GeForce 830A" },
    741 	{}
    742 };
    743 
    744 static const struct nvkm_device_pci_vendor
    745 nvkm_device_pci_10de_1341[] = {
    746 	{ 0x17aa, 0x3697, "GeForce 840A" },
    747 	{ 0x17aa, 0x3699, "GeForce 840A" },
    748 	{ 0x17aa, 0x369c, "GeForce 840A" },
    749 	{ 0x17aa, 0x36af, "GeForce 840A" },
    750 	{}
    751 };
    752 
    753 static const struct nvkm_device_pci_vendor
    754 nvkm_device_pci_10de_1346[] = {
    755 	{ 0x17aa, 0x30ba, "GeForce 930A" },
    756 	{ 0x17aa, 0x362c, "GeForce 930A" },
    757 	{}
    758 };
    759 
    760 static const struct nvkm_device_pci_vendor
    761 nvkm_device_pci_10de_1347[] = {
    762 	{ 0x17aa, 0x36b9, "GeForce 940A" },
    763 	{ 0x17aa, 0x36ba, "GeForce 940A" },
    764 	{}
    765 };
    766 
    767 static const struct nvkm_device_pci_vendor
    768 nvkm_device_pci_10de_137a[] = {
    769 	{ 0x17aa, 0x2225, "Quadro K620M" },
    770 	{}
    771 };
    772 
    773 static const struct nvkm_device_pci_vendor
    774 nvkm_device_pci_10de_137d[] = {
    775 	{ 0x17aa, 0x3699, "GeForce 940A" },
    776 	{}
    777 };
    778 
    779 static const struct nvkm_device_pci_vendor
    780 nvkm_device_pci_10de_1391[] = {
    781 	{ 0x17aa, 0x3697, "GeForce GTX 850A" },
    782 	{}
    783 };
    784 
    785 static const struct nvkm_device_pci_vendor
    786 nvkm_device_pci_10de_1392[] = {
    787 	{ 0x1028, 0x066a, "GeForce GPU" },
    788 	{ 0x1043, 0x861e, "GeForce GTX 750 Ti" },
    789 	{}
    790 };
    791 
    792 static const struct nvkm_device_pci_vendor
    793 nvkm_device_pci_10de_139a[] = {
    794 	{ 0x17aa, 0x36b9, "GeForce GTX 950A" },
    795 	{}
    796 };
    797 
    798 static const struct nvkm_device_pci_vendor
    799 nvkm_device_pci_10de_139b[] = {
    800 	{ 0x1028, 0x06a3, "GeForce GTX 860M" },
    801 	{ 0x19da, 0xc248, "GeForce GTX 750 Ti" },
    802 	{}
    803 };
    804 
    805 static const struct nvkm_device_pci_device
    806 nvkm_device_pci_10de[] = {
    807 	{ 0x0020, "RIVA TNT" },
    808 	{ 0x0028, "RIVA TNT2/TNT2 Pro" },
    809 	{ 0x0029, "RIVA TNT2 Ultra" },
    810 	{ 0x002c, "Vanta/Vanta LT" },
    811 	{ 0x002d, "RIVA TNT2 Model 64/Model 64 Pro" },
    812 	{ 0x0040, "GeForce 6800 Ultra" },
    813 	{ 0x0041, "GeForce 6800" },
    814 	{ 0x0042, "GeForce 6800 LE" },
    815 	{ 0x0043, "GeForce 6800 XE" },
    816 	{ 0x0044, "GeForce 6800 XT" },
    817 	{ 0x0045, "GeForce 6800 GT" },
    818 	{ 0x0046, "GeForce 6800 GT" },
    819 	{ 0x0047, "GeForce 6800 GS" },
    820 	{ 0x0048, "GeForce 6800 XT" },
    821 	{ 0x004e, "Quadro FX 4000" },
    822 	{ 0x0090, "GeForce 7800 GTX" },
    823 	{ 0x0091, "GeForce 7800 GTX" },
    824 	{ 0x0092, "GeForce 7800 GT" },
    825 	{ 0x0093, "GeForce 7800 GS" },
    826 	{ 0x0095, "GeForce 7800 SLI" },
    827 	{ 0x0098, "GeForce Go 7800" },
    828 	{ 0x0099, "GeForce Go 7800 GTX" },
    829 	{ 0x009d, "Quadro FX 4500" },
    830 	{ 0x00a0, "Aladdin TNT2" },
    831 	{ 0x00c0, "GeForce 6800 GS" },
    832 	{ 0x00c1, "GeForce 6800" },
    833 	{ 0x00c2, "GeForce 6800 LE" },
    834 	{ 0x00c3, "GeForce 6800 XT" },
    835 	{ 0x00c8, "GeForce Go 6800" },
    836 	{ 0x00c9, "GeForce Go 6800 Ultra" },
    837 	{ 0x00cc, "Quadro FX Go1400" },
    838 	{ 0x00cd, "Quadro FX 3450/4000 SDI" },
    839 	{ 0x00ce, "Quadro FX 1400" },
    840 	{ 0x00f1, "GeForce 6600 GT" },
    841 	{ 0x00f2, "GeForce 6600" },
    842 	{ 0x00f3, "GeForce 6200" },
    843 	{ 0x00f4, "GeForce 6600 LE" },
    844 	{ 0x00f5, "GeForce 7800 GS" },
    845 	{ 0x00f6, "GeForce 6800 GS" },
    846 	{ 0x00f8, "Quadro FX 3400/Quadro FX 4000" },
    847 	{ 0x00f9, "GeForce 6800 Ultra" },
    848 	{ 0x00fa, "GeForce PCX 5750" },
    849 	{ 0x00fb, "GeForce PCX 5900" },
    850 	{ 0x00fc, "Quadro FX 330/GeForce PCX 5300" },
    851 	{ 0x00fd, "Quadro FX 330/Quadro NVS 280 PCI-E" },
    852 	{ 0x00fe, "Quadro FX 1300" },
    853 	{ 0x0100, "GeForce 256" },
    854 	{ 0x0101, "GeForce DDR" },
    855 	{ 0x0103, "Quadro" },
    856 	{ 0x0110, "GeForce2 MX/MX 400" },
    857 	{ 0x0111, "GeForce2 MX 100/200" },
    858 	{ 0x0112, "GeForce2 Go" },
    859 	{ 0x0113, "Quadro2 MXR/EX/Go" },
    860 	{ 0x0140, "GeForce 6600 GT" },
    861 	{ 0x0141, "GeForce 6600" },
    862 	{ 0x0142, "GeForce 6600 LE" },
    863 	{ 0x0143, "GeForce 6600 VE" },
    864 	{ 0x0144, "GeForce Go 6600" },
    865 	{ 0x0145, "GeForce 6610 XL" },
    866 	{ 0x0146, "GeForce Go 6600 TE/6200 TE" },
    867 	{ 0x0147, "GeForce 6700 XL" },
    868 	{ 0x0148, "GeForce Go 6600" },
    869 	{ 0x0149, "GeForce Go 6600 GT" },
    870 	{ 0x014a, "Quadro NVS 440" },
    871 	{ 0x014c, "Quadro FX 540M" },
    872 	{ 0x014d, "Quadro FX 550" },
    873 	{ 0x014e, "Quadro FX 540" },
    874 	{ 0x014f, "GeForce 6200" },
    875 	{ 0x0150, "GeForce2 GTS/GeForce2 Pro" },
    876 	{ 0x0151, "GeForce2 Ti" },
    877 	{ 0x0152, "GeForce2 Ultra" },
    878 	{ 0x0153, "Quadro2 Pro" },
    879 	{ 0x0160, "GeForce 6500" },
    880 	{ 0x0161, "GeForce 6200 TurboCache(TM)" },
    881 	{ 0x0162, "GeForce 6200SE TurboCache(TM)" },
    882 	{ 0x0163, "GeForce 6200 LE" },
    883 	{ 0x0164, "GeForce Go 6200" },
    884 	{ 0x0165, "Quadro NVS 285" },
    885 	{ 0x0166, "GeForce Go 6400" },
    886 	{ 0x0167, "GeForce Go 6200" },
    887 	{ 0x0168, "GeForce Go 6400" },
    888 	{ 0x0169, "GeForce 6250" },
    889 	{ 0x016a, "GeForce 7100 GS" },
    890 	{ 0x0170, "GeForce4 MX 460" },
    891 	{ 0x0171, "GeForce4 MX 440" },
    892 	{ 0x0172, "GeForce4 MX 420" },
    893 	{ 0x0173, "GeForce4 MX 440-SE" },
    894 	{ 0x0174, "GeForce4 440 Go" },
    895 	{ 0x0175, "GeForce4 420 Go" },
    896 	{ 0x0176, "GeForce4 420 Go 32M" },
    897 	{ 0x0177, "GeForce4 460 Go" },
    898 	{ 0x0178, "Quadro4 550 XGL" },
    899 	{ 0x0179, "GeForce4 440 Go 64M" },
    900 	{ 0x017a, "Quadro NVS 400" },
    901 	{ 0x017c, "Quadro4 500 GoGL" },
    902 	{ 0x017d, "GeForce4 410 Go 16M" },
    903 	{ 0x0181, "GeForce4 MX 440 with AGP8X" },
    904 	{ 0x0182, "GeForce4 MX 440SE with AGP8X" },
    905 	{ 0x0183, "GeForce4 MX 420 with AGP8X" },
    906 	{ 0x0185, "GeForce4 MX 4000" },
    907 	{ 0x0188, "Quadro4 580 XGL" },
    908 	{ 0x0189, "GeForce4 MX with AGP8X (Mac)", nvkm_device_pci_10de_0189 },
    909 	{ 0x018a, "Quadro NVS 280 SD" },
    910 	{ 0x018b, "Quadro4 380 XGL" },
    911 	{ 0x018c, "Quadro NVS 50 PCI" },
    912 	{ 0x0191, "GeForce 8800 GTX" },
    913 	{ 0x0193, "GeForce 8800 GTS" },
    914 	{ 0x0194, "GeForce 8800 Ultra" },
    915 	{ 0x0197, "Tesla C870" },
    916 	{ 0x019d, "Quadro FX 5600" },
    917 	{ 0x019e, "Quadro FX 4600" },
    918 	{ 0x01a0, "GeForce2 Integrated GPU" },
    919 	{ 0x01d0, "GeForce 7350 LE" },
    920 	{ 0x01d1, "GeForce 7300 LE" },
    921 	{ 0x01d2, "GeForce 7550 LE" },
    922 	{ 0x01d3, "GeForce 7300 SE/7200 GS" },
    923 	{ 0x01d6, "GeForce Go 7200" },
    924 	{ 0x01d7, "GeForce Go 7300" },
    925 	{ 0x01d8, "GeForce Go 7400" },
    926 	{ 0x01da, "Quadro NVS 110M" },
    927 	{ 0x01db, "Quadro NVS 120M" },
    928 	{ 0x01dc, "Quadro FX 350M" },
    929 	{ 0x01dd, "GeForce 7500 LE" },
    930 	{ 0x01de, "Quadro FX 350" },
    931 	{ 0x01df, "GeForce 7300 GS" },
    932 	{ 0x01f0, "GeForce4 MX Integrated GPU", nvkm_device_pci_10de_01f0 },
    933 	{ 0x0200, "GeForce3" },
    934 	{ 0x0201, "GeForce3 Ti 200" },
    935 	{ 0x0202, "GeForce3 Ti 500" },
    936 	{ 0x0203, "Quadro DCC" },
    937 	{ 0x0211, "GeForce 6800" },
    938 	{ 0x0212, "GeForce 6800 LE" },
    939 	{ 0x0215, "GeForce 6800 GT" },
    940 	{ 0x0218, "GeForce 6800 XT" },
    941 	{ 0x0221, "GeForce 6200" },
    942 	{ 0x0222, "GeForce 6200 A-LE" },
    943 	{ 0x0240, "GeForce 6150" },
    944 	{ 0x0241, "GeForce 6150 LE" },
    945 	{ 0x0242, "GeForce 6100" },
    946 	{ 0x0244, "GeForce Go 6150" },
    947 	{ 0x0245, "Quadro NVS 210S / GeForce 6150LE" },
    948 	{ 0x0247, "GeForce Go 6100" },
    949 	{ 0x0250, "GeForce4 Ti 4600" },
    950 	{ 0x0251, "GeForce4 Ti 4400" },
    951 	{ 0x0253, "GeForce4 Ti 4200" },
    952 	{ 0x0258, "Quadro4 900 XGL" },
    953 	{ 0x0259, "Quadro4 750 XGL" },
    954 	{ 0x025b, "Quadro4 700 XGL" },
    955 	{ 0x0280, "GeForce4 Ti 4800" },
    956 	{ 0x0281, "GeForce4 Ti 4200 with AGP8X" },
    957 	{ 0x0282, "GeForce4 Ti 4800 SE" },
    958 	{ 0x0286, "GeForce4 4200 Go" },
    959 	{ 0x0288, "Quadro4 980 XGL" },
    960 	{ 0x0289, "Quadro4 780 XGL" },
    961 	{ 0x028c, "Quadro4 700 GoGL" },
    962 	{ 0x0290, "GeForce 7900 GTX" },
    963 	{ 0x0291, "GeForce 7900 GT/GTO" },
    964 	{ 0x0292, "GeForce 7900 GS" },
    965 	{ 0x0293, "GeForce 7950 GX2" },
    966 	{ 0x0294, "GeForce 7950 GX2" },
    967 	{ 0x0295, "GeForce 7950 GT" },
    968 	{ 0x0297, "GeForce Go 7950 GTX" },
    969 	{ 0x0298, "GeForce Go 7900 GS" },
    970 	{ 0x0299, "Quadro NVS 510M" },
    971 	{ 0x029a, "Quadro FX 2500M" },
    972 	{ 0x029b, "Quadro FX 1500M" },
    973 	{ 0x029c, "Quadro FX 5500" },
    974 	{ 0x029d, "Quadro FX 3500" },
    975 	{ 0x029e, "Quadro FX 1500" },
    976 	{ 0x029f, "Quadro FX 4500 X2" },
    977 	{ 0x02e0, "GeForce 7600 GT" },
    978 	{ 0x02e1, "GeForce 7600 GS" },
    979 	{ 0x02e2, "GeForce 7300 GT" },
    980 	{ 0x02e3, "GeForce 7900 GS" },
    981 	{ 0x02e4, "GeForce 7950 GT" },
    982 	{ 0x0301, "GeForce FX 5800 Ultra" },
    983 	{ 0x0302, "GeForce FX 5800" },
    984 	{ 0x0308, "Quadro FX 2000" },
    985 	{ 0x0309, "Quadro FX 1000" },
    986 	{ 0x0311, "GeForce FX 5600 Ultra" },
    987 	{ 0x0312, "GeForce FX 5600" },
    988 	{ 0x0314, "GeForce FX 5600XT" },
    989 	{ 0x031a, "GeForce FX Go5600" },
    990 	{ 0x031b, "GeForce FX Go5650" },
    991 	{ 0x031c, "Quadro FX Go700" },
    992 	{ 0x0320, "GeForce FX 5200" },
    993 	{ 0x0321, "GeForce FX 5200 Ultra" },
    994 	{ 0x0322, "GeForce FX 5200", nvkm_device_pci_10de_0322 },
    995 	{ 0x0323, "GeForce FX 5200LE" },
    996 	{ 0x0324, "GeForce FX Go5200" },
    997 	{ 0x0325, "GeForce FX Go5250" },
    998 	{ 0x0326, "GeForce FX 5500" },
    999 	{ 0x0327, "GeForce FX 5100" },
   1000 	{ 0x0328, "GeForce FX Go5200 32M/64M" },
   1001 	{ 0x032a, "Quadro NVS 55/280 PCI" },
   1002 	{ 0x032b, "Quadro FX 500/FX 600" },
   1003 	{ 0x032c, "GeForce FX Go53xx" },
   1004 	{ 0x032d, "GeForce FX Go5100" },
   1005 	{ 0x0330, "GeForce FX 5900 Ultra" },
   1006 	{ 0x0331, "GeForce FX 5900" },
   1007 	{ 0x0332, "GeForce FX 5900XT" },
   1008 	{ 0x0333, "GeForce FX 5950 Ultra" },
   1009 	{ 0x0334, "GeForce FX 5900ZT" },
   1010 	{ 0x0338, "Quadro FX 3000" },
   1011 	{ 0x033f, "Quadro FX 700" },
   1012 	{ 0x0341, "GeForce FX 5700 Ultra" },
   1013 	{ 0x0342, "GeForce FX 5700" },
   1014 	{ 0x0343, "GeForce FX 5700LE" },
   1015 	{ 0x0344, "GeForce FX 5700VE" },
   1016 	{ 0x0347, "GeForce FX Go5700" },
   1017 	{ 0x0348, "GeForce FX Go5700" },
   1018 	{ 0x034c, "Quadro FX Go1000" },
   1019 	{ 0x034e, "Quadro FX 1100" },
   1020 	{ 0x038b, "GeForce 7650 GS" },
   1021 	{ 0x0390, "GeForce 7650 GS" },
   1022 	{ 0x0391, "GeForce 7600 GT" },
   1023 	{ 0x0392, "GeForce 7600 GS" },
   1024 	{ 0x0393, "GeForce 7300 GT" },
   1025 	{ 0x0394, "GeForce 7600 LE" },
   1026 	{ 0x0395, "GeForce 7300 GT" },
   1027 	{ 0x0397, "GeForce Go 7700" },
   1028 	{ 0x0398, "GeForce Go 7600" },
   1029 	{ 0x0399, "GeForce Go 7600 GT" },
   1030 	{ 0x039c, "Quadro FX 560M" },
   1031 	{ 0x039e, "Quadro FX 560" },
   1032 	{ 0x03d0, "GeForce 6150SE nForce 430" },
   1033 	{ 0x03d1, "GeForce 6100 nForce 405" },
   1034 	{ 0x03d2, "GeForce 6100 nForce 400" },
   1035 	{ 0x03d5, "GeForce 6100 nForce 420" },
   1036 	{ 0x03d6, "GeForce 7025 / nForce 630a" },
   1037 	{ 0x0400, "GeForce 8600 GTS" },
   1038 	{ 0x0401, "GeForce 8600 GT" },
   1039 	{ 0x0402, "GeForce 8600 GT" },
   1040 	{ 0x0403, "GeForce 8600 GS" },
   1041 	{ 0x0404, "GeForce 8400 GS" },
   1042 	{ 0x0405, "GeForce 9500M GS" },
   1043 	{ 0x0406, "GeForce 8300 GS" },
   1044 	{ 0x0407, "GeForce 8600M GT" },
   1045 	{ 0x0408, "GeForce 9650M GS" },
   1046 	{ 0x0409, "GeForce 8700M GT" },
   1047 	{ 0x040a, "Quadro FX 370" },
   1048 	{ 0x040b, "Quadro NVS 320M" },
   1049 	{ 0x040c, "Quadro FX 570M" },
   1050 	{ 0x040d, "Quadro FX 1600M" },
   1051 	{ 0x040e, "Quadro FX 570" },
   1052 	{ 0x040f, "Quadro FX 1700" },
   1053 	{ 0x0410, "GeForce GT 330" },
   1054 	{ 0x0420, "GeForce 8400 SE" },
   1055 	{ 0x0421, "GeForce 8500 GT" },
   1056 	{ 0x0422, "GeForce 8400 GS" },
   1057 	{ 0x0423, "GeForce 8300 GS" },
   1058 	{ 0x0424, "GeForce 8400 GS" },
   1059 	{ 0x0425, "GeForce 8600M GS" },
   1060 	{ 0x0426, "GeForce 8400M GT" },
   1061 	{ 0x0427, "GeForce 8400M GS" },
   1062 	{ 0x0428, "GeForce 8400M G" },
   1063 	{ 0x0429, "Quadro NVS 140M" },
   1064 	{ 0x042a, "Quadro NVS 130M" },
   1065 	{ 0x042b, "Quadro NVS 135M" },
   1066 	{ 0x042c, "GeForce 9400 GT" },
   1067 	{ 0x042d, "Quadro FX 360M" },
   1068 	{ 0x042e, "GeForce 9300M G" },
   1069 	{ 0x042f, "Quadro NVS 290" },
   1070 	{ 0x0531, "GeForce 7150M / nForce 630M" },
   1071 	{ 0x0533, "GeForce 7000M / nForce 610M" },
   1072 	{ 0x053a, "GeForce 7050 PV / nForce 630a" },
   1073 	{ 0x053b, "GeForce 7050 PV / nForce 630a" },
   1074 	{ 0x053e, "GeForce 7025 / nForce 630a" },
   1075 	{ 0x05e0, "GeForce GTX 295" },
   1076 	{ 0x05e1, "GeForce GTX 280" },
   1077 	{ 0x05e2, "GeForce GTX 260" },
   1078 	{ 0x05e3, "GeForce GTX 285" },
   1079 	{ 0x05e6, "GeForce GTX 275" },
   1080 	{ 0x05e7, "Tesla C1060", nvkm_device_pci_10de_05e7 },
   1081 	{ 0x05ea, "GeForce GTX 260" },
   1082 	{ 0x05eb, "GeForce GTX 295" },
   1083 	{ 0x05ed, "Quadroplex 2200 D2" },
   1084 	{ 0x05f8, "Quadroplex 2200 S4" },
   1085 	{ 0x05f9, "Quadro CX" },
   1086 	{ 0x05fd, "Quadro FX 5800" },
   1087 	{ 0x05fe, "Quadro FX 4800" },
   1088 	{ 0x05ff, "Quadro FX 3800" },
   1089 	{ 0x0600, "GeForce 8800 GTS 512" },
   1090 	{ 0x0601, "GeForce 9800 GT" },
   1091 	{ 0x0602, "GeForce 8800 GT" },
   1092 	{ 0x0603, "GeForce GT 230" },
   1093 	{ 0x0604, "GeForce 9800 GX2" },
   1094 	{ 0x0605, "GeForce 9800 GT" },
   1095 	{ 0x0606, "GeForce 8800 GS" },
   1096 	{ 0x0607, "GeForce GTS 240" },
   1097 	{ 0x0608, "GeForce 9800M GTX" },
   1098 	{ 0x0609, "GeForce 8800M GTS", nvkm_device_pci_10de_0609 },
   1099 	{ 0x060a, "GeForce GTX 280M" },
   1100 	{ 0x060b, "GeForce 9800M GT" },
   1101 	{ 0x060c, "GeForce 8800M GTX" },
   1102 	{ 0x060d, "GeForce 8800 GS" },
   1103 	{ 0x060f, "GeForce GTX 285M" },
   1104 	{ 0x0610, "GeForce 9600 GSO" },
   1105 	{ 0x0611, "GeForce 8800 GT" },
   1106 	{ 0x0612, "GeForce 9800 GTX/9800 GTX+" },
   1107 	{ 0x0613, "GeForce 9800 GTX+" },
   1108 	{ 0x0614, "GeForce 9800 GT" },
   1109 	{ 0x0615, "GeForce GTS 250" },
   1110 	{ 0x0617, "GeForce 9800M GTX" },
   1111 	{ 0x0618, "GeForce GTX 260M" },
   1112 	{ 0x0619, "Quadro FX 4700 X2" },
   1113 	{ 0x061a, "Quadro FX 3700" },
   1114 	{ 0x061b, "Quadro VX 200" },
   1115 	{ 0x061c, "Quadro FX 3600M" },
   1116 	{ 0x061d, "Quadro FX 2800M" },
   1117 	{ 0x061e, "Quadro FX 3700M" },
   1118 	{ 0x061f, "Quadro FX 3800M" },
   1119 	{ 0x0621, "GeForce GT 230" },
   1120 	{ 0x0622, "GeForce 9600 GT" },
   1121 	{ 0x0623, "GeForce 9600 GS" },
   1122 	{ 0x0625, "GeForce 9600 GSO 512" },
   1123 	{ 0x0626, "GeForce GT 130" },
   1124 	{ 0x0627, "GeForce GT 140" },
   1125 	{ 0x0628, "GeForce 9800M GTS" },
   1126 	{ 0x062a, "GeForce 9700M GTS" },
   1127 	{ 0x062b, "GeForce 9800M GS" },
   1128 	{ 0x062c, "GeForce 9800M GTS" },
   1129 	{ 0x062d, "GeForce 9600 GT" },
   1130 	{ 0x062e, "GeForce 9600 GT", nvkm_device_pci_10de_062e },
   1131 	{ 0x0630, "GeForce 9700 S" },
   1132 	{ 0x0631, "GeForce GTS 160M" },
   1133 	{ 0x0632, "GeForce GTS 150M" },
   1134 	{ 0x0635, "GeForce 9600 GSO" },
   1135 	{ 0x0637, "GeForce 9600 GT" },
   1136 	{ 0x0638, "Quadro FX 1800" },
   1137 	{ 0x063a, "Quadro FX 2700M" },
   1138 	{ 0x0640, "GeForce 9500 GT" },
   1139 	{ 0x0641, "GeForce 9400 GT" },
   1140 	{ 0x0643, "GeForce 9500 GT" },
   1141 	{ 0x0644, "GeForce 9500 GS" },
   1142 	{ 0x0645, "GeForce 9500 GS" },
   1143 	{ 0x0646, "GeForce GT 120" },
   1144 	{ 0x0647, "GeForce 9600M GT" },
   1145 	{ 0x0648, "GeForce 9600M GS" },
   1146 	{ 0x0649, "GeForce 9600M GT", nvkm_device_pci_10de_0649 },
   1147 	{ 0x064a, "GeForce 9700M GT" },
   1148 	{ 0x064b, "GeForce 9500M G" },
   1149 	{ 0x064c, "GeForce 9650M GT" },
   1150 	{ 0x0651, "GeForce G 110M" },
   1151 	{ 0x0652, "GeForce GT 130M", nvkm_device_pci_10de_0652 },
   1152 	{ 0x0653, "GeForce GT 120M" },
   1153 	{ 0x0654, "GeForce GT 220M", nvkm_device_pci_10de_0654 },
   1154 	{ 0x0655, NULL, nvkm_device_pci_10de_0655 },
   1155 	{ 0x0656, NULL, nvkm_device_pci_10de_0656 },
   1156 	{ 0x0658, "Quadro FX 380" },
   1157 	{ 0x0659, "Quadro FX 580" },
   1158 	{ 0x065a, "Quadro FX 1700M" },
   1159 	{ 0x065b, "GeForce 9400 GT" },
   1160 	{ 0x065c, "Quadro FX 770M" },
   1161 	{ 0x06c0, "GeForce GTX 480" },
   1162 	{ 0x06c4, "GeForce GTX 465" },
   1163 	{ 0x06ca, "GeForce GTX 480M" },
   1164 	{ 0x06cd, "GeForce GTX 470" },
   1165 	{ 0x06d1, "Tesla C2050 / C2070", nvkm_device_pci_10de_06d1 },
   1166 	{ 0x06d2, "Tesla M2070", nvkm_device_pci_10de_06d2 },
   1167 	{ 0x06d8, "Quadro 6000" },
   1168 	{ 0x06d9, "Quadro 5000" },
   1169 	{ 0x06da, "Quadro 5000M" },
   1170 	{ 0x06dc, "Quadro 6000" },
   1171 	{ 0x06dd, "Quadro 4000" },
   1172 	{ 0x06de, "Tesla T20 Processor", nvkm_device_pci_10de_06de },
   1173 	{ 0x06df, "Tesla M2070-Q" },
   1174 	{ 0x06e0, "GeForce 9300 GE" },
   1175 	{ 0x06e1, "GeForce 9300 GS" },
   1176 	{ 0x06e2, "GeForce 8400" },
   1177 	{ 0x06e3, "GeForce 8400 SE" },
   1178 	{ 0x06e4, "GeForce 8400 GS" },
   1179 	{ 0x06e5, "GeForce 9300M GS" },
   1180 	{ 0x06e6, "GeForce G100" },
   1181 	{ 0x06e7, "GeForce 9300 SE" },
   1182 	{ 0x06e8, "GeForce 9200M GS", nvkm_device_pci_10de_06e8 },
   1183 	{ 0x06e9, "GeForce 9300M GS" },
   1184 	{ 0x06ea, "Quadro NVS 150M" },
   1185 	{ 0x06eb, "Quadro NVS 160M" },
   1186 	{ 0x06ec, "GeForce G 105M" },
   1187 	{ 0x06ef, "GeForce G 103M" },
   1188 	{ 0x06f1, "GeForce G105M" },
   1189 	{ 0x06f8, "Quadro NVS 420" },
   1190 	{ 0x06f9, "Quadro FX 370 LP", nvkm_device_pci_10de_06f9 },
   1191 	{ 0x06fa, "Quadro NVS 450" },
   1192 	{ 0x06fb, "Quadro FX 370M" },
   1193 	{ 0x06fd, "Quadro NVS 295" },
   1194 	{ 0x06ff, "HICx16 + Graphics", nvkm_device_pci_10de_06ff },
   1195 	{ 0x07e0, "GeForce 7150 / nForce 630i" },
   1196 	{ 0x07e1, "GeForce 7100 / nForce 630i" },
   1197 	{ 0x07e2, "GeForce 7050 / nForce 630i" },
   1198 	{ 0x07e3, "GeForce 7050 / nForce 610i" },
   1199 	{ 0x07e5, "GeForce 7050 / nForce 620i" },
   1200 	{ 0x0840, "GeForce 8200M" },
   1201 	{ 0x0844, "GeForce 9100M G" },
   1202 	{ 0x0845, "GeForce 8200M G" },
   1203 	{ 0x0846, "GeForce 9200" },
   1204 	{ 0x0847, "GeForce 9100" },
   1205 	{ 0x0848, "GeForce 8300" },
   1206 	{ 0x0849, "GeForce 8200" },
   1207 	{ 0x084a, "nForce 730a" },
   1208 	{ 0x084b, "GeForce 9200" },
   1209 	{ 0x084c, "nForce 980a/780a SLI" },
   1210 	{ 0x084d, "nForce 750a SLI" },
   1211 	{ 0x084f, "GeForce 8100 / nForce 720a" },
   1212 	{ 0x0860, "GeForce 9400" },
   1213 	{ 0x0861, "GeForce 9400" },
   1214 	{ 0x0862, "GeForce 9400M G" },
   1215 	{ 0x0863, "GeForce 9400M" },
   1216 	{ 0x0864, "GeForce 9300" },
   1217 	{ 0x0865, "ION" },
   1218 	{ 0x0866, "GeForce 9400M G", nvkm_device_pci_10de_0866 },
   1219 	{ 0x0867, "GeForce 9400" },
   1220 	{ 0x0868, "nForce 760i SLI" },
   1221 	{ 0x0869, "GeForce 9400" },
   1222 	{ 0x086a, "GeForce 9400" },
   1223 	{ 0x086c, "GeForce 9300 / nForce 730i" },
   1224 	{ 0x086d, "GeForce 9200" },
   1225 	{ 0x086e, "GeForce 9100M G" },
   1226 	{ 0x086f, "GeForce 8200M G" },
   1227 	{ 0x0870, "GeForce 9400M" },
   1228 	{ 0x0871, "GeForce 9200" },
   1229 	{ 0x0872, "GeForce G102M", nvkm_device_pci_10de_0872 },
   1230 	{ 0x0873, "GeForce G102M", nvkm_device_pci_10de_0873 },
   1231 	{ 0x0874, "ION" },
   1232 	{ 0x0876, "ION" },
   1233 	{ 0x087a, "GeForce 9400" },
   1234 	{ 0x087d, "ION" },
   1235 	{ 0x087e, "ION LE" },
   1236 	{ 0x087f, "ION LE" },
   1237 	{ 0x08a0, "GeForce 320M" },
   1238 	{ 0x08a2, "GeForce 320M" },
   1239 	{ 0x08a3, "GeForce 320M" },
   1240 	{ 0x08a4, "GeForce 320M" },
   1241 	{ 0x08a5, "GeForce 320M" },
   1242 	{ 0x0a20, "GeForce GT 220" },
   1243 	{ 0x0a22, "GeForce 315" },
   1244 	{ 0x0a23, "GeForce 210" },
   1245 	{ 0x0a26, "GeForce 405" },
   1246 	{ 0x0a27, "GeForce 405" },
   1247 	{ 0x0a28, "GeForce GT 230M" },
   1248 	{ 0x0a29, "GeForce GT 330M" },
   1249 	{ 0x0a2a, "GeForce GT 230M" },
   1250 	{ 0x0a2b, "GeForce GT 330M" },
   1251 	{ 0x0a2c, "NVS 5100M" },
   1252 	{ 0x0a2d, "GeForce GT 320M" },
   1253 	{ 0x0a32, "GeForce GT 415" },
   1254 	{ 0x0a34, "GeForce GT 240M" },
   1255 	{ 0x0a35, "GeForce GT 325M" },
   1256 	{ 0x0a38, "Quadro 400" },
   1257 	{ 0x0a3c, "Quadro FX 880M" },
   1258 	{ 0x0a60, "GeForce G210" },
   1259 	{ 0x0a62, "GeForce 205" },
   1260 	{ 0x0a63, "GeForce 310" },
   1261 	{ 0x0a64, "Second Generation ION" },
   1262 	{ 0x0a65, "GeForce 210" },
   1263 	{ 0x0a66, "GeForce 310" },
   1264 	{ 0x0a67, "GeForce 315" },
   1265 	{ 0x0a68, "GeForce G105M" },
   1266 	{ 0x0a69, "GeForce G105M" },
   1267 	{ 0x0a6a, "NVS 2100M" },
   1268 	{ 0x0a6c, "NVS 3100M" },
   1269 	{ 0x0a6e, "GeForce 305M", nvkm_device_pci_10de_0a6e },
   1270 	{ 0x0a6f, "Second Generation ION" },
   1271 	{ 0x0a70, "GeForce 310M", nvkm_device_pci_10de_0a70 },
   1272 	{ 0x0a71, "GeForce 305M" },
   1273 	{ 0x0a72, "GeForce 310M" },
   1274 	{ 0x0a73, "GeForce 305M", nvkm_device_pci_10de_0a73 },
   1275 	{ 0x0a74, "GeForce G210M", nvkm_device_pci_10de_0a74 },
   1276 	{ 0x0a75, "GeForce 310M", nvkm_device_pci_10de_0a75 },
   1277 	{ 0x0a76, "Second Generation ION" },
   1278 	{ 0x0a78, "Quadro FX 380 LP" },
   1279 	{ 0x0a7a, "GeForce 315M", nvkm_device_pci_10de_0a7a },
   1280 	{ 0x0a7c, "Quadro FX 380M" },
   1281 	{ 0x0ca0, "GeForce GT 330" },
   1282 	{ 0x0ca2, "GeForce GT 320" },
   1283 	{ 0x0ca3, "GeForce GT 240" },
   1284 	{ 0x0ca4, "GeForce GT 340" },
   1285 	{ 0x0ca5, "GeForce GT 220" },
   1286 	{ 0x0ca7, "GeForce GT 330" },
   1287 	{ 0x0ca8, "GeForce GTS 260M" },
   1288 	{ 0x0ca9, "GeForce GTS 250M" },
   1289 	{ 0x0cac, "GeForce GT 220" },
   1290 	{ 0x0caf, "GeForce GT 335M" },
   1291 	{ 0x0cb0, "GeForce GTS 350M" },
   1292 	{ 0x0cb1, "GeForce GTS 360M" },
   1293 	{ 0x0cbc, "Quadro FX 1800M" },
   1294 	{ 0x0dc0, "GeForce GT 440" },
   1295 	{ 0x0dc4, "GeForce GTS 450" },
   1296 	{ 0x0dc5, "GeForce GTS 450" },
   1297 	{ 0x0dc6, "GeForce GTS 450" },
   1298 	{ 0x0dcd, "GeForce GT 555M" },
   1299 	{ 0x0dce, "GeForce GT 555M" },
   1300 	{ 0x0dd1, "GeForce GTX 460M" },
   1301 	{ 0x0dd2, "GeForce GT 445M" },
   1302 	{ 0x0dd3, "GeForce GT 435M" },
   1303 	{ 0x0dd6, "GeForce GT 550M" },
   1304 	{ 0x0dd8, "Quadro 2000", nvkm_device_pci_10de_0dd8 },
   1305 	{ 0x0dda, "Quadro 2000M" },
   1306 	{ 0x0de0, "GeForce GT 440" },
   1307 	{ 0x0de1, "GeForce GT 430" },
   1308 	{ 0x0de2, "GeForce GT 420" },
   1309 	{ 0x0de3, "GeForce GT 635M" },
   1310 	{ 0x0de4, "GeForce GT 520" },
   1311 	{ 0x0de5, "GeForce GT 530" },
   1312 	{ 0x0de7, "GeForce GT 610" },
   1313 	{ 0x0de8, "GeForce GT 620M" },
   1314 	{ 0x0de9, "GeForce GT 630M", nvkm_device_pci_10de_0de9 },
   1315 	{ 0x0dea, "GeForce 610M", nvkm_device_pci_10de_0dea },
   1316 	{ 0x0deb, "GeForce GT 555M" },
   1317 	{ 0x0dec, "GeForce GT 525M" },
   1318 	{ 0x0ded, "GeForce GT 520M" },
   1319 	{ 0x0dee, "GeForce GT 415M" },
   1320 	{ 0x0def, "NVS 5400M" },
   1321 	{ 0x0df0, "GeForce GT 425M" },
   1322 	{ 0x0df1, "GeForce GT 420M" },
   1323 	{ 0x0df2, "GeForce GT 435M" },
   1324 	{ 0x0df3, "GeForce GT 420M" },
   1325 	{ 0x0df4, "GeForce GT 540M", nvkm_device_pci_10de_0df4 },
   1326 	{ 0x0df5, "GeForce GT 525M" },
   1327 	{ 0x0df6, "GeForce GT 550M" },
   1328 	{ 0x0df7, "GeForce GT 520M" },
   1329 	{ 0x0df8, "Quadro 600" },
   1330 	{ 0x0df9, "Quadro 500M" },
   1331 	{ 0x0dfa, "Quadro 1000M" },
   1332 	{ 0x0dfc, "NVS 5200M" },
   1333 	{ 0x0e22, "GeForce GTX 460" },
   1334 	{ 0x0e23, "GeForce GTX 460 SE" },
   1335 	{ 0x0e24, "GeForce GTX 460" },
   1336 	{ 0x0e30, "GeForce GTX 470M" },
   1337 	{ 0x0e31, "GeForce GTX 485M" },
   1338 	{ 0x0e3a, "Quadro 3000M" },
   1339 	{ 0x0e3b, "Quadro 4000M" },
   1340 	{ 0x0f00, "GeForce GT 630" },
   1341 	{ 0x0f01, "GeForce GT 620" },
   1342 	{ 0x0f02, "GeForce GT 730" },
   1343 	{ 0x0fc0, "GeForce GT 640" },
   1344 	{ 0x0fc1, "GeForce GT 640" },
   1345 	{ 0x0fc2, "GeForce GT 630" },
   1346 	{ 0x0fc6, "GeForce GTX 650" },
   1347 	{ 0x0fc8, "GeForce GT 740" },
   1348 	{ 0x0fc9, "GeForce GT 730" },
   1349 	{ 0x0fcd, "GeForce GT 755M" },
   1350 	{ 0x0fce, "GeForce GT 640M LE" },
   1351 	{ 0x0fd1, "GeForce GT 650M" },
   1352 	{ 0x0fd2, "GeForce GT 640M", nvkm_device_pci_10de_0fd2 },
   1353 	{ 0x0fd3, "GeForce GT 640M LE" },
   1354 	{ 0x0fd4, "GeForce GTX 660M" },
   1355 	{ 0x0fd5, "GeForce GT 650M" },
   1356 	{ 0x0fd8, "GeForce GT 640M" },
   1357 	{ 0x0fd9, "GeForce GT 645M" },
   1358 	{ 0x0fdf, "GeForce GT 740M" },
   1359 	{ 0x0fe0, "GeForce GTX 660M" },
   1360 	{ 0x0fe1, "GeForce GT 730M" },
   1361 	{ 0x0fe2, "GeForce GT 745M" },
   1362 	{ 0x0fe3, "GeForce GT 745M", nvkm_device_pci_10de_0fe3 },
   1363 	{ 0x0fe4, "GeForce GT 750M" },
   1364 	{ 0x0fe9, "GeForce GT 750M" },
   1365 	{ 0x0fea, "GeForce GT 755M" },
   1366 	{ 0x0fec, "GeForce 710A" },
   1367 	{ 0x0fef, "GRID K340" },
   1368 	{ 0x0ff2, "GRID K1" },
   1369 	{ 0x0ff3, "Quadro K420" },
   1370 	{ 0x0ff6, "Quadro K1100M" },
   1371 	{ 0x0ff8, "Quadro K500M" },
   1372 	{ 0x0ff9, "Quadro K2000D" },
   1373 	{ 0x0ffa, "Quadro K600" },
   1374 	{ 0x0ffb, "Quadro K2000M" },
   1375 	{ 0x0ffc, "Quadro K1000M" },
   1376 	{ 0x0ffd, "NVS 510" },
   1377 	{ 0x0ffe, "Quadro K2000" },
   1378 	{ 0x0fff, "Quadro 410" },
   1379 	{ 0x1001, "GeForce GTX TITAN Z" },
   1380 	{ 0x1004, "GeForce GTX 780" },
   1381 	{ 0x1005, "GeForce GTX TITAN" },
   1382 	{ 0x1007, "GeForce GTX 780" },
   1383 	{ 0x1008, "GeForce GTX 780 Ti" },
   1384 	{ 0x100a, "GeForce GTX 780 Ti" },
   1385 	{ 0x100c, "GeForce GTX TITAN Black" },
   1386 	{ 0x1021, "Tesla K20Xm" },
   1387 	{ 0x1022, "Tesla K20c" },
   1388 	{ 0x1023, "Tesla K40m" },
   1389 	{ 0x1024, "Tesla K40c" },
   1390 	{ 0x1026, "Tesla K20s" },
   1391 	{ 0x1027, "Tesla K40st" },
   1392 	{ 0x1028, "Tesla K20m" },
   1393 	{ 0x1029, "Tesla K40s" },
   1394 	{ 0x102a, "Tesla K40t" },
   1395 	{ 0x102d, "Tesla K80" },
   1396 	{ 0x103a, "Quadro K6000" },
   1397 	{ 0x103c, "Quadro K5200" },
   1398 	{ 0x1040, "GeForce GT 520" },
   1399 	{ 0x1042, "GeForce 510" },
   1400 	{ 0x1048, "GeForce 605" },
   1401 	{ 0x1049, "GeForce GT 620" },
   1402 	{ 0x104a, "GeForce GT 610" },
   1403 	{ 0x104b, "GeForce GT 625 (OEM)", nvkm_device_pci_10de_104b },
   1404 	{ 0x104c, "GeForce GT 705" },
   1405 	{ 0x1050, "GeForce GT 520M" },
   1406 	{ 0x1051, "GeForce GT 520MX" },
   1407 	{ 0x1052, "GeForce GT 520M" },
   1408 	{ 0x1054, "GeForce 410M" },
   1409 	{ 0x1055, "GeForce 410M" },
   1410 	{ 0x1056, "NVS 4200M" },
   1411 	{ 0x1057, "NVS 4200M" },
   1412 	{ 0x1058, "GeForce 610M", nvkm_device_pci_10de_1058 },
   1413 	{ 0x1059, "GeForce 610M" },
   1414 	{ 0x105a, "GeForce 610M" },
   1415 	{ 0x105b, "GeForce 705M", nvkm_device_pci_10de_105b },
   1416 	{ 0x107c, "NVS 315" },
   1417 	{ 0x107d, "NVS 310" },
   1418 	{ 0x1080, "GeForce GTX 580" },
   1419 	{ 0x1081, "GeForce GTX 570" },
   1420 	{ 0x1082, "GeForce GTX 560 Ti" },
   1421 	{ 0x1084, "GeForce GTX 560" },
   1422 	{ 0x1086, "GeForce GTX 570" },
   1423 	{ 0x1087, "GeForce GTX 560 Ti" },
   1424 	{ 0x1088, "GeForce GTX 590" },
   1425 	{ 0x1089, "GeForce GTX 580" },
   1426 	{ 0x108b, "GeForce GTX 580" },
   1427 	{ 0x1091, "Tesla M2090", nvkm_device_pci_10de_1091 },
   1428 	{ 0x1094, "Tesla M2075" },
   1429 	{ 0x1096, "Tesla C2075", nvkm_device_pci_10de_1096 },
   1430 	{ 0x109a, "Quadro 5010M" },
   1431 	{ 0x109b, "Quadro 7000" },
   1432 	{ 0x10c0, "GeForce 9300 GS" },
   1433 	{ 0x10c3, "GeForce 8400GS" },
   1434 	{ 0x10c5, "GeForce 405" },
   1435 	{ 0x10d8, "NVS 300" },
   1436 	{ 0x1140, NULL, nvkm_device_pci_10de_1140 },
   1437 	{ 0x1180, "GeForce GTX 680" },
   1438 	{ 0x1183, "GeForce GTX 660 Ti" },
   1439 	{ 0x1184, "GeForce GTX 770" },
   1440 	{ 0x1185, "GeForce GTX 660", nvkm_device_pci_10de_1185 },
   1441 	{ 0x1187, "GeForce GTX 760" },
   1442 	{ 0x1188, "GeForce GTX 690" },
   1443 	{ 0x1189, "GeForce GTX 670", nvkm_device_pci_10de_1189 },
   1444 	{ 0x118a, "GRID K520" },
   1445 	{ 0x118e, "GeForce GTX 760 (192-bit)" },
   1446 	{ 0x118f, "Tesla K10" },
   1447 	{ 0x1193, "GeForce GTX 760 Ti OEM" },
   1448 	{ 0x1194, "Tesla K8" },
   1449 	{ 0x1195, "GeForce GTX 660" },
   1450 	{ 0x1198, "GeForce GTX 880M" },
   1451 	{ 0x1199, "GeForce GTX 870M", nvkm_device_pci_10de_1199 },
   1452 	{ 0x119a, "GeForce GTX 860M" },
   1453 	{ 0x119d, "GeForce GTX 775M" },
   1454 	{ 0x119e, "GeForce GTX 780M" },
   1455 	{ 0x119f, "GeForce GTX 780M" },
   1456 	{ 0x11a0, "GeForce GTX 680M" },
   1457 	{ 0x11a1, "GeForce GTX 670MX" },
   1458 	{ 0x11a2, "GeForce GTX 675MX" },
   1459 	{ 0x11a3, "GeForce GTX 680MX" },
   1460 	{ 0x11a7, "GeForce GTX 675MX" },
   1461 	{ 0x11b4, "Quadro K4200" },
   1462 	{ 0x11b6, "Quadro K3100M" },
   1463 	{ 0x11b7, "Quadro K4100M" },
   1464 	{ 0x11b8, "Quadro K5100M" },
   1465 	{ 0x11ba, "Quadro K5000" },
   1466 	{ 0x11bc, "Quadro K5000M" },
   1467 	{ 0x11bd, "Quadro K4000M" },
   1468 	{ 0x11be, "Quadro K3000M" },
   1469 	{ 0x11bf, "GRID K2" },
   1470 	{ 0x11c0, "GeForce GTX 660" },
   1471 	{ 0x11c2, "GeForce GTX 650 Ti BOOST" },
   1472 	{ 0x11c3, "GeForce GTX 650 Ti" },
   1473 	{ 0x11c4, "GeForce GTX 645" },
   1474 	{ 0x11c5, "GeForce GT 740" },
   1475 	{ 0x11c6, "GeForce GTX 650 Ti" },
   1476 	{ 0x11c8, "GeForce GTX 650" },
   1477 	{ 0x11cb, "GeForce GT 740" },
   1478 	{ 0x11e0, "GeForce GTX 770M" },
   1479 	{ 0x11e1, "GeForce GTX 765M" },
   1480 	{ 0x11e2, "GeForce GTX 765M" },
   1481 	{ 0x11e3, "GeForce GTX 760M", nvkm_device_pci_10de_11e3 },
   1482 	{ 0x11fa, "Quadro K4000" },
   1483 	{ 0x11fc, "Quadro K2100M" },
   1484 	{ 0x1200, "GeForce GTX 560 Ti" },
   1485 	{ 0x1201, "GeForce GTX 560" },
   1486 	{ 0x1203, "GeForce GTX 460 SE v2" },
   1487 	{ 0x1205, "GeForce GTX 460 v2" },
   1488 	{ 0x1206, "GeForce GTX 555" },
   1489 	{ 0x1207, "GeForce GT 645" },
   1490 	{ 0x1208, "GeForce GTX 560 SE" },
   1491 	{ 0x1210, "GeForce GTX 570M" },
   1492 	{ 0x1211, "GeForce GTX 580M" },
   1493 	{ 0x1212, "GeForce GTX 675M" },
   1494 	{ 0x1213, "GeForce GTX 670M" },
   1495 	{ 0x1241, "GeForce GT 545" },
   1496 	{ 0x1243, "GeForce GT 545" },
   1497 	{ 0x1244, "GeForce GTX 550 Ti" },
   1498 	{ 0x1245, "GeForce GTS 450" },
   1499 	{ 0x1246, "GeForce GT 550M" },
   1500 	{ 0x1247, "GeForce GT 555M", nvkm_device_pci_10de_1247 },
   1501 	{ 0x1248, "GeForce GT 555M" },
   1502 	{ 0x1249, "GeForce GTS 450" },
   1503 	{ 0x124b, "GeForce GT 640" },
   1504 	{ 0x124d, "GeForce GT 555M", nvkm_device_pci_10de_124d },
   1505 	{ 0x1251, "GeForce GTX 560M" },
   1506 	{ 0x1280, "GeForce GT 635" },
   1507 	{ 0x1281, "GeForce GT 710" },
   1508 	{ 0x1282, "GeForce GT 640" },
   1509 	{ 0x1284, "GeForce GT 630" },
   1510 	{ 0x1286, "GeForce GT 720" },
   1511 	{ 0x1287, "GeForce GT 730" },
   1512 	{ 0x1288, "GeForce GT 720" },
   1513 	{ 0x1289, "GeForce GT 710" },
   1514 	{ 0x1290, "GeForce GT 730M", nvkm_device_pci_10de_1290 },
   1515 	{ 0x1291, "GeForce GT 735M" },
   1516 	{ 0x1292, "GeForce GT 740M", nvkm_device_pci_10de_1292 },
   1517 	{ 0x1293, "GeForce GT 730M" },
   1518 	{ 0x1295, "GeForce 710M", nvkm_device_pci_10de_1295 },
   1519 	{ 0x1296, "GeForce 825M" },
   1520 	{ 0x1298, "GeForce GT 720M" },
   1521 	{ 0x1299, "GeForce 920M", nvkm_device_pci_10de_1299 },
   1522 	{ 0x129a, "GeForce 910M" },
   1523 	{ 0x12b9, "Quadro K610M" },
   1524 	{ 0x12ba, "Quadro K510M" },
   1525 	{ 0x1340, "GeForce 830M", nvkm_device_pci_10de_1340 },
   1526 	{ 0x1341, "GeForce 840M", nvkm_device_pci_10de_1341 },
   1527 	{ 0x1344, "GeForce 845M" },
   1528 	{ 0x1346, "GeForce 930M", nvkm_device_pci_10de_1346 },
   1529 	{ 0x1347, "GeForce 940M", nvkm_device_pci_10de_1347 },
   1530 	{ 0x137a, NULL, nvkm_device_pci_10de_137a },
   1531 	{ 0x137d, NULL, nvkm_device_pci_10de_137d },
   1532 	{ 0x1380, "GeForce GTX 750 Ti" },
   1533 	{ 0x1381, "GeForce GTX 750" },
   1534 	{ 0x1382, "GeForce GTX 745" },
   1535 	{ 0x1390, "GeForce 845M" },
   1536 	{ 0x1391, "GeForce GTX 850M", nvkm_device_pci_10de_1391 },
   1537 	{ 0x1392, "GeForce GTX 860M", nvkm_device_pci_10de_1392 },
   1538 	{ 0x1393, "GeForce 840M" },
   1539 	{ 0x1398, "GeForce 845M" },
   1540 	{ 0x139a, "GeForce GTX 950M", nvkm_device_pci_10de_139a },
   1541 	{ 0x139b, "GeForce GTX 960M", nvkm_device_pci_10de_139b },
   1542 	{ 0x139c, "GeForce 940M" },
   1543 	{ 0x13b3, "Quadro K2200M" },
   1544 	{ 0x13ba, "Quadro K2200" },
   1545 	{ 0x13bb, "Quadro K620" },
   1546 	{ 0x13bc, "Quadro K1200" },
   1547 	{ 0x13c0, "GeForce GTX 980" },
   1548 	{ 0x13c2, "GeForce GTX 970" },
   1549 	{ 0x13d7, "GeForce GTX 980M" },
   1550 	{ 0x13d8, "GeForce GTX 970M" },
   1551 	{ 0x13d9, "GeForce GTX 965M" },
   1552 	{ 0x1401, "GeForce GTX 960" },
   1553 	{ 0x1617, "GeForce GTX 980M" },
   1554 	{ 0x1618, "GeForce GTX 970M" },
   1555 	{ 0x1619, "GeForce GTX 965M" },
   1556 	{ 0x17c2, "GeForce GTX TITAN X" },
   1557 	{ 0x17c8, "GeForce GTX 980 Ti" },
   1558 	{ 0x17f0, "Quadro M6000" },
   1559 	{}
   1560 };
   1561 
   1562 static struct nvkm_device_pci *
   1563 nvkm_device_pci(struct nvkm_device *device)
   1564 {
   1565 	return container_of(device, struct nvkm_device_pci, device);
   1566 }
   1567 
   1568 #ifdef __NetBSD__
   1569 #include <dev/pci/pcivar.h>
   1570 static bus_dma_tag_t
   1571 nvkm_device_pci_dma_tag(struct nvkm_device *device)
   1572 {
   1573 	struct nvkm_device_pci *pdev = nvkm_device_pci(device);
   1574 
   1575 	return pdev->dmat;
   1576 }
   1577 
   1578 static bus_space_tag_t
   1579 nvkm_device_pci_resource_tag(struct nvkm_device *device, unsigned bar)
   1580 {
   1581 	struct nvkm_device_pci *pdev = nvkm_device_pci(device);
   1582 
   1583 	/* XXX What about I/O BARs?  */
   1584 	KASSERT(PCI_MAPREG_TYPE(pdev->pdev->pd_resources[bar].type) ==
   1585 	    PCI_MAPREG_TYPE_MEM);
   1586 	return pdev->pdev->pd_pa.pa_memt;
   1587 }
   1588 #endif
   1589 
   1590 static resource_size_t
   1591 nvkm_device_pci_resource_addr(struct nvkm_device *device, unsigned bar)
   1592 {
   1593 	struct nvkm_device_pci *pdev = nvkm_device_pci(device);
   1594 	return pci_resource_start(pdev->pdev, bar);
   1595 }
   1596 
   1597 static resource_size_t
   1598 nvkm_device_pci_resource_size(struct nvkm_device *device, unsigned bar)
   1599 {
   1600 	struct nvkm_device_pci *pdev = nvkm_device_pci(device);
   1601 	return pci_resource_len(pdev->pdev, bar);
   1602 }
   1603 
   1604 static void
   1605 nvkm_device_pci_fini(struct nvkm_device *device, bool suspend)
   1606 {
   1607 	struct nvkm_device_pci *pdev = nvkm_device_pci(device);
   1608 	if (suspend) {
   1609 #ifndef __NetBSD__		/* XXX pmf takes care of this for us.  */
   1610 		pci_disable_device(pdev->pdev);
   1611 #endif
   1612 		pdev->suspend = true;
   1613 	}
   1614 }
   1615 
   1616 static int
   1617 nvkm_device_pci_preinit(struct nvkm_device *device)
   1618 {
   1619 	struct nvkm_device_pci *pdev = nvkm_device_pci(device);
   1620 	if (pdev->suspend) {
   1621 #ifndef __NetBSD__		/* XXX pmf takes care of this for us.  */
   1622 		int ret = pci_enable_device(pdev->pdev);
   1623 		if (ret)
   1624 			return ret;
   1625 		pci_set_master(pdev->pdev);
   1626 #endif
   1627 		pdev->suspend = false;
   1628 	}
   1629 	return 0;
   1630 }
   1631 
   1632 static void *
   1633 nvkm_device_pci_dtor(struct nvkm_device *device)
   1634 {
   1635 	struct nvkm_device_pci *pdev = nvkm_device_pci(device);
   1636 #ifdef __NetBSD__
   1637 	if (pdev->dmat != pdev->bus_dmat)
   1638 		bus_dmatag_destroy(pdev->dmat);
   1639 #else
   1640 	pci_disable_device(pdev->pdev);
   1641 #endif
   1642 	return pdev;
   1643 }
   1644 
   1645 static const struct nvkm_device_func
   1646 nvkm_device_pci_func = {
   1647 	.pci = nvkm_device_pci,
   1648 	.dtor = nvkm_device_pci_dtor,
   1649 	.preinit = nvkm_device_pci_preinit,
   1650 	.fini = nvkm_device_pci_fini,
   1651 #ifdef __NetBSD__
   1652 	.dma_tag = nvkm_device_pci_dma_tag,
   1653 	.resource_tag = nvkm_device_pci_resource_tag,
   1654 #endif
   1655 	.resource_addr = nvkm_device_pci_resource_addr,
   1656 	.resource_size = nvkm_device_pci_resource_size,
   1657 #ifdef __NetBSD__
   1658 #  ifdef __arm__
   1659 	.cpu_coherent = false,
   1660 #  else
   1661 	.cpu_coherent = true,
   1662 #  endif
   1663 #else
   1664 	.cpu_coherent = !IS_ENABLED(CONFIG_ARM),
   1665 #endif
   1666 };
   1667 
   1668 int
   1669 nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
   1670 		    bool detect, bool mmio, u64 subdev_mask,
   1671 		    struct nvkm_device **pdevice)
   1672 {
   1673 	const struct nvkm_device_quirk *quirk = NULL;
   1674 	const struct nvkm_device_pci_device *pcid;
   1675 	const struct nvkm_device_pci_vendor *pciv;
   1676 	const char *name = NULL;
   1677 	struct nvkm_device_pci *pdev;
   1678 	int ret, bits;
   1679 
   1680 	ret = linux_pci_enable_device(pci_dev);
   1681 	if (ret)
   1682 		return ret;
   1683 
   1684 	switch (pci_dev->vendor) {
   1685 	case 0x10de: pcid = nvkm_device_pci_10de; break;
   1686 	default:
   1687 		pcid = NULL;
   1688 		break;
   1689 	}
   1690 
   1691 	while (pcid && pcid->device) {
   1692 		if (pciv = pcid->vendor, pcid->device == pci_dev->device) {
   1693 			while (pciv && pciv->vendor) {
   1694 				if (pciv->vendor == pci_dev->subsystem_vendor &&
   1695 				    pciv->device == pci_dev->subsystem_device) {
   1696 					quirk = &pciv->quirk;
   1697 					name  =  pciv->name;
   1698 					break;
   1699 				}
   1700 				pciv++;
   1701 			}
   1702 			if (!name)
   1703 				name = pcid->name;
   1704 			break;
   1705 		}
   1706 		pcid++;
   1707 	}
   1708 
   1709 	if (!(pdev = kzalloc(sizeof(*pdev), GFP_KERNEL))) {
   1710 		linux_pci_disable_device(pci_dev);
   1711 		return -ENOMEM;
   1712 	}
   1713 	*pdevice = &pdev->device;
   1714 	pdev->pdev = pci_dev;
   1715 
   1716 	ret = nvkm_device_ctor(&nvkm_device_pci_func, quirk,
   1717 			       pci_dev_dev(pci_dev),
   1718 			       pci_is_pcie(pci_dev) ? NVKM_DEVICE_PCIE :
   1719 			       pci_find_capability(pci_dev, PCI_CAP_ID_AGP) ?
   1720 			       NVKM_DEVICE_AGP : NVKM_DEVICE_PCI,
   1721 			       (u64)pci_domain_nr(pci_dev->bus) << 32 |
   1722 				    pci_dev->bus->number << 16 |
   1723 				    PCI_SLOT(pci_dev->devfn) << 8 |
   1724 				    PCI_FUNC(pci_dev->devfn),
   1725 #ifdef __NetBSD__
   1726 			       /*acpidev*/pci_dev->pd_ad,
   1727 #endif
   1728 			       name,
   1729 			       cfg, dbg, detect, mmio, subdev_mask,
   1730 			       &pdev->device);
   1731 
   1732 	if (ret)
   1733 		return ret;
   1734 
   1735 	/* Set DMA mask based on capabilities reported by the MMU subdev. */
   1736 	if (pdev->device.mmu && !pdev->device.pci->agp.bridge)
   1737 		bits = pdev->device.mmu->dma_bits;
   1738 	else
   1739 		bits = 32;
   1740 
   1741 #ifdef __NetBSD__
   1742 	const struct pci_attach_args *pa = &pci_dev->pd_pa;
   1743 	KASSERT(bits >= 32);
   1744 	if (bits == 32 || !pci_dma64_available(pa)) {
   1745 		pdev->dmat = pdev->bus_dmat = pa->pa_dmat;
   1746 	} else {
   1747 		pdev->bus_dmat = pa->pa_dmat64;
   1748 		/* XXX error NetBSD->Linux */
   1749 		ret = -bus_dmatag_subregion(pdev->bus_dmat, 0,
   1750 		    DMA_BIT_MASK(bits), &pdev->dmat, BUS_DMA_WAITOK);
   1751 		if (ret)	/* fall back to 32-bit dma */
   1752 			pdev->dmat = pdev->bus_dmat = pa->pa_dmat;
   1753 	}
   1754 #else
   1755 	ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(bits));
   1756 	if (ret && bits != 32) {
   1757 		dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
   1758 		pdev->device.mmu->dma_bits = 32;
   1759 	}
   1760 #endif
   1761 
   1762 	return 0;
   1763 }
   1764