/* * Copyright 2012 Red Hat Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: Ben Skeggs
*/ #define nvkm_udevice(p) container_of((p), struct nvkm_udevice, object) #include"priv.h" #include"ctrl.h"
nvif_ioctl(object, "device info size %d\n", size); if (!(ret = nvif_unpack(ret, &data, &size, args->v1, 1, 1, true))) {
nvif_ioctl(object, "device info vers %d count %d\n",
args->v1.version, args->v1.count); if (args->v1.count * sizeof(args->v1.data[0]) == size) { for (i = 0; i < args->v1.count; i++)
nvkm_udevice_info_v1(device, &args->v1.data[i]); return 0;
} return -EINVAL;
} else if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) {
nvif_ioctl(object, "device info vers %d\n", args->v0.version);
} else return ret;
switch (device->chipset) { case 0x01a: case 0x01f: case 0x04c: case 0x04e: case 0x063: case 0x067: case 0x068: case 0x0aa: case 0x0ac: case 0x0af:
args->v0.platform = NV_DEVICE_INFO_V0_IGP; break; default: switch (device->type) { case NVKM_DEVICE_PCI:
args->v0.platform = NV_DEVICE_INFO_V0_PCI; break; case NVKM_DEVICE_AGP:
args->v0.platform = NV_DEVICE_INFO_V0_AGP; break; case NVKM_DEVICE_PCIE:
args->v0.platform = NV_DEVICE_INFO_V0_PCIE; break; case NVKM_DEVICE_TEGRA:
args->v0.platform = NV_DEVICE_INFO_V0_SOC; break; default:
WARN_ON(1); break;
} break;
}
switch (device->card_type) { case NV_04: args->v0.family = NV_DEVICE_INFO_V0_TNT; break; case NV_10: case NV_11: args->v0.family = NV_DEVICE_INFO_V0_CELSIUS; break; case NV_20: args->v0.family = NV_DEVICE_INFO_V0_KELVIN; break; case NV_30: args->v0.family = NV_DEVICE_INFO_V0_RANKINE; break; case NV_40: args->v0.family = NV_DEVICE_INFO_V0_CURIE; break; case NV_50: args->v0.family = NV_DEVICE_INFO_V0_TESLA; break; case NV_C0: args->v0.family = NV_DEVICE_INFO_V0_FERMI; break; case NV_E0: args->v0.family = NV_DEVICE_INFO_V0_KEPLER; break; case GM100: args->v0.family = NV_DEVICE_INFO_V0_MAXWELL; break; case GP100: args->v0.family = NV_DEVICE_INFO_V0_PASCAL; break; case GV100: args->v0.family = NV_DEVICE_INFO_V0_VOLTA; break; case TU100: args->v0.family = NV_DEVICE_INFO_V0_TURING; break; case GA100: args->v0.family = NV_DEVICE_INFO_V0_AMPERE; break; case AD100: args->v0.family = NV_DEVICE_INFO_V0_ADA; break; case GH100: args->v0.family = NV_DEVICE_INFO_V0_HOPPER; break; case GB10x: args->v0.family = NV_DEVICE_INFO_V0_BLACKWELL; break; case GB20x: args->v0.family = NV_DEVICE_INFO_V0_BLACKWELL; break; default:
args->v0.family = 0; break;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.