| .. | .. |
|---|
| 91 | 91 | case ENGINE_A(MSENC ); break; |
|---|
| 92 | 92 | case ENGINE_A(VIC ); break; |
|---|
| 93 | 93 | case ENGINE_A(SEC2 ); break; |
|---|
| 94 | | - case ENGINE_A(NVDEC ); break; |
|---|
| 94 | + case ENGINE_B(NVDEC ); break; |
|---|
| 95 | 95 | case ENGINE_B(NVENC ); break; |
|---|
| 96 | 96 | default: |
|---|
| 97 | 97 | args->mthd = NV_DEVICE_INFO_INVALID; |
|---|
| .. | .. |
|---|
| 175 | 175 | case GM100: args->v0.family = NV_DEVICE_INFO_V0_MAXWELL; break; |
|---|
| 176 | 176 | case GP100: args->v0.family = NV_DEVICE_INFO_V0_PASCAL; break; |
|---|
| 177 | 177 | case GV100: args->v0.family = NV_DEVICE_INFO_V0_VOLTA; break; |
|---|
| 178 | + case TU100: args->v0.family = NV_DEVICE_INFO_V0_TURING; break; |
|---|
| 178 | 179 | default: |
|---|
| 179 | 180 | args->v0.family = 0; |
|---|
| 180 | 181 | break; |
|---|
| .. | .. |
|---|
| 364 | 365 | } |
|---|
| 365 | 366 | |
|---|
| 366 | 367 | if (!sclass) { |
|---|
| 367 | | - switch (index) { |
|---|
| 368 | | - case 0: sclass = &nvkm_control_oclass; break; |
|---|
| 369 | | - case 1: |
|---|
| 370 | | - if (!device->mmu) |
|---|
| 371 | | - return -EINVAL; |
|---|
| 368 | + if (index-- == 0) |
|---|
| 369 | + sclass = &nvkm_control_oclass; |
|---|
| 370 | + else if (device->mmu && index-- == 0) |
|---|
| 372 | 371 | sclass = &device->mmu->user; |
|---|
| 373 | | - break; |
|---|
| 374 | | - default: |
|---|
| 372 | + else if (device->fault && index-- == 0) |
|---|
| 373 | + sclass = &device->fault->user; |
|---|
| 374 | + else |
|---|
| 375 | 375 | return -EINVAL; |
|---|
| 376 | | - } |
|---|
| 376 | + |
|---|
| 377 | 377 | oclass->base = sclass->base; |
|---|
| 378 | 378 | } |
|---|
| 379 | 379 | |
|---|