]>
git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
2 * Copyright 2012 Red Hat Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
27 #include <core/notify.h>
28 #include <core/option.h>
30 #include <subdev/bios.h>
32 static DEFINE_MUTEX(nv_devices_mutex
);
33 static LIST_HEAD(nv_devices
);
35 static struct nvkm_device
*
36 nvkm_device_find_locked(u64 handle
)
38 struct nvkm_device
*device
;
39 list_for_each_entry(device
, &nv_devices
, head
) {
40 if (device
->handle
== handle
)
47 nvkm_device_find(u64 handle
)
49 struct nvkm_device
*device
;
50 mutex_lock(&nv_devices_mutex
);
51 device
= nvkm_device_find_locked(handle
);
52 mutex_unlock(&nv_devices_mutex
);
57 nvkm_device_list(u64
*name
, int size
)
59 struct nvkm_device
*device
;
61 mutex_lock(&nv_devices_mutex
);
62 list_for_each_entry(device
, &nv_devices
, head
) {
64 name
[nr
- 1] = device
->handle
;
66 mutex_unlock(&nv_devices_mutex
);
70 static const struct nvkm_device_chip
73 .bios
= nvkm_bios_new
,
76 static const struct nvkm_device_chip
79 .bios
= nvkm_bios_new
,
82 .devinit
= nv04_devinit_new
,
85 .imem
= nv04_instmem_new
,
89 .timer
= nv04_timer_new
,
90 .disp
= nv04_disp_new
,
92 .fifo
= nv04_fifo_new
,
97 static const struct nvkm_device_chip
100 .bios
= nvkm_bios_new
,
103 .devinit
= nv05_devinit_new
,
106 .imem
= nv04_instmem_new
,
110 .timer
= nv04_timer_new
,
111 .disp
= nv04_disp_new
,
113 .fifo
= nv04_fifo_new
,
118 static const struct nvkm_device_chip
121 .bios
= nvkm_bios_new
,
124 .devinit
= nv10_devinit_new
,
126 .gpio
= nv10_gpio_new
,
128 .imem
= nv04_instmem_new
,
132 .timer
= nv04_timer_new
,
133 .disp
= nv04_disp_new
,
138 static const struct nvkm_device_chip
141 .bios
= nvkm_bios_new
,
144 .devinit
= nv10_devinit_new
,
146 .gpio
= nv10_gpio_new
,
148 .imem
= nv04_instmem_new
,
152 .timer
= nv04_timer_new
,
153 .disp
= nv04_disp_new
,
155 .fifo
= nv10_fifo_new
,
160 static const struct nvkm_device_chip
163 .bios
= nvkm_bios_new
,
166 .devinit
= nv10_devinit_new
,
168 .gpio
= nv10_gpio_new
,
170 .imem
= nv04_instmem_new
,
174 .timer
= nv04_timer_new
,
175 .disp
= nv04_disp_new
,
177 .fifo
= nv10_fifo_new
,
182 static const struct nvkm_device_chip
185 .bios
= nvkm_bios_new
,
188 .devinit
= nv10_devinit_new
,
190 .gpio
= nv10_gpio_new
,
192 .imem
= nv04_instmem_new
,
196 .timer
= nv04_timer_new
,
197 .disp
= nv04_disp_new
,
199 .fifo
= nv17_fifo_new
,
204 static const struct nvkm_device_chip
207 .bios
= nvkm_bios_new
,
210 .devinit
= nv10_devinit_new
,
212 .gpio
= nv10_gpio_new
,
214 .imem
= nv04_instmem_new
,
218 .timer
= nv04_timer_new
,
219 .disp
= nv04_disp_new
,
221 .fifo
= nv17_fifo_new
,
226 static const struct nvkm_device_chip
229 .bios
= nvkm_bios_new
,
232 .devinit
= nv1a_devinit_new
,
234 .gpio
= nv10_gpio_new
,
236 .imem
= nv04_instmem_new
,
240 .timer
= nv04_timer_new
,
241 .disp
= nv04_disp_new
,
243 .fifo
= nv10_fifo_new
,
248 static const struct nvkm_device_chip
251 .bios
= nvkm_bios_new
,
254 .devinit
= nv1a_devinit_new
,
256 .gpio
= nv10_gpio_new
,
258 .imem
= nv04_instmem_new
,
262 .timer
= nv04_timer_new
,
263 .disp
= nv04_disp_new
,
265 .fifo
= nv17_fifo_new
,
270 static const struct nvkm_device_chip
273 .bios
= nvkm_bios_new
,
276 .devinit
= nv20_devinit_new
,
278 .gpio
= nv10_gpio_new
,
280 .imem
= nv04_instmem_new
,
284 .timer
= nv04_timer_new
,
285 .disp
= nv04_disp_new
,
287 .fifo
= nv17_fifo_new
,
292 static const struct nvkm_device_chip
295 .bios
= nvkm_bios_new
,
298 .devinit
= nv20_devinit_new
,
300 .gpio
= nv10_gpio_new
,
302 .imem
= nv04_instmem_new
,
306 .timer
= nv04_timer_new
,
307 .disp
= nv04_disp_new
,
309 .fifo
= nv17_fifo_new
,
314 static const struct nvkm_device_chip
317 .bios
= nvkm_bios_new
,
320 .devinit
= nv20_devinit_new
,
322 .gpio
= nv10_gpio_new
,
324 .imem
= nv04_instmem_new
,
328 .timer
= nv04_timer_new
,
329 .disp
= nv04_disp_new
,
331 .fifo
= nv17_fifo_new
,
336 static const struct nvkm_device_chip
339 .bios
= nvkm_bios_new
,
342 .devinit
= nv20_devinit_new
,
344 .gpio
= nv10_gpio_new
,
346 .imem
= nv04_instmem_new
,
350 .timer
= nv04_timer_new
,
351 .disp
= nv04_disp_new
,
353 .fifo
= nv17_fifo_new
,
358 static const struct nvkm_device_chip
361 .bios
= nvkm_bios_new
,
364 .devinit
= nv20_devinit_new
,
366 .gpio
= nv10_gpio_new
,
368 .imem
= nv04_instmem_new
,
372 .timer
= nv04_timer_new
,
373 .disp
= nv04_disp_new
,
375 .fifo
= nv17_fifo_new
,
380 static const struct nvkm_device_chip
383 .bios
= nvkm_bios_new
,
386 .devinit
= nv20_devinit_new
,
388 .gpio
= nv10_gpio_new
,
390 .imem
= nv04_instmem_new
,
394 .timer
= nv04_timer_new
,
395 .disp
= nv04_disp_new
,
397 .fifo
= nv17_fifo_new
,
399 .mpeg
= nv31_mpeg_new
,
403 static const struct nvkm_device_chip
406 .bios
= nvkm_bios_new
,
409 .devinit
= nv10_devinit_new
,
411 .gpio
= nv10_gpio_new
,
413 .imem
= nv04_instmem_new
,
417 .timer
= nv04_timer_new
,
418 .disp
= nv04_disp_new
,
420 .fifo
= nv17_fifo_new
,
422 .mpeg
= nv31_mpeg_new
,
426 static const struct nvkm_device_chip
429 .bios
= nvkm_bios_new
,
432 .devinit
= nv20_devinit_new
,
434 .gpio
= nv10_gpio_new
,
436 .imem
= nv04_instmem_new
,
440 .timer
= nv04_timer_new
,
441 .disp
= nv04_disp_new
,
443 .fifo
= nv17_fifo_new
,
448 static const struct nvkm_device_chip
451 .bios
= nvkm_bios_new
,
454 .devinit
= nv20_devinit_new
,
456 .gpio
= nv10_gpio_new
,
458 .imem
= nv04_instmem_new
,
462 .timer
= nv04_timer_new
,
463 .disp
= nv04_disp_new
,
465 .fifo
= nv17_fifo_new
,
467 .mpeg
= nv31_mpeg_new
,
471 static const struct nvkm_device_chip
474 .bios
= nvkm_bios_new
,
477 .devinit
= nv1a_devinit_new
,
479 .gpio
= nv10_gpio_new
,
481 .imem
= nv40_instmem_new
,
485 .therm
= nv40_therm_new
,
486 .timer
= nv40_timer_new
,
487 .volt
= nv40_volt_new
,
488 .disp
= nv04_disp_new
,
490 .fifo
= nv40_fifo_new
,
492 .mpeg
= nv40_mpeg_new
,
497 static const struct nvkm_device_chip
500 .bios
= nvkm_bios_new
,
503 .devinit
= nv1a_devinit_new
,
505 .gpio
= nv10_gpio_new
,
507 .imem
= nv40_instmem_new
,
511 .therm
= nv40_therm_new
,
512 .timer
= nv41_timer_new
,
513 .volt
= nv40_volt_new
,
514 .disp
= nv04_disp_new
,
516 .fifo
= nv40_fifo_new
,
518 .mpeg
= nv40_mpeg_new
,
523 static const struct nvkm_device_chip
526 .bios
= nvkm_bios_new
,
529 .devinit
= nv1a_devinit_new
,
531 .gpio
= nv10_gpio_new
,
533 .imem
= nv40_instmem_new
,
537 .therm
= nv40_therm_new
,
538 .timer
= nv41_timer_new
,
539 .volt
= nv40_volt_new
,
540 .disp
= nv04_disp_new
,
542 .fifo
= nv40_fifo_new
,
544 .mpeg
= nv40_mpeg_new
,
549 static const struct nvkm_device_chip
552 .bios
= nvkm_bios_new
,
555 .devinit
= nv1a_devinit_new
,
557 .gpio
= nv10_gpio_new
,
559 .imem
= nv40_instmem_new
,
563 .therm
= nv40_therm_new
,
564 .timer
= nv41_timer_new
,
565 .volt
= nv40_volt_new
,
566 .disp
= nv04_disp_new
,
568 .fifo
= nv40_fifo_new
,
570 .mpeg
= nv40_mpeg_new
,
575 static const struct nvkm_device_chip
578 .bios
= nvkm_bios_new
,
581 .devinit
= nv1a_devinit_new
,
583 .gpio
= nv10_gpio_new
,
585 .imem
= nv40_instmem_new
,
589 .therm
= nv40_therm_new
,
590 .timer
= nv41_timer_new
,
591 .volt
= nv40_volt_new
,
592 .disp
= nv04_disp_new
,
594 .fifo
= nv40_fifo_new
,
596 .mpeg
= nv44_mpeg_new
,
601 static const struct nvkm_device_chip
604 .bios
= nvkm_bios_new
,
607 .devinit
= nv1a_devinit_new
,
609 .gpio
= nv10_gpio_new
,
611 .imem
= nv40_instmem_new
,
615 .therm
= nv40_therm_new
,
616 .timer
= nv41_timer_new
,
617 .volt
= nv40_volt_new
,
618 .disp
= nv04_disp_new
,
620 .fifo
= nv40_fifo_new
,
622 .mpeg
= nv44_mpeg_new
,
627 static const struct nvkm_device_chip
630 .bios
= nvkm_bios_new
,
633 .devinit
= nv1a_devinit_new
,
635 .gpio
= nv10_gpio_new
,
637 .imem
= nv40_instmem_new
,
641 .therm
= nv40_therm_new
,
642 .timer
= nv41_timer_new
,
643 .volt
= nv40_volt_new
,
644 .disp
= nv04_disp_new
,
646 .fifo
= nv40_fifo_new
,
648 .mpeg
= nv44_mpeg_new
,
653 static const struct nvkm_device_chip
656 .bios
= nvkm_bios_new
,
659 .devinit
= nv1a_devinit_new
,
661 .gpio
= nv10_gpio_new
,
663 .imem
= nv40_instmem_new
,
667 .therm
= nv40_therm_new
,
668 .timer
= nv41_timer_new
,
669 .volt
= nv40_volt_new
,
670 .disp
= nv04_disp_new
,
672 .fifo
= nv40_fifo_new
,
674 .mpeg
= nv44_mpeg_new
,
679 static const struct nvkm_device_chip
682 .bios
= nvkm_bios_new
,
685 .devinit
= nv1a_devinit_new
,
687 .gpio
= nv10_gpio_new
,
689 .imem
= nv40_instmem_new
,
693 .therm
= nv40_therm_new
,
694 .timer
= nv41_timer_new
,
695 .volt
= nv40_volt_new
,
696 .disp
= nv04_disp_new
,
698 .fifo
= nv40_fifo_new
,
700 .mpeg
= nv44_mpeg_new
,
705 static const struct nvkm_device_chip
708 .bios
= nvkm_bios_new
,
711 .devinit
= nv1a_devinit_new
,
713 .gpio
= nv10_gpio_new
,
715 .imem
= nv40_instmem_new
,
719 .therm
= nv40_therm_new
,
720 .timer
= nv41_timer_new
,
721 .volt
= nv40_volt_new
,
722 .disp
= nv04_disp_new
,
724 .fifo
= nv40_fifo_new
,
726 .mpeg
= nv44_mpeg_new
,
731 static const struct nvkm_device_chip
734 .bios
= nvkm_bios_new
,
737 .devinit
= nv1a_devinit_new
,
739 .gpio
= nv10_gpio_new
,
741 .imem
= nv40_instmem_new
,
745 .therm
= nv40_therm_new
,
746 .timer
= nv41_timer_new
,
747 .volt
= nv40_volt_new
,
748 .disp
= nv04_disp_new
,
750 .fifo
= nv40_fifo_new
,
752 .mpeg
= nv44_mpeg_new
,
757 static const struct nvkm_device_chip
760 .bios
= nvkm_bios_new
,
763 .devinit
= nv1a_devinit_new
,
765 .gpio
= nv10_gpio_new
,
767 .imem
= nv40_instmem_new
,
771 .therm
= nv40_therm_new
,
772 .timer
= nv41_timer_new
,
773 .volt
= nv40_volt_new
,
774 .disp
= nv04_disp_new
,
776 .fifo
= nv40_fifo_new
,
778 .mpeg
= nv44_mpeg_new
,
783 static const struct nvkm_device_chip
786 .bios
= nvkm_bios_new
,
789 .devinit
= nv1a_devinit_new
,
791 .gpio
= nv10_gpio_new
,
793 .imem
= nv40_instmem_new
,
797 .therm
= nv40_therm_new
,
798 .timer
= nv41_timer_new
,
799 .volt
= nv40_volt_new
,
800 .disp
= nv04_disp_new
,
802 .fifo
= nv40_fifo_new
,
804 .mpeg
= nv44_mpeg_new
,
809 static const struct nvkm_device_chip
813 .bios
= nvkm_bios_new
,
816 .devinit
= nv50_devinit_new
,
818 .fuse
= nv50_fuse_new
,
819 .gpio
= nv50_gpio_new
,
821 .imem
= nv50_instmem_new
,
826 .therm
= nv50_therm_new
,
827 .timer
= nv41_timer_new
,
828 .volt
= nv40_volt_new
,
829 .disp
= nv50_disp_new
,
831 .fifo
= nv50_fifo_new
,
833 .mpeg
= nv50_mpeg_new
,
838 static const struct nvkm_device_chip
841 .bios
= nvkm_bios_new
,
844 .devinit
= nv1a_devinit_new
,
846 .gpio
= nv10_gpio_new
,
848 .imem
= nv40_instmem_new
,
852 .therm
= nv40_therm_new
,
853 .timer
= nv41_timer_new
,
854 .volt
= nv40_volt_new
,
855 .disp
= nv04_disp_new
,
857 .fifo
= nv40_fifo_new
,
859 .mpeg
= nv44_mpeg_new
,
864 static const struct nvkm_device_chip
867 .bios
= nvkm_bios_new
,
870 .devinit
= nv1a_devinit_new
,
872 .gpio
= nv10_gpio_new
,
874 .imem
= nv40_instmem_new
,
878 .therm
= nv40_therm_new
,
879 .timer
= nv41_timer_new
,
880 .volt
= nv40_volt_new
,
881 .disp
= nv04_disp_new
,
883 .fifo
= nv40_fifo_new
,
885 .mpeg
= nv44_mpeg_new
,
890 static const struct nvkm_device_chip
893 .bios
= nvkm_bios_new
,
896 .devinit
= nv1a_devinit_new
,
898 .gpio
= nv10_gpio_new
,
900 .imem
= nv40_instmem_new
,
904 .therm
= nv40_therm_new
,
905 .timer
= nv41_timer_new
,
906 .volt
= nv40_volt_new
,
907 .disp
= nv04_disp_new
,
909 .fifo
= nv40_fifo_new
,
911 .mpeg
= nv44_mpeg_new
,
916 static const struct nvkm_device_chip
920 .bios
= nvkm_bios_new
,
923 .devinit
= g84_devinit_new
,
925 .fuse
= nv50_fuse_new
,
926 .gpio
= nv50_gpio_new
,
928 .imem
= nv50_instmem_new
,
933 .therm
= g84_therm_new
,
934 .timer
= nv41_timer_new
,
935 .volt
= nv40_volt_new
,
937 .cipher
= g84_cipher_new
,
938 .disp
= g84_disp_new
,
940 .fifo
= g84_fifo_new
,
942 .mpeg
= g84_mpeg_new
,
948 static const struct nvkm_device_chip
952 .bios
= nvkm_bios_new
,
955 .devinit
= g84_devinit_new
,
957 .fuse
= nv50_fuse_new
,
958 .gpio
= nv50_gpio_new
,
960 .imem
= nv50_instmem_new
,
965 .therm
= g84_therm_new
,
966 .timer
= nv41_timer_new
,
967 .volt
= nv40_volt_new
,
969 .cipher
= g84_cipher_new
,
970 .disp
= g84_disp_new
,
972 .fifo
= g84_fifo_new
,
974 .mpeg
= g84_mpeg_new
,
980 static const struct nvkm_device_chip
984 .bios
= nvkm_bios_new
,
987 .devinit
= g84_devinit_new
,
989 .fuse
= nv50_fuse_new
,
990 .gpio
= nv50_gpio_new
,
992 .imem
= nv50_instmem_new
,
997 .therm
= g84_therm_new
,
998 .timer
= nv41_timer_new
,
999 .volt
= nv40_volt_new
,
1001 .cipher
= g84_cipher_new
,
1002 .disp
= g84_disp_new
,
1003 .dma
= nv50_dma_new
,
1004 .fifo
= g84_fifo_new
,
1006 .mpeg
= g84_mpeg_new
,
1012 static const struct nvkm_device_chip
1016 .bios
= nvkm_bios_new
,
1019 .devinit
= g84_devinit_new
,
1021 .fuse
= nv50_fuse_new
,
1022 .gpio
= g94_gpio_new
,
1024 .imem
= nv50_instmem_new
,
1026 .mmu
= nv50_mmu_new
,
1027 .mxm
= nv50_mxm_new
,
1029 .therm
= g84_therm_new
,
1030 .timer
= nv41_timer_new
,
1031 .volt
= nv40_volt_new
,
1033 .cipher
= g84_cipher_new
,
1034 .disp
= g94_disp_new
,
1035 .dma
= nv50_dma_new
,
1036 .fifo
= g84_fifo_new
,
1038 .mpeg
= g84_mpeg_new
,
1044 static const struct nvkm_device_chip
1048 .bios
= nvkm_bios_new
,
1051 .devinit
= g84_devinit_new
,
1053 .fuse
= nv50_fuse_new
,
1054 .gpio
= g94_gpio_new
,
1056 .imem
= nv50_instmem_new
,
1058 .mmu
= nv50_mmu_new
,
1059 .mxm
= nv50_mxm_new
,
1061 .therm
= g84_therm_new
,
1062 .timer
= nv41_timer_new
,
1063 .volt
= nv40_volt_new
,
1065 .cipher
= g84_cipher_new
,
1066 .disp
= g94_disp_new
,
1067 .dma
= nv50_dma_new
,
1068 .fifo
= g84_fifo_new
,
1070 .mpeg
= g84_mpeg_new
,
1076 static const struct nvkm_device_chip
1080 .bios
= nvkm_bios_new
,
1083 .devinit
= g98_devinit_new
,
1085 .fuse
= nv50_fuse_new
,
1086 .gpio
= g94_gpio_new
,
1088 .imem
= nv50_instmem_new
,
1090 .mmu
= nv50_mmu_new
,
1091 .mxm
= nv50_mxm_new
,
1093 .therm
= g84_therm_new
,
1094 .timer
= nv41_timer_new
,
1095 .volt
= nv40_volt_new
,
1096 .disp
= g94_disp_new
,
1097 .dma
= nv50_dma_new
,
1098 .fifo
= g84_fifo_new
,
1100 .mspdec
= g98_mspdec_new
,
1101 .msppp
= g98_msppp_new
,
1102 .msvld
= g98_msvld_new
,
1108 static const struct nvkm_device_chip
1112 .bios
= nvkm_bios_new
,
1115 .devinit
= g84_devinit_new
,
1117 .fuse
= nv50_fuse_new
,
1118 .gpio
= g94_gpio_new
,
1119 .i2c
= nv50_i2c_new
,
1120 .imem
= nv50_instmem_new
,
1122 .mmu
= nv50_mmu_new
,
1123 .mxm
= nv50_mxm_new
,
1125 .therm
= g84_therm_new
,
1126 .timer
= nv41_timer_new
,
1127 .volt
= nv40_volt_new
,
1129 .cipher
= g84_cipher_new
,
1130 .disp
= gt200_disp_new
,
1131 .dma
= nv50_dma_new
,
1132 .fifo
= g84_fifo_new
,
1134 .mpeg
= g84_mpeg_new
,
1140 static const struct nvkm_device_chip
1144 .bios
= nvkm_bios_new
,
1146 .clk
= gt215_clk_new
,
1147 .devinit
= gt215_devinit_new
,
1149 .fuse
= nv50_fuse_new
,
1150 .gpio
= g94_gpio_new
,
1152 .imem
= nv50_instmem_new
,
1154 .mmu
= nv50_mmu_new
,
1155 .mxm
= nv50_mxm_new
,
1157 .pmu
= gt215_pmu_new
,
1158 .therm
= gt215_therm_new
,
1159 .timer
= nv41_timer_new
,
1160 .volt
= nv40_volt_new
,
1161 .ce
[0] = gt215_ce_new
,
1162 .disp
= gt215_disp_new
,
1163 .dma
= nv50_dma_new
,
1164 .fifo
= g84_fifo_new
,
1166 .mpeg
= g84_mpeg_new
,
1167 .mspdec
= gt215_mspdec_new
,
1168 .msppp
= gt215_msppp_new
,
1169 .msvld
= gt215_msvld_new
,
1174 static const struct nvkm_device_chip
1178 .bios
= nvkm_bios_new
,
1180 .clk
= gt215_clk_new
,
1181 .devinit
= gt215_devinit_new
,
1183 .fuse
= nv50_fuse_new
,
1184 .gpio
= g94_gpio_new
,
1186 .imem
= nv50_instmem_new
,
1188 .mmu
= nv50_mmu_new
,
1189 .mxm
= nv50_mxm_new
,
1191 .pmu
= gt215_pmu_new
,
1192 .therm
= gt215_therm_new
,
1193 .timer
= nv41_timer_new
,
1194 .volt
= nv40_volt_new
,
1195 .ce
[0] = gt215_ce_new
,
1196 .disp
= gt215_disp_new
,
1197 .dma
= nv50_dma_new
,
1198 .fifo
= g84_fifo_new
,
1200 .mspdec
= gt215_mspdec_new
,
1201 .msppp
= gt215_msppp_new
,
1202 .msvld
= gt215_msvld_new
,
1207 static const struct nvkm_device_chip
1211 .bios
= nvkm_bios_new
,
1213 .clk
= gt215_clk_new
,
1214 .devinit
= gt215_devinit_new
,
1216 .fuse
= nv50_fuse_new
,
1217 .gpio
= g94_gpio_new
,
1219 .imem
= nv50_instmem_new
,
1221 .mmu
= nv50_mmu_new
,
1222 .mxm
= nv50_mxm_new
,
1224 .pmu
= gt215_pmu_new
,
1225 .therm
= gt215_therm_new
,
1226 .timer
= nv41_timer_new
,
1227 .volt
= nv40_volt_new
,
1228 .ce
[0] = gt215_ce_new
,
1229 .disp
= gt215_disp_new
,
1230 .dma
= nv50_dma_new
,
1231 .fifo
= g84_fifo_new
,
1233 .mspdec
= gt215_mspdec_new
,
1234 .msppp
= gt215_msppp_new
,
1235 .msvld
= gt215_msvld_new
,
1240 static const struct nvkm_device_chip
1242 .name
= "MCP77/MCP78",
1244 .bios
= nvkm_bios_new
,
1246 .clk
= mcp77_clk_new
,
1247 .devinit
= g98_devinit_new
,
1249 .fuse
= nv50_fuse_new
,
1250 .gpio
= g94_gpio_new
,
1252 .imem
= nv50_instmem_new
,
1254 .mmu
= nv50_mmu_new
,
1255 .mxm
= nv50_mxm_new
,
1257 .therm
= g84_therm_new
,
1258 .timer
= nv41_timer_new
,
1259 .volt
= nv40_volt_new
,
1260 .disp
= g94_disp_new
,
1261 .dma
= nv50_dma_new
,
1262 .fifo
= g84_fifo_new
,
1264 .mspdec
= g98_mspdec_new
,
1265 .msppp
= g98_msppp_new
,
1266 .msvld
= g98_msvld_new
,
1272 static const struct nvkm_device_chip
1274 .name
= "MCP79/MCP7A",
1276 .bios
= nvkm_bios_new
,
1278 .clk
= mcp77_clk_new
,
1279 .devinit
= g98_devinit_new
,
1281 .fuse
= nv50_fuse_new
,
1282 .gpio
= g94_gpio_new
,
1284 .imem
= nv50_instmem_new
,
1286 .mmu
= nv50_mmu_new
,
1287 .mxm
= nv50_mxm_new
,
1289 .therm
= g84_therm_new
,
1290 .timer
= nv41_timer_new
,
1291 .volt
= nv40_volt_new
,
1292 .disp
= g94_disp_new
,
1293 .dma
= nv50_dma_new
,
1294 .fifo
= g84_fifo_new
,
1296 .mspdec
= g98_mspdec_new
,
1297 .msppp
= g98_msppp_new
,
1298 .msvld
= g98_msvld_new
,
1304 static const struct nvkm_device_chip
1308 .bios
= nvkm_bios_new
,
1310 .clk
= gt215_clk_new
,
1311 .devinit
= mcp89_devinit_new
,
1313 .fuse
= nv50_fuse_new
,
1314 .gpio
= g94_gpio_new
,
1316 .imem
= nv50_instmem_new
,
1318 .mmu
= nv50_mmu_new
,
1319 .mxm
= nv50_mxm_new
,
1321 .pmu
= gt215_pmu_new
,
1322 .therm
= gt215_therm_new
,
1323 .timer
= nv41_timer_new
,
1324 .volt
= nv40_volt_new
,
1325 .ce
[0] = gt215_ce_new
,
1326 .disp
= gt215_disp_new
,
1327 .dma
= nv50_dma_new
,
1328 .fifo
= g84_fifo_new
,
1330 .mspdec
= gt215_mspdec_new
,
1331 .msppp
= gt215_msppp_new
,
1332 .msvld
= mcp89_msvld_new
,
1337 static const struct nvkm_device_chip
1340 .bar
= gf100_bar_new
,
1341 .bios
= nvkm_bios_new
,
1342 .bus
= gf100_bus_new
,
1343 .clk
= gf100_clk_new
,
1344 .devinit
= gf100_devinit_new
,
1346 .fuse
= gf100_fuse_new
,
1347 .gpio
= g94_gpio_new
,
1349 .ibus
= gf100_ibus_new
,
1350 .imem
= nv50_instmem_new
,
1351 .ltc
= gf100_ltc_new
,
1353 .mmu
= gf100_mmu_new
,
1354 .mxm
= nv50_mxm_new
,
1355 .pci
= gf100_pci_new
,
1356 .pmu
= gf100_pmu_new
,
1357 .therm
= gt215_therm_new
,
1358 .timer
= nv41_timer_new
,
1359 .volt
= nv40_volt_new
,
1360 .ce
[0] = gf100_ce_new
,
1361 .ce
[1] = gf100_ce_new
,
1362 .disp
= gt215_disp_new
,
1363 .dma
= gf100_dma_new
,
1364 .fifo
= gf100_fifo_new
,
1366 .mspdec
= gf100_mspdec_new
,
1367 .msppp
= gf100_msppp_new
,
1368 .msvld
= gf100_msvld_new
,
1373 static const struct nvkm_device_chip
1376 .bar
= gf100_bar_new
,
1377 .bios
= nvkm_bios_new
,
1378 .bus
= gf100_bus_new
,
1379 .clk
= gf100_clk_new
,
1380 .devinit
= gf100_devinit_new
,
1382 .fuse
= gf100_fuse_new
,
1383 .gpio
= g94_gpio_new
,
1385 .ibus
= gf100_ibus_new
,
1386 .imem
= nv50_instmem_new
,
1387 .ltc
= gf100_ltc_new
,
1389 .mmu
= gf100_mmu_new
,
1390 .mxm
= nv50_mxm_new
,
1392 .pmu
= gf100_pmu_new
,
1393 .therm
= gt215_therm_new
,
1394 .timer
= nv41_timer_new
,
1395 .volt
= nv40_volt_new
,
1396 .ce
[0] = gf100_ce_new
,
1397 .disp
= gt215_disp_new
,
1398 .dma
= gf100_dma_new
,
1399 .fifo
= gf100_fifo_new
,
1401 .mspdec
= gf100_mspdec_new
,
1402 .msppp
= gf100_msppp_new
,
1403 .msvld
= gf100_msvld_new
,
1408 static const struct nvkm_device_chip
1411 .bar
= gf100_bar_new
,
1412 .bios
= nvkm_bios_new
,
1413 .bus
= gf100_bus_new
,
1414 .clk
= gf100_clk_new
,
1415 .devinit
= gf100_devinit_new
,
1417 .fuse
= gf100_fuse_new
,
1418 .gpio
= g94_gpio_new
,
1420 .ibus
= gf100_ibus_new
,
1421 .imem
= nv50_instmem_new
,
1422 .ltc
= gf100_ltc_new
,
1424 .mmu
= gf100_mmu_new
,
1425 .mxm
= nv50_mxm_new
,
1427 .pmu
= gf100_pmu_new
,
1428 .therm
= gt215_therm_new
,
1429 .timer
= nv41_timer_new
,
1430 .volt
= nv40_volt_new
,
1431 .ce
[0] = gf100_ce_new
,
1432 .disp
= gt215_disp_new
,
1433 .dma
= gf100_dma_new
,
1434 .fifo
= gf100_fifo_new
,
1436 .mspdec
= gf100_mspdec_new
,
1437 .msppp
= gf100_msppp_new
,
1438 .msvld
= gf100_msvld_new
,
1443 static const struct nvkm_device_chip
1446 .bar
= gf100_bar_new
,
1447 .bios
= nvkm_bios_new
,
1448 .bus
= gf100_bus_new
,
1449 .clk
= gf100_clk_new
,
1450 .devinit
= gf100_devinit_new
,
1452 .fuse
= gf100_fuse_new
,
1453 .gpio
= g94_gpio_new
,
1455 .ibus
= gf100_ibus_new
,
1456 .imem
= nv50_instmem_new
,
1457 .ltc
= gf100_ltc_new
,
1459 .mmu
= gf100_mmu_new
,
1460 .mxm
= nv50_mxm_new
,
1461 .pci
= gf100_pci_new
,
1462 .pmu
= gf100_pmu_new
,
1463 .therm
= gt215_therm_new
,
1464 .timer
= nv41_timer_new
,
1465 .volt
= nv40_volt_new
,
1466 .ce
[0] = gf100_ce_new
,
1467 .ce
[1] = gf100_ce_new
,
1468 .disp
= gt215_disp_new
,
1469 .dma
= gf100_dma_new
,
1470 .fifo
= gf100_fifo_new
,
1472 .mspdec
= gf100_mspdec_new
,
1473 .msppp
= gf100_msppp_new
,
1474 .msvld
= gf100_msvld_new
,
1479 static const struct nvkm_device_chip
1482 .bar
= gf100_bar_new
,
1483 .bios
= nvkm_bios_new
,
1484 .bus
= gf100_bus_new
,
1485 .clk
= gf100_clk_new
,
1486 .devinit
= gf100_devinit_new
,
1488 .fuse
= gf100_fuse_new
,
1489 .gpio
= g94_gpio_new
,
1491 .ibus
= gf100_ibus_new
,
1492 .imem
= nv50_instmem_new
,
1493 .ltc
= gf100_ltc_new
,
1495 .mmu
= gf100_mmu_new
,
1496 .mxm
= nv50_mxm_new
,
1497 .pci
= gf100_pci_new
,
1498 .pmu
= gf100_pmu_new
,
1499 .therm
= gt215_therm_new
,
1500 .timer
= nv41_timer_new
,
1501 .volt
= nv40_volt_new
,
1502 .ce
[0] = gf100_ce_new
,
1503 .ce
[1] = gf100_ce_new
,
1504 .disp
= gt215_disp_new
,
1505 .dma
= gf100_dma_new
,
1506 .fifo
= gf100_fifo_new
,
1508 .mspdec
= gf100_mspdec_new
,
1509 .msppp
= gf100_msppp_new
,
1510 .msvld
= gf100_msvld_new
,
1515 static const struct nvkm_device_chip
1518 .bar
= gf100_bar_new
,
1519 .bios
= nvkm_bios_new
,
1520 .bus
= gf100_bus_new
,
1521 .clk
= gf100_clk_new
,
1522 .devinit
= gf100_devinit_new
,
1524 .fuse
= gf100_fuse_new
,
1525 .gpio
= g94_gpio_new
,
1527 .ibus
= gf100_ibus_new
,
1528 .imem
= nv50_instmem_new
,
1529 .ltc
= gf100_ltc_new
,
1531 .mmu
= gf100_mmu_new
,
1532 .mxm
= nv50_mxm_new
,
1533 .pci
= gf100_pci_new
,
1534 .pmu
= gf100_pmu_new
,
1535 .therm
= gt215_therm_new
,
1536 .timer
= nv41_timer_new
,
1537 .volt
= nv40_volt_new
,
1538 .ce
[0] = gf100_ce_new
,
1539 .ce
[1] = gf100_ce_new
,
1540 .disp
= gt215_disp_new
,
1541 .dma
= gf100_dma_new
,
1542 .fifo
= gf100_fifo_new
,
1544 .mspdec
= gf100_mspdec_new
,
1545 .msppp
= gf100_msppp_new
,
1546 .msvld
= gf100_msvld_new
,
1551 static const struct nvkm_device_chip
1554 .bar
= gf100_bar_new
,
1555 .bios
= nvkm_bios_new
,
1556 .bus
= gf100_bus_new
,
1557 .clk
= gf100_clk_new
,
1558 .devinit
= gf100_devinit_new
,
1560 .fuse
= gf100_fuse_new
,
1561 .gpio
= g94_gpio_new
,
1563 .ibus
= gf100_ibus_new
,
1564 .imem
= nv50_instmem_new
,
1565 .ltc
= gf100_ltc_new
,
1567 .mmu
= gf100_mmu_new
,
1568 .mxm
= nv50_mxm_new
,
1570 .pmu
= gf100_pmu_new
,
1571 .therm
= gt215_therm_new
,
1572 .timer
= nv41_timer_new
,
1573 .volt
= nv40_volt_new
,
1574 .ce
[0] = gf100_ce_new
,
1575 .disp
= gt215_disp_new
,
1576 .dma
= gf100_dma_new
,
1577 .fifo
= gf100_fifo_new
,
1579 .mspdec
= gf100_mspdec_new
,
1580 .msppp
= gf100_msppp_new
,
1581 .msvld
= gf100_msvld_new
,
1586 static const struct nvkm_device_chip
1589 .bar
= gf100_bar_new
,
1590 .bios
= nvkm_bios_new
,
1591 .bus
= gf100_bus_new
,
1592 .clk
= gf100_clk_new
,
1593 .devinit
= gf100_devinit_new
,
1595 .fuse
= gf100_fuse_new
,
1596 .gpio
= gf119_gpio_new
,
1597 .i2c
= gf117_i2c_new
,
1598 .ibus
= gf117_ibus_new
,
1599 .imem
= nv50_instmem_new
,
1600 .ltc
= gf100_ltc_new
,
1602 .mmu
= gf100_mmu_new
,
1603 .mxm
= nv50_mxm_new
,
1605 .therm
= gf119_therm_new
,
1606 .timer
= nv41_timer_new
,
1607 .ce
[0] = gf100_ce_new
,
1608 .disp
= gf119_disp_new
,
1609 .dma
= gf119_dma_new
,
1610 .fifo
= gf100_fifo_new
,
1612 .mspdec
= gf100_mspdec_new
,
1613 .msppp
= gf100_msppp_new
,
1614 .msvld
= gf100_msvld_new
,
1619 static const struct nvkm_device_chip
1622 .bar
= gf100_bar_new
,
1623 .bios
= nvkm_bios_new
,
1624 .bus
= gf100_bus_new
,
1625 .clk
= gf100_clk_new
,
1626 .devinit
= gf100_devinit_new
,
1628 .fuse
= gf100_fuse_new
,
1629 .gpio
= gf119_gpio_new
,
1630 .i2c
= gf119_i2c_new
,
1631 .ibus
= gf117_ibus_new
,
1632 .imem
= nv50_instmem_new
,
1633 .ltc
= gf100_ltc_new
,
1635 .mmu
= gf100_mmu_new
,
1636 .mxm
= nv50_mxm_new
,
1638 .pmu
= gf119_pmu_new
,
1639 .therm
= gf119_therm_new
,
1640 .timer
= nv41_timer_new
,
1641 .volt
= nv40_volt_new
,
1642 .ce
[0] = gf100_ce_new
,
1643 .disp
= gf119_disp_new
,
1644 .dma
= gf119_dma_new
,
1645 .fifo
= gf100_fifo_new
,
1647 .mspdec
= gf100_mspdec_new
,
1648 .msppp
= gf100_msppp_new
,
1649 .msvld
= gf100_msvld_new
,
1654 static const struct nvkm_device_chip
1657 .bar
= gf100_bar_new
,
1658 .bios
= nvkm_bios_new
,
1659 .bus
= gf100_bus_new
,
1660 .clk
= gk104_clk_new
,
1661 .devinit
= gf100_devinit_new
,
1663 .fuse
= gf100_fuse_new
,
1664 .gpio
= gk104_gpio_new
,
1665 .i2c
= gk104_i2c_new
,
1666 .ibus
= gk104_ibus_new
,
1667 .imem
= nv50_instmem_new
,
1668 .ltc
= gk104_ltc_new
,
1670 .mmu
= gf100_mmu_new
,
1671 .mxm
= nv50_mxm_new
,
1673 .pmu
= gk104_pmu_new
,
1674 .therm
= gf119_therm_new
,
1675 .timer
= nv41_timer_new
,
1676 .volt
= gk104_volt_new
,
1677 .ce
[0] = gk104_ce_new
,
1678 .ce
[1] = gk104_ce_new
,
1679 .ce
[2] = gk104_ce_new
,
1680 .disp
= gk104_disp_new
,
1681 .dma
= gf119_dma_new
,
1682 .fifo
= gk104_fifo_new
,
1684 .mspdec
= gk104_mspdec_new
,
1685 .msppp
= gf100_msppp_new
,
1686 .msvld
= gk104_msvld_new
,
1691 static const struct nvkm_device_chip
1694 .bar
= gf100_bar_new
,
1695 .bios
= nvkm_bios_new
,
1696 .bus
= gf100_bus_new
,
1697 .clk
= gk104_clk_new
,
1698 .devinit
= gf100_devinit_new
,
1700 .fuse
= gf100_fuse_new
,
1701 .gpio
= gk104_gpio_new
,
1702 .i2c
= gk104_i2c_new
,
1703 .ibus
= gk104_ibus_new
,
1704 .imem
= nv50_instmem_new
,
1705 .ltc
= gk104_ltc_new
,
1707 .mmu
= gf100_mmu_new
,
1708 .mxm
= nv50_mxm_new
,
1710 .pmu
= gk104_pmu_new
,
1711 .therm
= gf119_therm_new
,
1712 .timer
= nv41_timer_new
,
1713 .volt
= gk104_volt_new
,
1714 .ce
[0] = gk104_ce_new
,
1715 .ce
[1] = gk104_ce_new
,
1716 .ce
[2] = gk104_ce_new
,
1717 .disp
= gk104_disp_new
,
1718 .dma
= gf119_dma_new
,
1719 .fifo
= gk104_fifo_new
,
1721 .mspdec
= gk104_mspdec_new
,
1722 .msppp
= gf100_msppp_new
,
1723 .msvld
= gk104_msvld_new
,
1728 static const struct nvkm_device_chip
1731 .bar
= gf100_bar_new
,
1732 .bios
= nvkm_bios_new
,
1733 .bus
= gf100_bus_new
,
1734 .clk
= gk104_clk_new
,
1735 .devinit
= gf100_devinit_new
,
1737 .fuse
= gf100_fuse_new
,
1738 .gpio
= gk104_gpio_new
,
1739 .i2c
= gk104_i2c_new
,
1740 .ibus
= gk104_ibus_new
,
1741 .imem
= nv50_instmem_new
,
1742 .ltc
= gk104_ltc_new
,
1744 .mmu
= gf100_mmu_new
,
1745 .mxm
= nv50_mxm_new
,
1747 .pmu
= gf119_pmu_new
,
1748 .therm
= gf119_therm_new
,
1749 .timer
= nv41_timer_new
,
1750 .volt
= gk104_volt_new
,
1751 .ce
[0] = gk104_ce_new
,
1752 .ce
[1] = gk104_ce_new
,
1753 .ce
[2] = gk104_ce_new
,
1754 .disp
= gk104_disp_new
,
1755 .dma
= gf119_dma_new
,
1756 .fifo
= gk104_fifo_new
,
1758 .mspdec
= gk104_mspdec_new
,
1759 .msppp
= gf100_msppp_new
,
1760 .msvld
= gk104_msvld_new
,
1765 static const struct nvkm_device_chip
1768 .bar
= gk20a_bar_new
,
1769 .bus
= gf100_bus_new
,
1770 .clk
= gk20a_clk_new
,
1772 .fuse
= gf100_fuse_new
,
1773 .ibus
= gk20a_ibus_new
,
1774 .imem
= gk20a_instmem_new
,
1775 .ltc
= gk104_ltc_new
,
1777 .mmu
= gf100_mmu_new
,
1778 .pmu
= gk20a_pmu_new
,
1779 .timer
= gk20a_timer_new
,
1780 .volt
= gk20a_volt_new
,
1781 .ce
[2] = gk104_ce_new
,
1782 .dma
= gf119_dma_new
,
1783 .fifo
= gk20a_fifo_new
,
1789 static const struct nvkm_device_chip
1792 .bar
= gf100_bar_new
,
1793 .bios
= nvkm_bios_new
,
1794 .bus
= gf100_bus_new
,
1795 .clk
= gk104_clk_new
,
1796 .devinit
= gf100_devinit_new
,
1798 .fuse
= gf100_fuse_new
,
1799 .gpio
= gk104_gpio_new
,
1800 .i2c
= gk104_i2c_new
,
1801 .ibus
= gk104_ibus_new
,
1802 .imem
= nv50_instmem_new
,
1803 .ltc
= gk104_ltc_new
,
1805 .mmu
= gf100_mmu_new
,
1806 .mxm
= nv50_mxm_new
,
1808 .pmu
= gk110_pmu_new
,
1809 .therm
= gf119_therm_new
,
1810 .timer
= nv41_timer_new
,
1811 .volt
= gk104_volt_new
,
1812 .ce
[0] = gk104_ce_new
,
1813 .ce
[1] = gk104_ce_new
,
1814 .ce
[2] = gk104_ce_new
,
1815 .disp
= gk110_disp_new
,
1816 .dma
= gf119_dma_new
,
1817 .fifo
= gk104_fifo_new
,
1819 .mspdec
= gk104_mspdec_new
,
1820 .msppp
= gf100_msppp_new
,
1821 .msvld
= gk104_msvld_new
,
1825 static const struct nvkm_device_chip
1828 .bar
= gf100_bar_new
,
1829 .bios
= nvkm_bios_new
,
1830 .bus
= gf100_bus_new
,
1831 .clk
= gk104_clk_new
,
1832 .devinit
= gf100_devinit_new
,
1834 .fuse
= gf100_fuse_new
,
1835 .gpio
= gk104_gpio_new
,
1836 .i2c
= gf119_i2c_new
,
1837 .ibus
= gk104_ibus_new
,
1838 .imem
= nv50_instmem_new
,
1839 .ltc
= gk104_ltc_new
,
1841 .mmu
= gf100_mmu_new
,
1842 .mxm
= nv50_mxm_new
,
1844 .pmu
= gk110_pmu_new
,
1845 .therm
= gf119_therm_new
,
1846 .timer
= nv41_timer_new
,
1847 .volt
= gk104_volt_new
,
1848 .ce
[0] = gk104_ce_new
,
1849 .ce
[1] = gk104_ce_new
,
1850 .ce
[2] = gk104_ce_new
,
1851 .disp
= gk110_disp_new
,
1852 .dma
= gf119_dma_new
,
1853 .fifo
= gk104_fifo_new
,
1854 .gr
= gk110b_gr_new
,
1855 .mspdec
= gk104_mspdec_new
,
1856 .msppp
= gf100_msppp_new
,
1857 .msvld
= gk104_msvld_new
,
1861 static const struct nvkm_device_chip
1864 .bar
= gf100_bar_new
,
1865 .bios
= nvkm_bios_new
,
1866 .bus
= gf100_bus_new
,
1867 .clk
= gk104_clk_new
,
1868 .devinit
= gf100_devinit_new
,
1870 .fuse
= gf100_fuse_new
,
1871 .gpio
= gk104_gpio_new
,
1872 .i2c
= gk104_i2c_new
,
1873 .ibus
= gk104_ibus_new
,
1874 .imem
= nv50_instmem_new
,
1875 .ltc
= gk104_ltc_new
,
1877 .mmu
= gf100_mmu_new
,
1878 .mxm
= nv50_mxm_new
,
1880 .pmu
= gk208_pmu_new
,
1881 .therm
= gf119_therm_new
,
1882 .timer
= nv41_timer_new
,
1883 .volt
= gk104_volt_new
,
1884 .ce
[0] = gk104_ce_new
,
1885 .ce
[1] = gk104_ce_new
,
1886 .ce
[2] = gk104_ce_new
,
1887 .disp
= gk110_disp_new
,
1888 .dma
= gf119_dma_new
,
1889 .fifo
= gk208_fifo_new
,
1891 .mspdec
= gk104_mspdec_new
,
1892 .msppp
= gf100_msppp_new
,
1893 .msvld
= gk104_msvld_new
,
1897 static const struct nvkm_device_chip
1900 .bar
= gf100_bar_new
,
1901 .bios
= nvkm_bios_new
,
1902 .bus
= gf100_bus_new
,
1903 .clk
= gk104_clk_new
,
1904 .devinit
= gf100_devinit_new
,
1906 .fuse
= gf100_fuse_new
,
1907 .gpio
= gk104_gpio_new
,
1908 .i2c
= gk104_i2c_new
,
1909 .ibus
= gk104_ibus_new
,
1910 .imem
= nv50_instmem_new
,
1911 .ltc
= gk104_ltc_new
,
1913 .mmu
= gf100_mmu_new
,
1914 .mxm
= nv50_mxm_new
,
1916 .pmu
= gk208_pmu_new
,
1917 .therm
= gf119_therm_new
,
1918 .timer
= nv41_timer_new
,
1919 .volt
= gk104_volt_new
,
1920 .ce
[0] = gk104_ce_new
,
1921 .ce
[1] = gk104_ce_new
,
1922 .ce
[2] = gk104_ce_new
,
1923 .disp
= gk110_disp_new
,
1924 .dma
= gf119_dma_new
,
1925 .fifo
= gk208_fifo_new
,
1927 .mspdec
= gk104_mspdec_new
,
1928 .msppp
= gf100_msppp_new
,
1929 .msvld
= gk104_msvld_new
,
1933 static const struct nvkm_device_chip
1936 .bar
= gf100_bar_new
,
1937 .bios
= nvkm_bios_new
,
1938 .bus
= gf100_bus_new
,
1939 .clk
= gk104_clk_new
,
1940 .devinit
= gm107_devinit_new
,
1942 .fuse
= gm107_fuse_new
,
1943 .gpio
= gk104_gpio_new
,
1944 .i2c
= gf119_i2c_new
,
1945 .ibus
= gk104_ibus_new
,
1946 .imem
= nv50_instmem_new
,
1947 .ltc
= gm107_ltc_new
,
1949 .mmu
= gf100_mmu_new
,
1950 .mxm
= nv50_mxm_new
,
1952 .pmu
= gm107_pmu_new
,
1953 .therm
= gm107_therm_new
,
1954 .timer
= gk20a_timer_new
,
1955 .volt
= gk104_volt_new
,
1956 .ce
[0] = gk104_ce_new
,
1957 .ce
[2] = gk104_ce_new
,
1958 .disp
= gm107_disp_new
,
1959 .dma
= gf119_dma_new
,
1960 .fifo
= gk208_fifo_new
,
1965 static const struct nvkm_device_chip
1968 .bar
= gf100_bar_new
,
1969 .bios
= nvkm_bios_new
,
1970 .bus
= gf100_bus_new
,
1971 .devinit
= gm204_devinit_new
,
1973 .fuse
= gm107_fuse_new
,
1974 .gpio
= gk104_gpio_new
,
1975 .i2c
= gm204_i2c_new
,
1976 .ibus
= gk104_ibus_new
,
1977 .imem
= nv50_instmem_new
,
1978 .ltc
= gm107_ltc_new
,
1980 .mmu
= gf100_mmu_new
,
1981 .mxm
= nv50_mxm_new
,
1983 .pmu
= gm107_pmu_new
,
1984 .timer
= gk20a_timer_new
,
1985 .volt
= gk104_volt_new
,
1986 .ce
[0] = gm204_ce_new
,
1987 .ce
[1] = gm204_ce_new
,
1988 .ce
[2] = gm204_ce_new
,
1989 .disp
= gm204_disp_new
,
1990 .dma
= gf119_dma_new
,
1991 .fifo
= gm204_fifo_new
,
1996 static const struct nvkm_device_chip
1999 .bar
= gf100_bar_new
,
2000 .bios
= nvkm_bios_new
,
2001 .bus
= gf100_bus_new
,
2002 .devinit
= gm204_devinit_new
,
2004 .fuse
= gm107_fuse_new
,
2005 .gpio
= gk104_gpio_new
,
2006 .i2c
= gm204_i2c_new
,
2007 .ibus
= gk104_ibus_new
,
2008 .imem
= nv50_instmem_new
,
2009 .ltc
= gm107_ltc_new
,
2011 .mmu
= gf100_mmu_new
,
2012 .mxm
= nv50_mxm_new
,
2014 .pmu
= gm107_pmu_new
,
2015 .timer
= gk20a_timer_new
,
2016 .volt
= gk104_volt_new
,
2017 .ce
[0] = gm204_ce_new
,
2018 .ce
[1] = gm204_ce_new
,
2019 .ce
[2] = gm204_ce_new
,
2020 .disp
= gm204_disp_new
,
2021 .dma
= gf119_dma_new
,
2022 .fifo
= gm204_fifo_new
,
2027 static const struct nvkm_device_chip
2030 .bar
= gk20a_bar_new
,
2031 .bus
= gf100_bus_new
,
2033 .fuse
= gm107_fuse_new
,
2034 .ibus
= gk20a_ibus_new
,
2035 .imem
= gk20a_instmem_new
,
2036 .ltc
= gm107_ltc_new
,
2038 .mmu
= gf100_mmu_new
,
2039 .timer
= gk20a_timer_new
,
2040 .ce
[2] = gm204_ce_new
,
2041 .dma
= gf119_dma_new
,
2042 .fifo
= gm20b_fifo_new
,
2048 nvkm_device_event_ctor(struct nvkm_object
*object
, void *data
, u32 size
,
2049 struct nvkm_notify
*notify
)
2051 if (!WARN_ON(size
!= 0)) {
2060 static const struct nvkm_event_func
2061 nvkm_device_event_func
= {
2062 .ctor
= nvkm_device_event_ctor
,
2065 struct nvkm_subdev
*
2066 nvkm_device_subdev(struct nvkm_device
*device
, int index
)
2068 struct nvkm_engine
*engine
;
2070 if (device
->disable_mask
& (1ULL << index
))
2074 #define _(n,p,m) case NVKM_SUBDEV_##n: if (p) return (m); break
2075 _(BAR
, device
->bar
, &device
->bar
->subdev
);
2076 _(VBIOS
, device
->bios
, &device
->bios
->subdev
);
2077 _(BUS
, device
->bus
, &device
->bus
->subdev
);
2078 _(CLK
, device
->clk
, &device
->clk
->subdev
);
2079 _(DEVINIT
, device
->devinit
, &device
->devinit
->subdev
);
2080 _(FB
, device
->fb
, &device
->fb
->subdev
);
2081 _(FUSE
, device
->fuse
, &device
->fuse
->subdev
);
2082 _(GPIO
, device
->gpio
, &device
->gpio
->subdev
);
2083 _(I2C
, device
->i2c
, &device
->i2c
->subdev
);
2084 _(IBUS
, device
->ibus
, device
->ibus
);
2085 _(INSTMEM
, device
->imem
, &device
->imem
->subdev
);
2086 _(LTC
, device
->ltc
, &device
->ltc
->subdev
);
2087 _(MC
, device
->mc
, &device
->mc
->subdev
);
2088 _(MMU
, device
->mmu
, &device
->mmu
->subdev
);
2089 _(MXM
, device
->mxm
, device
->mxm
);
2090 _(PCI
, device
->pci
, &device
->pci
->subdev
);
2091 _(PMU
, device
->pmu
, &device
->pmu
->subdev
);
2092 _(THERM
, device
->therm
, &device
->therm
->subdev
);
2093 _(TIMER
, device
->timer
, &device
->timer
->subdev
);
2094 _(VOLT
, device
->volt
, &device
->volt
->subdev
);
2097 engine
= nvkm_device_engine(device
, index
);
2099 return &engine
->subdev
;
2105 struct nvkm_engine
*
2106 nvkm_device_engine(struct nvkm_device
*device
, int index
)
2108 if (device
->disable_mask
& (1ULL << index
))
2112 #define _(n,p,m) case NVKM_ENGINE_##n: if (p) return (m); break
2113 _(BSP
, device
->bsp
, device
->bsp
);
2114 _(CE0
, device
->ce
[0] , device
->ce
[0]);
2115 _(CE1
, device
->ce
[1] , device
->ce
[1]);
2116 _(CE2
, device
->ce
[2] , device
->ce
[2]);
2117 _(CIPHER
, device
->cipher
, device
->cipher
);
2118 _(DISP
, device
->disp
, &device
->disp
->engine
);
2119 _(DMAOBJ
, device
->dma
, &device
->dma
->engine
);
2120 _(FIFO
, device
->fifo
, &device
->fifo
->engine
);
2121 _(GR
, device
->gr
, &device
->gr
->engine
);
2122 _(IFB
, device
->ifb
, device
->ifb
);
2123 _(ME
, device
->me
, device
->me
);
2124 _(MPEG
, device
->mpeg
, device
->mpeg
);
2125 _(MSENC
, device
->msenc
, device
->msenc
);
2126 _(MSPDEC
, device
->mspdec
, device
->mspdec
);
2127 _(MSPPP
, device
->msppp
, device
->msppp
);
2128 _(MSVLD
, device
->msvld
, device
->msvld
);
2129 _(PM
, device
->pm
, &device
->pm
->engine
);
2130 _(SEC
, device
->sec
, device
->sec
);
2131 _(SW
, device
->sw
, &device
->sw
->engine
);
2132 _(VIC
, device
->vic
, device
->vic
);
2133 _(VP
, device
->vp
, device
->vp
);
2143 nvkm_device_fini(struct nvkm_device
*device
, bool suspend
)
2145 const char *action
= suspend
? "suspend" : "fini";
2146 struct nvkm_subdev
*subdev
;
2150 nvdev_trace(device
, "%s running...\n", action
);
2151 time
= ktime_to_us(ktime_get());
2153 nvkm_acpi_fini(device
);
2155 for (i
= NVKM_SUBDEV_NR
- 1; i
>= 0; i
--) {
2156 if ((subdev
= nvkm_device_subdev(device
, i
))) {
2157 ret
= nvkm_subdev_fini(subdev
, suspend
);
2164 if (device
->func
->fini
)
2165 device
->func
->fini(device
, suspend
);
2167 time
= ktime_to_us(ktime_get()) - time
;
2168 nvdev_trace(device
, "%s completed in %lldus...\n", action
, time
);
2173 if ((subdev
= nvkm_device_subdev(device
, i
))) {
2174 int rret
= nvkm_subdev_init(subdev
);
2176 nvkm_fatal(subdev
, "failed restart, %d\n", ret
);
2178 } while (++i
< NVKM_SUBDEV_NR
);
2180 nvdev_trace(device
, "%s failed with %d\n", action
, ret
);
2185 nvkm_device_preinit(struct nvkm_device
*device
)
2187 struct nvkm_subdev
*subdev
;
2191 nvdev_trace(device
, "preinit running...\n");
2192 time
= ktime_to_us(ktime_get());
2194 if (device
->func
->preinit
) {
2195 ret
= device
->func
->preinit(device
);
2200 for (i
= 0; i
< NVKM_SUBDEV_NR
; i
++) {
2201 if ((subdev
= nvkm_device_subdev(device
, i
))) {
2202 ret
= nvkm_subdev_preinit(subdev
);
2208 ret
= nvkm_devinit_post(device
->devinit
, &device
->disable_mask
);
2212 time
= ktime_to_us(ktime_get()) - time
;
2213 nvdev_trace(device
, "preinit completed in %lldus\n", time
);
2217 nvdev_error(device
, "preinit failed with %d\n", ret
);
2222 nvkm_device_init(struct nvkm_device
*device
)
2224 struct nvkm_subdev
*subdev
;
2228 ret
= nvkm_device_preinit(device
);
2232 nvkm_device_fini(device
, false);
2234 nvdev_trace(device
, "init running...\n");
2235 time
= ktime_to_us(ktime_get());
2237 if (device
->func
->init
) {
2238 ret
= device
->func
->init(device
);
2243 for (i
= 0; i
< NVKM_SUBDEV_NR
; i
++) {
2244 if ((subdev
= nvkm_device_subdev(device
, i
))) {
2245 ret
= nvkm_subdev_init(subdev
);
2251 nvkm_acpi_init(device
);
2253 time
= ktime_to_us(ktime_get()) - time
;
2254 nvdev_trace(device
, "init completed in %lldus\n", time
);
2259 if ((subdev
= nvkm_device_subdev(device
, i
)))
2260 nvkm_subdev_fini(subdev
, false);
2264 nvdev_error(device
, "init failed with %d\n", ret
);
2269 nvkm_device_del(struct nvkm_device
**pdevice
)
2271 struct nvkm_device
*device
= *pdevice
;
2274 mutex_lock(&nv_devices_mutex
);
2275 device
->disable_mask
= 0;
2276 for (i
= NVKM_SUBDEV_NR
- 1; i
>= 0; i
--) {
2277 struct nvkm_subdev
*subdev
=
2278 nvkm_device_subdev(device
, i
);
2279 nvkm_subdev_del(&subdev
);
2282 nvkm_event_fini(&device
->event
);
2285 iounmap(device
->pri
);
2286 list_del(&device
->head
);
2288 if (device
->func
->dtor
)
2289 *pdevice
= device
->func
->dtor(device
);
2290 mutex_unlock(&nv_devices_mutex
);
2298 nvkm_device_ctor(const struct nvkm_device_func
*func
,
2299 const struct nvkm_device_quirk
*quirk
,
2300 struct device
*dev
, enum nvkm_device_type type
, u64 handle
,
2301 const char *name
, const char *cfg
, const char *dbg
,
2302 bool detect
, bool mmio
, u64 subdev_mask
,
2303 struct nvkm_device
*device
)
2305 struct nvkm_subdev
*subdev
;
2306 u64 mmio_base
, mmio_size
;
2312 mutex_lock(&nv_devices_mutex
);
2313 if (nvkm_device_find_locked(handle
))
2316 device
->func
= func
;
2317 device
->quirk
= quirk
;
2319 device
->type
= type
;
2320 device
->handle
= handle
;
2321 device
->cfgopt
= cfg
;
2322 device
->dbgopt
= dbg
;
2323 device
->name
= name
;
2324 list_add_tail(&device
->head
, &nv_devices
);
2325 device
->debug
= nvkm_dbgopt(device
->dbgopt
, "device");
2327 ret
= nvkm_event_init(&nvkm_device_event_func
, 1, 1, &device
->event
);
2331 mmio_base
= device
->func
->resource_addr(device
, 0);
2332 mmio_size
= device
->func
->resource_size(device
, 0);
2334 /* identify the chipset, and determine classes of subdev/engines */
2336 map
= ioremap(mmio_base
, 0x102000);
2337 if (ret
= -ENOMEM
, map
== NULL
)
2340 /* switch mmio to cpu's native endianness */
2341 #ifndef __BIG_ENDIAN
2342 if (ioread32_native(map
+ 0x000004) != 0x00000000) {
2344 if (ioread32_native(map
+ 0x000004) == 0x00000000) {
2346 iowrite32_native(0x01000001, map
+ 0x000004);
2347 ioread32_native(map
);
2350 /* read boot0 and strapping information */
2351 boot0
= ioread32_native(map
+ 0x000000);
2352 strap
= ioread32_native(map
+ 0x101000);
2355 /* determine chipset and derive architecture from it */
2356 if ((boot0
& 0x1f000000) > 0) {
2357 device
->chipset
= (boot0
& 0x1ff00000) >> 20;
2358 device
->chiprev
= (boot0
& 0x000000ff);
2359 switch (device
->chipset
& 0x1f0) {
2361 if (0x461 & (1 << (device
->chipset
& 0xf)))
2362 device
->card_type
= NV_10
;
2364 device
->card_type
= NV_11
;
2365 device
->chiprev
= 0x00;
2368 case 0x020: device
->card_type
= NV_20
; break;
2369 case 0x030: device
->card_type
= NV_30
; break;
2371 case 0x060: device
->card_type
= NV_40
; break;
2375 case 0x0a0: device
->card_type
= NV_50
; break;
2377 case 0x0d0: device
->card_type
= NV_C0
; break;
2380 case 0x100: device
->card_type
= NV_E0
; break;
2382 case 0x120: device
->card_type
= GM100
; break;
2387 if ((boot0
& 0xff00fff0) == 0x20004000) {
2388 if (boot0
& 0x00f00000)
2389 device
->chipset
= 0x05;
2391 device
->chipset
= 0x04;
2392 device
->card_type
= NV_04
;
2395 switch (device
->chipset
) {
2396 case 0x004: device
->chip
= &nv4_chipset
; break;
2397 case 0x005: device
->chip
= &nv5_chipset
; break;
2398 case 0x010: device
->chip
= &nv10_chipset
; break;
2399 case 0x011: device
->chip
= &nv11_chipset
; break;
2400 case 0x015: device
->chip
= &nv15_chipset
; break;
2401 case 0x017: device
->chip
= &nv17_chipset
; break;
2402 case 0x018: device
->chip
= &nv18_chipset
; break;
2403 case 0x01a: device
->chip
= &nv1a_chipset
; break;
2404 case 0x01f: device
->chip
= &nv1f_chipset
; break;
2405 case 0x020: device
->chip
= &nv20_chipset
; break;
2406 case 0x025: device
->chip
= &nv25_chipset
; break;
2407 case 0x028: device
->chip
= &nv28_chipset
; break;
2408 case 0x02a: device
->chip
= &nv2a_chipset
; break;
2409 case 0x030: device
->chip
= &nv30_chipset
; break;
2410 case 0x031: device
->chip
= &nv31_chipset
; break;
2411 case 0x034: device
->chip
= &nv34_chipset
; break;
2412 case 0x035: device
->chip
= &nv35_chipset
; break;
2413 case 0x036: device
->chip
= &nv36_chipset
; break;
2414 case 0x040: device
->chip
= &nv40_chipset
; break;
2415 case 0x041: device
->chip
= &nv41_chipset
; break;
2416 case 0x042: device
->chip
= &nv42_chipset
; break;
2417 case 0x043: device
->chip
= &nv43_chipset
; break;
2418 case 0x044: device
->chip
= &nv44_chipset
; break;
2419 case 0x045: device
->chip
= &nv45_chipset
; break;
2420 case 0x046: device
->chip
= &nv46_chipset
; break;
2421 case 0x047: device
->chip
= &nv47_chipset
; break;
2422 case 0x049: device
->chip
= &nv49_chipset
; break;
2423 case 0x04a: device
->chip
= &nv4a_chipset
; break;
2424 case 0x04b: device
->chip
= &nv4b_chipset
; break;
2425 case 0x04c: device
->chip
= &nv4c_chipset
; break;
2426 case 0x04e: device
->chip
= &nv4e_chipset
; break;
2427 case 0x050: device
->chip
= &nv50_chipset
; break;
2428 case 0x063: device
->chip
= &nv63_chipset
; break;
2429 case 0x067: device
->chip
= &nv67_chipset
; break;
2430 case 0x068: device
->chip
= &nv68_chipset
; break;
2431 case 0x084: device
->chip
= &nv84_chipset
; break;
2432 case 0x086: device
->chip
= &nv86_chipset
; break;
2433 case 0x092: device
->chip
= &nv92_chipset
; break;
2434 case 0x094: device
->chip
= &nv94_chipset
; break;
2435 case 0x096: device
->chip
= &nv96_chipset
; break;
2436 case 0x098: device
->chip
= &nv98_chipset
; break;
2437 case 0x0a0: device
->chip
= &nva0_chipset
; break;
2438 case 0x0a3: device
->chip
= &nva3_chipset
; break;
2439 case 0x0a5: device
->chip
= &nva5_chipset
; break;
2440 case 0x0a8: device
->chip
= &nva8_chipset
; break;
2441 case 0x0aa: device
->chip
= &nvaa_chipset
; break;
2442 case 0x0ac: device
->chip
= &nvac_chipset
; break;
2443 case 0x0af: device
->chip
= &nvaf_chipset
; break;
2444 case 0x0c0: device
->chip
= &nvc0_chipset
; break;
2445 case 0x0c1: device
->chip
= &nvc1_chipset
; break;
2446 case 0x0c3: device
->chip
= &nvc3_chipset
; break;
2447 case 0x0c4: device
->chip
= &nvc4_chipset
; break;
2448 case 0x0c8: device
->chip
= &nvc8_chipset
; break;
2449 case 0x0ce: device
->chip
= &nvce_chipset
; break;
2450 case 0x0cf: device
->chip
= &nvcf_chipset
; break;
2451 case 0x0d7: device
->chip
= &nvd7_chipset
; break;
2452 case 0x0d9: device
->chip
= &nvd9_chipset
; break;
2453 case 0x0e4: device
->chip
= &nve4_chipset
; break;
2454 case 0x0e6: device
->chip
= &nve6_chipset
; break;
2455 case 0x0e7: device
->chip
= &nve7_chipset
; break;
2456 case 0x0ea: device
->chip
= &nvea_chipset
; break;
2457 case 0x0f0: device
->chip
= &nvf0_chipset
; break;
2458 case 0x0f1: device
->chip
= &nvf1_chipset
; break;
2459 case 0x106: device
->chip
= &nv106_chipset
; break;
2460 case 0x108: device
->chip
= &nv108_chipset
; break;
2461 case 0x117: device
->chip
= &nv117_chipset
; break;
2462 case 0x124: device
->chip
= &nv124_chipset
; break;
2463 case 0x126: device
->chip
= &nv126_chipset
; break;
2464 case 0x12b: device
->chip
= &nv12b_chipset
; break;
2466 nvdev_error(device
, "unknown chipset (%08x)\n", boot0
);
2470 nvdev_info(device
, "NVIDIA %s (%08x)\n",
2471 device
->chip
->name
, boot0
);
2473 /* determine frequency of timing crystal */
2474 if ( device
->card_type
<= NV_10
|| device
->chipset
< 0x17 ||
2475 (device
->chipset
>= 0x20 && device
->chipset
< 0x25))
2476 strap
&= 0x00000040;
2478 strap
&= 0x00400040;
2481 case 0x00000000: device
->crystal
= 13500; break;
2482 case 0x00000040: device
->crystal
= 14318; break;
2483 case 0x00400000: device
->crystal
= 27000; break;
2484 case 0x00400040: device
->crystal
= 25000; break;
2487 device
->chip
= &null_chipset
;
2491 device
->name
= device
->chip
->name
;
2494 device
->pri
= ioremap(mmio_base
, mmio_size
);
2496 nvdev_error(device
, "unable to map PRI\n");
2501 mutex_init(&device
->mutex
);
2503 for (i
= 0; i
< NVKM_SUBDEV_NR
; i
++) {
2504 #define _(s,m) case s: \
2505 if (device->chip->m && (subdev_mask & (1ULL << (s)))) { \
2506 ret = device->chip->m(device, (s), &device->m); \
2508 subdev = nvkm_device_subdev(device, (s)); \
2509 nvkm_subdev_del(&subdev); \
2511 if (ret != -ENODEV) { \
2512 nvdev_error(device, "%s ctor failed, %d\n", \
2513 nvkm_subdev_name[s], ret); \
2520 _(NVKM_SUBDEV_BAR
, bar
);
2521 _(NVKM_SUBDEV_VBIOS
, bios
);
2522 _(NVKM_SUBDEV_BUS
, bus
);
2523 _(NVKM_SUBDEV_CLK
, clk
);
2524 _(NVKM_SUBDEV_DEVINIT
, devinit
);
2525 _(NVKM_SUBDEV_FB
, fb
);
2526 _(NVKM_SUBDEV_FUSE
, fuse
);
2527 _(NVKM_SUBDEV_GPIO
, gpio
);
2528 _(NVKM_SUBDEV_I2C
, i2c
);
2529 _(NVKM_SUBDEV_IBUS
, ibus
);
2530 _(NVKM_SUBDEV_INSTMEM
, imem
);
2531 _(NVKM_SUBDEV_LTC
, ltc
);
2532 _(NVKM_SUBDEV_MC
, mc
);
2533 _(NVKM_SUBDEV_MMU
, mmu
);
2534 _(NVKM_SUBDEV_MXM
, mxm
);
2535 _(NVKM_SUBDEV_PCI
, pci
);
2536 _(NVKM_SUBDEV_PMU
, pmu
);
2537 _(NVKM_SUBDEV_THERM
, therm
);
2538 _(NVKM_SUBDEV_TIMER
, timer
);
2539 _(NVKM_SUBDEV_VOLT
, volt
);
2540 _(NVKM_ENGINE_BSP
, bsp
);
2541 _(NVKM_ENGINE_CE0
, ce
[0]);
2542 _(NVKM_ENGINE_CE1
, ce
[1]);
2543 _(NVKM_ENGINE_CE2
, ce
[2]);
2544 _(NVKM_ENGINE_CIPHER
, cipher
);
2545 _(NVKM_ENGINE_DISP
, disp
);
2546 _(NVKM_ENGINE_DMAOBJ
, dma
);
2547 _(NVKM_ENGINE_FIFO
, fifo
);
2548 _(NVKM_ENGINE_GR
, gr
);
2549 _(NVKM_ENGINE_IFB
, ifb
);
2550 _(NVKM_ENGINE_ME
, me
);
2551 _(NVKM_ENGINE_MPEG
, mpeg
);
2552 _(NVKM_ENGINE_MSENC
, msenc
);
2553 _(NVKM_ENGINE_MSPDEC
, mspdec
);
2554 _(NVKM_ENGINE_MSPPP
, msppp
);
2555 _(NVKM_ENGINE_MSVLD
, msvld
);
2556 _(NVKM_ENGINE_PM
, pm
);
2557 _(NVKM_ENGINE_SEC
, sec
);
2558 _(NVKM_ENGINE_SW
, sw
);
2559 _(NVKM_ENGINE_VIC
, vic
);
2560 _(NVKM_ENGINE_VP
, vp
);
2570 mutex_unlock(&nv_devices_mutex
);