| .. | .. |
|---|
| 30 | 30 | |
|---|
| 31 | 31 | const char * |
|---|
| 32 | 32 | nvkm_subdev_name[NVKM_SUBDEV_NR] = { |
|---|
| 33 | + [NVKM_SUBDEV_ACR ] = "acr", |
|---|
| 33 | 34 | [NVKM_SUBDEV_BAR ] = "bar", |
|---|
| 34 | 35 | [NVKM_SUBDEV_VBIOS ] = "bios", |
|---|
| 35 | 36 | [NVKM_SUBDEV_BUS ] = "bus", |
|---|
| .. | .. |
|---|
| 39 | 40 | [NVKM_SUBDEV_FB ] = "fb", |
|---|
| 40 | 41 | [NVKM_SUBDEV_FUSE ] = "fuse", |
|---|
| 41 | 42 | [NVKM_SUBDEV_GPIO ] = "gpio", |
|---|
| 43 | + [NVKM_SUBDEV_GSP ] = "gsp", |
|---|
| 42 | 44 | [NVKM_SUBDEV_I2C ] = "i2c", |
|---|
| 43 | 45 | [NVKM_SUBDEV_IBUS ] = "priv", |
|---|
| 44 | 46 | [NVKM_SUBDEV_ICCSENSE] = "iccsense", |
|---|
| .. | .. |
|---|
| 49 | 51 | [NVKM_SUBDEV_MXM ] = "mxm", |
|---|
| 50 | 52 | [NVKM_SUBDEV_PCI ] = "pci", |
|---|
| 51 | 53 | [NVKM_SUBDEV_PMU ] = "pmu", |
|---|
| 52 | | - [NVKM_SUBDEV_SECBOOT ] = "secboot", |
|---|
| 53 | 54 | [NVKM_SUBDEV_THERM ] = "therm", |
|---|
| 54 | 55 | [NVKM_SUBDEV_TIMER ] = "tmr", |
|---|
| 55 | 56 | [NVKM_SUBDEV_TOP ] = "top", |
|---|
| .. | .. |
|---|
| 79 | 80 | [NVKM_ENGINE_NVENC0 ] = "nvenc0", |
|---|
| 80 | 81 | [NVKM_ENGINE_NVENC1 ] = "nvenc1", |
|---|
| 81 | 82 | [NVKM_ENGINE_NVENC2 ] = "nvenc2", |
|---|
| 82 | | - [NVKM_ENGINE_NVDEC ] = "nvdec", |
|---|
| 83 | + [NVKM_ENGINE_NVDEC0 ] = "nvdec0", |
|---|
| 84 | + [NVKM_ENGINE_NVDEC1 ] = "nvdec1", |
|---|
| 85 | + [NVKM_ENGINE_NVDEC2 ] = "nvdec2", |
|---|
| 83 | 86 | [NVKM_ENGINE_PM ] = "pm", |
|---|
| 84 | 87 | [NVKM_ENGINE_SEC ] = "sec", |
|---|
| 85 | 88 | [NVKM_ENGINE_SEC2 ] = "sec2", |
|---|
| .. | .. |
|---|
| 218 | 221 | __mutex_init(&subdev->mutex, name, &nvkm_subdev_lock_class[index]); |
|---|
| 219 | 222 | subdev->debug = nvkm_dbgopt(device->dbgopt, name); |
|---|
| 220 | 223 | } |
|---|
| 224 | + |
|---|
| 225 | +int |
|---|
| 226 | +nvkm_subdev_new_(const struct nvkm_subdev_func *func, |
|---|
| 227 | + struct nvkm_device *device, int index, |
|---|
| 228 | + struct nvkm_subdev **psubdev) |
|---|
| 229 | +{ |
|---|
| 230 | + if (!(*psubdev = kzalloc(sizeof(**psubdev), GFP_KERNEL))) |
|---|
| 231 | + return -ENOMEM; |
|---|
| 232 | + nvkm_subdev_ctor(func, device, index, *psubdev); |
|---|
| 233 | + return 0; |
|---|
| 234 | +} |
|---|