diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-14 15:35:00 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-22 12:18:06 +1000 |
commit | 9719047b4d985ca7a46819956047cca04213d63e (patch) | |
tree | b6d260c4c32bfab742eb34a4bee1c94b113758ea /drivers/gpu/drm/nouveau/nvkm | |
parent | a56866a9809d276e3bf9aee27466cee385d2b5e6 (diff) | |
download | linux-9719047b4d985ca7a46819956047cca04213d63e.tar.gz |
drm/nouveau/device: namespace + nvidia gpu names (no binary change)
The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver. This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).
Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.
A comparison of objdump disassemblies proves no code changes.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm')
16 files changed, 261 insertions, 265 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/device/Kbuild index 77d06d46eff4..de1bf092b2b2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/Kbuild +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/Kbuild @@ -7,6 +7,6 @@ nvkm-y += nvkm/engine/device/nv20.o nvkm-y += nvkm/engine/device/nv30.o nvkm-y += nvkm/engine/device/nv40.o nvkm-y += nvkm/engine/device/nv50.o -nvkm-y += nvkm/engine/device/nvc0.o -nvkm-y += nvkm/engine/device/nve0.o +nvkm-y += nvkm/engine/device/gf100.o +nvkm-y += nvkm/engine/device/gk104.o nvkm-y += nvkm/engine/device/gm100.o diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c index 4dbf0ba89e5c..f42706e1d5db 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c @@ -21,14 +21,15 @@ * * Authors: Ben Skeggs */ - #include "acpi.h" +#include <core/device.h> + #ifdef CONFIG_ACPI static int nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data) { - struct nouveau_device *device = + struct nvkm_device *device = container_of(nb, typeof(*device), acpi.nb); struct acpi_bus_event *info = data; @@ -40,7 +41,7 @@ nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data) #endif int -nvkm_acpi_fini(struct nouveau_device *device, bool suspend) +nvkm_acpi_fini(struct nvkm_device *device, bool suspend) { #ifdef CONFIG_ACPI unregister_acpi_notifier(&device->acpi.nb); @@ -49,7 +50,7 @@ nvkm_acpi_fini(struct nouveau_device *device, bool suspend) } int -nvkm_acpi_init(struct nouveau_device *device) +nvkm_acpi_init(struct nvkm_device *device) { #ifdef CONFIG_ACPI device->acpi.nb.notifier_call = nvkm_acpi_ntfy; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h b/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h index cc49f4f568cd..82dd359ddfa4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h @@ -1,9 +1,8 @@ #ifndef __NVKM_DEVICE_ACPI_H__ #define __NVKM_DEVICE_ACPI_H__ +#include <core/os.h> +struct nvkm_device; -#include <engine/device.h> - -int nvkm_acpi_init(struct nouveau_device *); -int nvkm_acpi_fini(struct nouveau_device *, bool); - +int nvkm_acpi_init(struct nvkm_device *); +int nvkm_acpi_fini(struct nvkm_device *, bool); #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index ae2ad8b4e5df..29bd539af183 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -21,29 +21,27 @@ * * Authors: Ben Skeggs */ +#include "priv.h" +#include "acpi.h" -#include <core/notify.h> -#include <core/object.h> -#include <core/device.h> #include <core/client.h> #include <core/option.h> -#include <nvif/unpack.h> -#include <nvif/class.h> - +#include <core/notify.h> +#include <core/parent.h> #include <subdev/bios.h> #include <subdev/fb.h> #include <subdev/instmem.h> -#include "priv.h" -#include "acpi.h" +#include <nvif/class.h> +#include <nvif/unpack.h> static DEFINE_MUTEX(nv_devices_mutex); static LIST_HEAD(nv_devices); -struct nouveau_device * -nouveau_device_find(u64 name) +struct nvkm_device * +nvkm_device_find(u64 name) { - struct nouveau_device *device, *match = NULL; + struct nvkm_device *device, *match = NULL; mutex_lock(&nv_devices_mutex); list_for_each_entry(device, &nv_devices, head) { if (device->handle == name) { @@ -56,9 +54,9 @@ nouveau_device_find(u64 name) } int -nouveau_device_list(u64 *name, int size) +nvkm_device_list(u64 *name, int size) { - struct nouveau_device *device; + struct nvkm_device *device; int nr = 0; mutex_lock(&nv_devices_mutex); list_for_each_entry(device, &nv_devices, head) { @@ -70,20 +68,20 @@ nouveau_device_list(u64 *name, int size) } /****************************************************************************** - * nouveau_devobj (0x0080): class implementation + * nvkm_devobj (0x0080): class implementation *****************************************************************************/ -struct nouveau_devobj { - struct nouveau_parent base; - struct nouveau_object *subdev[NVDEV_SUBDEV_NR]; +struct nvkm_devobj { + struct nvkm_parent base; + struct nvkm_object *subdev[NVDEV_SUBDEV_NR]; }; static int -nouveau_devobj_info(struct nouveau_object *object, void *data, u32 size) +nvkm_devobj_info(struct nvkm_object *object, void *data, u32 size) { - struct nouveau_device *device = nv_device(object); - struct nouveau_fb *pfb = nouveau_fb(device); - struct nouveau_instmem *imem = nouveau_instmem(device); + struct nvkm_device *device = nv_device(object); + struct nvkm_fb *pfb = nvkm_fb(device); + struct nvkm_instmem *imem = nvkm_instmem(device); union { struct nv_device_info_v0 v0; } *args = data; @@ -148,12 +146,11 @@ nouveau_devobj_info(struct nouveau_object *object, void *data, u32 size) } static int -nouveau_devobj_mthd(struct nouveau_object *object, u32 mthd, - void *data, u32 size) +nvkm_devobj_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) { switch (mthd) { case NV_DEVICE_V0_INFO: - return nouveau_devobj_info(object, data, size); + return nvkm_devobj_info(object, data, size); default: break; } @@ -161,45 +158,45 @@ nouveau_devobj_mthd(struct nouveau_object *object, u32 mthd, } static u8 -nouveau_devobj_rd08(struct nouveau_object *object, u64 addr) +nvkm_devobj_rd08(struct nvkm_object *object, u64 addr) { return nv_rd08(object->engine, addr); } static u16 -nouveau_devobj_rd16(struct nouveau_object *object, u64 addr) +nvkm_devobj_rd16(struct nvkm_object *object, u64 addr) { return nv_rd16(object->engine, addr); } static u32 -nouveau_devobj_rd32(struct nouveau_object *object, u64 addr) +nvkm_devobj_rd32(struct nvkm_object *object, u64 addr) { return nv_rd32(object->engine, addr); } static void -nouveau_devobj_wr08(struct nouveau_object *object, u64 addr, u8 data) +nvkm_devobj_wr08(struct nvkm_object *object, u64 addr, u8 data) { nv_wr08(object->engine, addr, data); } static void -nouveau_devobj_wr16(struct nouveau_object *object, u64 addr, u16 data) +nvkm_devobj_wr16(struct nvkm_object *object, u64 addr, u16 data) { nv_wr16(object->engine, addr, data); } static void -nouveau_devobj_wr32(struct nouveau_object *object, u64 addr, u32 data) +nvkm_devobj_wr32(struct nvkm_object *object, u64 addr, u32 data) { nv_wr32(object->engine, addr, data); } static int -nouveau_devobj_map(struct nouveau_object *object, u64 *addr, u32 *size) +nvkm_devobj_map(struct nvkm_object *object, u64 *addr, u32 *size) { - struct nouveau_device *device = nv_device(object); + struct nvkm_device *device = nv_device(object); *addr = nv_device_resource_start(device, 0); *size = nv_device_resource_len(device, 0); return 0; @@ -248,47 +245,46 @@ static const u64 disable_map[] = { }; static void -nouveau_devobj_dtor(struct nouveau_object *object) +nvkm_devobj_dtor(struct nvkm_object *object) { - struct nouveau_devobj *devobj = (void *)object; + struct nvkm_devobj *devobj = (void *)object; int i; for (i = NVDEV_SUBDEV_NR - 1; i >= 0; i--) - nouveau_object_ref(NULL, &devobj->subdev[i]); + nvkm_object_ref(NULL, &devobj->subdev[i]); - nouveau_parent_destroy(&devobj->base); + nvkm_parent_destroy(&devobj->base); } -static struct nouveau_oclass -nouveau_devobj_oclass_super = { +static struct nvkm_oclass +nvkm_devobj_oclass_super = { .handle = NV_DEVICE, - .ofuncs = &(struct nouveau_ofuncs) { - .dtor = nouveau_devobj_dtor, - .init = _nouveau_parent_init, - .fini = _nouveau_parent_fini, - .mthd = nouveau_devobj_mthd, - .map = nouveau_devobj_map, - .rd08 = nouveau_devobj_rd08, - .rd16 = nouveau_devobj_rd16, - .rd32 = nouveau_devobj_rd32, - .wr08 = nouveau_devobj_wr08, - .wr16 = nouveau_devobj_wr16, - .wr32 = nouveau_devobj_wr32, + .ofuncs = &(struct nvkm_ofuncs) { + .dtor = nvkm_devobj_dtor, + .init = _nvkm_parent_init, + .fini = _nvkm_parent_fini, + .mthd = nvkm_devobj_mthd, + .map = nvkm_devobj_map, + .rd08 = nvkm_devobj_rd08, + .rd16 = nvkm_devobj_rd16, + .rd32 = nvkm_devobj_rd32, + .wr08 = nvkm_devobj_wr08, + .wr16 = nvkm_devobj_wr16, + .wr32 = nvkm_devobj_wr32, } }; static int -nouveau_devobj_ctor(struct nouveau_object *parent, - struct nouveau_object *engine, - struct nouveau_oclass *oclass, void *data, u32 size, - struct nouveau_object **pobject) +nvkm_devobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine, + struct nvkm_oclass *oclass, void *data, u32 size, + struct nvkm_object **pobject) { union { struct nv_device_v0 v0; } *args = data; - struct nouveau_client *client = nv_client(parent); - struct nouveau_device *device; - struct nouveau_devobj *devobj; + struct nvkm_client *client = nv_client(parent); + struct nvkm_device *device; + struct nvkm_devobj *devobj; u32 boot0, strap; u64 disable, mmio_base, mmio_size; void __iomem *map; @@ -305,22 +301,22 @@ nouveau_devobj_ctor(struct nouveau_object *parent, /* give priviledged clients register access */ if (client->super) - oclass = &nouveau_devobj_oclass_super; + oclass = &nvkm_devobj_oclass_super; /* find the device subdev that matches what the client requested */ device = nv_device(client->device); if (args->v0.device != ~0) { - device = nouveau_device_find(args->v0.device); + device = nvkm_device_find(args->v0.device); if (!device) return -ENODEV; } - ret = nouveau_parent_create(parent, nv_object(device), oclass, 0, - nouveau_control_oclass, - (1ULL << NVDEV_ENGINE_DMAOBJ) | - (1ULL << NVDEV_ENGINE_FIFO) | - (1ULL << NVDEV_ENGINE_DISP) | - (1ULL << NVDEV_ENGINE_PM ), &devobj); + ret = nvkm_parent_create(parent, nv_object(device), oclass, 0, + nvkm_control_oclass, + (1ULL << NVDEV_ENGINE_DMAOBJ) | + (1ULL << NVDEV_ENGINE_FIFO) | + (1ULL << NVDEV_ENGINE_DISP) | + (1ULL << NVDEV_ENGINE_PM), &devobj); *pobject = nv_object(devobj); if (ret) return ret; @@ -403,8 +399,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent, case NV_30: ret = nv30_identify(device); break; case NV_40: ret = nv40_identify(device); break; case NV_50: ret = nv50_identify(device); break; - case NV_C0: ret = nvc0_identify(device); break; - case NV_E0: ret = nve0_identify(device); break; + case NV_C0: ret = gf100_identify(device); break; + case NV_E0: ret = gk104_identify(device); break; case GM100: ret = gm100_identify(device); break; default: ret = -EINVAL; @@ -439,7 +435,7 @@ nouveau_devobj_ctor(struct nouveau_object *parent, } else if ( (args->v0.disable & NV_DEVICE_V0_DISABLE_IDENTIFY)) { device->cname = "NULL"; - device->oclass[NVDEV_SUBDEV_VBIOS] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS] = &nvkm_bios_oclass; } if (!(args->v0.disable & NV_DEVICE_V0_DISABLE_MMIO) && @@ -457,14 +453,12 @@ nouveau_devobj_ctor(struct nouveau_object *parent, continue; if (device->subdev[i]) { - nouveau_object_ref(device->subdev[i], - &devobj->subdev[i]); + nvkm_object_ref(device->subdev[i], &devobj->subdev[i]); continue; } - ret = nouveau_object_ctor(nv_object(device), NULL, - oclass, NULL, i, - &devobj->subdev[i]); + ret = nvkm_object_ctor(nv_object(device), NULL, oclass, + NULL, i, &devobj->subdev[i]); if (ret == -ENODEV) continue; if (ret) @@ -482,15 +476,15 @@ nouveau_devobj_ctor(struct nouveau_object *parent, * subdev in turn as they're created. */ while (i >= NVDEV_SUBDEV_DEVINIT_LAST && c <= i) { - struct nouveau_object *subdev = devobj->subdev[c++]; + struct nvkm_object *subdev = devobj->subdev[c++]; if (subdev && !nv_iclass(subdev, NV_ENGINE_CLASS)) { - ret = nouveau_object_inc(subdev); + ret = nvkm_object_inc(subdev); if (ret) return ret; atomic_dec(&nv_object(device)->usecount); } else if (subdev) { - nouveau_subdev_reset(subdev); + nvkm_subdev_reset(subdev); } } } @@ -498,23 +492,23 @@ nouveau_devobj_ctor(struct nouveau_object *parent, return 0; } -static struct nouveau_ofuncs -nouveau_devobj_ofuncs = { - .ctor = nouveau_devobj_ctor, - .dtor = nouveau_devobj_dtor, - .init = _nouveau_parent_init, - .fini = _nouveau_parent_fini, - .mthd = nouveau_devobj_mthd, +static struct nvkm_ofuncs +nvkm_devobj_ofuncs = { + .ctor = nvkm_devobj_ctor, + .dtor = nvkm_devobj_dtor, + .init = _nvkm_parent_init, + .fini = _nvkm_parent_fini, + .mthd = nvkm_devobj_mthd, }; /****************************************************************************** - * nouveau_device: engine functions + * nvkm_device: engine functions *****************************************************************************/ -struct nouveau_device * +struct nvkm_device * nv_device(void *obj) { - struct nouveau_object *device = nv_object(obj); + struct nvkm_object *device = nv_object(obj); if (device->engine == NULL) { while (device && device->parent) device = device->parent; @@ -530,15 +524,15 @@ nv_device(void *obj) return (void *)device; } -static struct nouveau_oclass -nouveau_device_sclass[] = { - { 0x0080, &nouveau_devobj_ofuncs }, +static struct nvkm_oclass +nvkm_device_sclass[] = { + { 0x0080, &nvkm_devobj_ofuncs }, {} }; static int -nouveau_device_event_ctor(struct nouveau_object *object, void *data, u32 size, - struct nvkm_notify *notify) +nvkm_device_event_ctor(struct nvkm_object *object, void *data, u32 size, + struct nvkm_notify *notify) { if (!WARN_ON(size != 0)) { notify->size = 0; @@ -550,21 +544,21 @@ nouveau_device_event_ctor(struct nouveau_object *object, void *data, u32 size, } static const struct nvkm_event_func -nouveau_device_event_func = { - .ctor = nouveau_device_event_ctor, +nvkm_device_event_func = { + .ctor = nvkm_device_event_ctor, }; static int -nouveau_device_fini(struct nouveau_object *object, bool suspend) +nvkm_device_fini(struct nvkm_object *object, bool suspend) { - struct nouveau_device *device = (void *)object; - struct nouveau_object *subdev; + struct nvkm_device *device = (void *)object; + struct nvkm_object *subdev; int ret, i; for (i = NVDEV_SUBDEV_NR - 1; i >= 0; i--) { if ((subdev = device->subdev[i])) { if (!nv_iclass(subdev, NV_ENGINE_CLASS)) { - ret = nouveau_object_dec(subdev, suspend); + ret = nvkm_object_dec(subdev, suspend); if (ret && suspend) goto fail; } @@ -576,7 +570,7 @@ fail: for (; ret && i < NVDEV_SUBDEV_NR; i++) { if ((subdev = device->subdev[i])) { if (!nv_iclass(subdev, NV_ENGINE_CLASS)) { - ret = nouveau_object_inc(subdev); + ret = nvkm_object_inc(subdev); if (ret) { /* XXX */ } @@ -588,10 +582,10 @@ fail: } static int -nouveau_device_init(struct nouveau_object *object) +nvkm_device_init(struct nvkm_object *object) { - struct nouveau_device *device = (void *)object; - struct nouveau_object *subdev; + struct nvkm_device *device = (void *)object; + struct nvkm_object *subdev; int ret, i = 0; ret = nvkm_acpi_init(device); @@ -601,11 +595,11 @@ nouveau_device_init(struct nouveau_object *object) for (i = 0; i < NVDEV_SUBDEV_NR; i++) { if ((subdev = device->subdev[i])) { if (!nv_iclass(subdev, NV_ENGINE_CLASS)) { - ret = nouveau_object_inc(subdev); + ret = nvkm_object_inc(subdev); if (ret) goto fail; } else { - nouveau_subdev_reset(subdev); + nvkm_subdev_reset(subdev); } } } @@ -615,7 +609,7 @@ fail: for (--i; ret && i >= 0; i--) { if ((subdev = device->subdev[i])) { if (!nv_iclass(subdev, NV_ENGINE_CLASS)) - nouveau_object_dec(subdev, false); + nvkm_object_dec(subdev, false); } } @@ -625,9 +619,9 @@ fail: } static void -nouveau_device_dtor(struct nouveau_object *object) +nvkm_device_dtor(struct nvkm_object *object) { - struct nouveau_device *device = (void *)object; + struct nvkm_device *device = (void *)object; nvkm_event_fini(&device->event); @@ -638,11 +632,11 @@ nouveau_device_dtor(struct nouveau_object *object) if (nv_subdev(device)->mmio) iounmap(nv_subdev(device)->mmio); - nouveau_engine_destroy(&device->engine); + nvkm_engine_destroy(&device->engine); } resource_size_t -nv_device_resource_start(struct nouveau_device *device, unsigned int bar) +nv_device_resource_start(struct nvkm_device *device, unsigned int bar) { if (nv_device_is_pci(device)) { return pci_resource_start(device->pdev, bar); @@ -657,7 +651,7 @@ nv_device_resource_start(struct nouveau_device *device, unsigned int bar) } resource_size_t -nv_device_resource_len(struct nouveau_device *device, unsigned int bar) +nv_device_resource_len(struct nvkm_device *device, unsigned int bar) { if (nv_device_is_pci(device)) { return pci_resource_len(device->pdev, bar); @@ -672,7 +666,7 @@ nv_device_resource_len(struct nouveau_device *device, unsigned int bar) } int -nv_device_get_irq(struct nouveau_device *device, bool stall) +nv_device_get_irq(struct nvkm_device *device, bool stall) { if (nv_device_is_pci(device)) { return device->pdev->irq; @@ -682,22 +676,22 @@ nv_device_get_irq(struct nouveau_device *device, bool stall) } } -static struct nouveau_oclass -nouveau_device_oclass = { +static struct nvkm_oclass +nvkm_device_oclass = { .handle = NV_ENGINE(DEVICE, 0x00), - .ofuncs = &(struct nouveau_ofuncs) { - .dtor = nouveau_device_dtor, - .init = nouveau_device_init, - .fini = nouveau_device_fini, + .ofuncs = &(struct nvkm_ofuncs) { + .dtor = nvkm_device_dtor, + .init = nvkm_device_init, + .fini = nvkm_device_fini, }, }; int -nouveau_device_create_(void *dev, enum nv_bus_type type, u64 name, - const char *sname, const char *cfg, const char *dbg, - int length, void **pobject) +nvkm_device_create_(void *dev, enum nv_bus_type type, u64 name, + const char *sname, const char *cfg, const char *dbg, + int length, void **pobject) { - struct nouveau_device *device; + struct nvkm_device *device; int ret = -EEXIST; mutex_lock(&nv_devices_mutex); @@ -706,17 +700,17 @@ nouveau_device_create_(void *dev, enum nv_bus_type type, u64 name, goto done; } - ret = nouveau_engine_create_(NULL, NULL, &nouveau_device_oclass, true, - "DEVICE", "device", length, pobject); + ret = nvkm_engine_create_(NULL, NULL, &nvkm_device_oclass, true, + "DEVICE", "device", length, pobject); device = *pobject; if (ret) goto done; switch (type) { - case NOUVEAU_BUS_PCI: + case NVKM_BUS_PCI: device->pdev = dev; break; - case NOUVEAU_BUS_PLATFORM: + case NVKM_BUS_PLATFORM: device->platformdev = dev; break; } @@ -725,12 +719,11 @@ nouveau_device_create_(void *dev, enum nv_bus_type type, u64 name, device->dbgopt = dbg; device->name = sname; - nv_subdev(device)->debug = nouveau_dbgopt(device->dbgopt, "DEVICE"); - nv_engine(device)->sclass = nouveau_device_sclass; + nv_subdev(device)->debug = nvkm_dbgopt(device->dbgopt, "DEVICE"); + nv_engine(device)->sclass = nvkm_device_sclass; list_add(&device->head, &nv_devices); - ret = nvkm_event_init(&nouveau_device_event_func, 1, 1, - &device->event); + ret = nvkm_event_init(&nvkm_device_event_func, 1, 1, &device->event); done: mutex_unlock(&nv_devices_mutex); return ret; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c index 7a7632e65c77..0b794b13cec3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c @@ -21,25 +21,22 @@ * * Authors: Ben Skeggs <bskeggs@redhat.com> */ +#include "priv.h" #include <core/client.h> -#include <core/object.h> -#include <nvif/unpack.h> -#include <nvif/class.h> -#include <nvif/ioctl.h> - #include <subdev/clk.h> -#include "priv.h" +#include <nvif/class.h> +#include <nvif/ioctl.h> +#include <nvif/unpack.h> static int -nouveau_control_mthd_pstate_info(struct nouveau_object *object, - void *data, u32 size) +nvkm_control_mthd_pstate_info(struct nvkm_object *object, void *data, u32 size) { union { struct nvif_control_pstate_info_v0 v0; } *args = data; - struct nouveau_clk *clk = nouveau_clk(object); + struct nvkm_clk *clk = nvkm_clk(object); int ret; nv_ioctl(object, "control pstate info size %d\n", size); @@ -67,16 +64,15 @@ nouveau_control_mthd_pstate_info(struct nouveau_object *object, } static int -nouveau_control_mthd_pstate_attr(struct nouveau_object *object, - void *data, u32 size) +nvkm_control_mthd_pstate_attr(struct nvkm_object *object, void *data, u32 size) { union { struct nvif_control_pstate_attr_v0 v0; } *args = data; - struct nouveau_clk *clk = nouveau_clk(object); - struct nouveau_domain *domain; - struct nouveau_pstate *pstate; - struct nouveau_cstate *cstate; + struct nvkm_clk *clk = nvkm_clk(object); + struct nvkm_domain *domain; + struct nvkm_pstate *pstate; + struct nvkm_cstate *cstate; int i = 0, j = -1; u32 lo, hi; int ret; @@ -141,13 +137,12 @@ nouveau_control_mthd_pstate_attr(struct nouveau_object *object, } static int -nouveau_control_mthd_pstate_user(struct nouveau_object *object, - void *data, u32 size) +nvkm_control_mthd_pstate_user(struct nvkm_object *object, void *data, u32 size) { union { struct nvif_control_pstate_user_v0 v0; } *args = data; - struct nouveau_clk *clk = nouveau_clk(object); + struct nvkm_clk *clk = nvkm_clk(object); int ret; nv_ioctl(object, "control pstate user size %d\n", size); @@ -161,45 +156,44 @@ nouveau_control_mthd_pstate_user(struct nouveau_object *object, return ret; if (args->v0.pwrsrc >= 0) { - ret |= nouveau_clk_ustate(clk, args->v0.ustate, args->v0.pwrsrc); + ret |= nvkm_clk_ustate(clk, args->v0.ustate, args->v0.pwrsrc); } else { - ret |= nouveau_clk_ustate(clk, args->v0.ustate, 0); - ret |= nouveau_clk_ustate(clk, args->v0.ustate, 1); + ret |= nvkm_clk_ustate(clk, args->v0.ustate, 0); + ret |= nvkm_clk_ustate(clk, args->v0.ustate, 1); } return ret; } static int -nouveau_control_mthd(struct nouveau_object *object, u32 mthd, - void *data, u32 size) +nvkm_control_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) { switch (mthd) { case NVIF_CONTROL_PSTATE_INFO: - return nouveau_control_mthd_pstate_info(object, data, size); + return nvkm_control_mthd_pstate_info(object, data, size); case NVIF_CONTROL_PSTATE_ATTR: - return nouveau_control_mthd_pstate_attr(object, data, size); + return nvkm_control_mthd_pstate_attr(object, data, size); case NVIF_CONTROL_PSTATE_USER: - return nouveau_control_mthd_pstate_user(object, data, size); + return nvkm_control_mthd_pstate_user(object, data, size); default: break; } return -EINVAL; } -static struct nouveau_ofuncs -nouveau_control_ofuncs = { - .ctor = _nouveau_object_ctor, - .dtor = nouveau_object_destroy, - .init = nouveau_object_init, - .fini = nouveau_object_fini, - .mthd = nouveau_control_mthd, +static struct nvkm_ofuncs +nvkm_control_ofuncs = { + .ctor = _nvkm_object_ctor, + .dtor = nvkm_object_destroy, + .init = nvkm_object_init, + .fini = nvkm_object_fini, + .mthd = nvkm_control_mthd, }; -struct nouveau_oclass -nouveau_control_oclass[] = { +struct nvkm_oclass +nvkm_control_oclass[] = { { .handle = NVIF_IOCTL_NEW_V0_CONTROL, - .ofuncs = &nouveau_control_ofuncs + .ofuncs = &nvkm_control_ofuncs }, {} }; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c index 887ec05d0c3c..82b38d7e9730 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -42,7 +43,6 @@ #include <subdev/pmu.h> #include <subdev/volt.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -56,12 +56,12 @@ #include <engine/pm.h> int -nvc0_identify(struct nouveau_device *device) +gf100_identify(struct nvkm_device *device) { switch (device->chipset) { case 0xc0: device->cname = "GF100"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -94,7 +94,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xc4: device->cname = "GF104"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -127,7 +127,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xc3: device->cname = "GF106"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -159,7 +159,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xce: device->cname = "GF114"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -192,7 +192,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xcf: device->cname = "GF116"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -224,7 +224,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xc1: device->cname = "GF108"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -256,7 +256,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xc8: device->cname = "GF110"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -289,7 +289,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xd9: device->cname = "GF119"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gf110_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -321,7 +321,7 @@ nvc0_identify(struct nouveau_device *device) break; case 0xd7: device->cname = "GF117"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gf110_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf117_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -355,4 +355,4 @@ nvc0_identify(struct nouveau_device *device) } return 0; - } +} diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c index faaf87b462a6..bf5893458a47 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -42,7 +43,6 @@ #include <subdev/pmu.h> #include <subdev/volt.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -56,12 +56,12 @@ #include <engine/pm.h> int -nve0_identify(struct nouveau_device *device) +gk104_identify(struct nvkm_device *device) { switch (device->chipset) { case 0xe4: device->cname = "GK104"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -95,7 +95,7 @@ nve0_identify(struct nouveau_device *device) break; case 0xe7: device->cname = "GK107"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -129,7 +129,7 @@ nve0_identify(struct nouveau_device *device) break; case 0xe6: device->cname = "GK106"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -185,7 +185,7 @@ nve0_identify(struct nouveau_device *device) break; case 0xf0: device->cname = "GK110"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -219,7 +219,7 @@ nve0_identify(struct nouveau_device *device) break; case 0xf1: device->cname = "GK110B"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -253,7 +253,7 @@ nve0_identify(struct nouveau_device *device) break; case 0x106: device->cname = "GK208B"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; @@ -286,7 +286,7 @@ nve0_identify(struct nouveau_device *device) break; case 0x108: device->cname = "GK208"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c index ffa2da42f397..539561ed3281 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -42,7 +43,6 @@ #include <subdev/pmu.h> #include <subdev/volt.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -56,12 +56,12 @@ #include <engine/pm.h> int -gm100_identify(struct nouveau_device *device) +gm100_identify(struct nvkm_device *device) { switch (device->chipset) { case 0x117: device->cname = "GM107"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gm107_fuse_oclass; @@ -101,7 +101,7 @@ gm100_identify(struct nouveau_device *device) break; case 0x124: device->cname = "GM204"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gk104_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gm204_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gm107_fuse_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c index 1d409af560da..5a2ae043b478 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -33,7 +34,6 @@ #include <subdev/instmem.h> #include <subdev/mmu.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -41,12 +41,12 @@ #include <engine/disp.h> int -nv04_identify(struct nouveau_device *device) +nv04_identify(struct nvkm_device *device) { switch (device->chipset) { case 0x04: device->cname = "NV04"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_DEVINIT] = nv04_devinit_oclass; @@ -64,7 +64,7 @@ nv04_identify(struct nouveau_device *device) break; case 0x05: device->cname = "NV05"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_DEVINIT] = nv05_devinit_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c index 66d8c338ae98..94a1ca45e94a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -34,7 +35,6 @@ #include <subdev/instmem.h> #include <subdev/mmu.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -42,12 +42,12 @@ #include <engine/disp.h> int -nv10_identify(struct nouveau_device *device) +nv10_identify(struct nvkm_device *device) { switch (device->chipset) { case 0x10: device->cname = "NV10"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -64,7 +64,7 @@ nv10_identify(struct nouveau_device *device) break; case 0x15: device->cname = "NV15"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -83,7 +83,7 @@ nv10_identify(struct nouveau_device *device) break; case 0x16: device->cname = "NV16"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -102,7 +102,7 @@ nv10_identify(struct nouveau_device *device) break; case 0x1a: device->cname = "nForce"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -121,7 +121,7 @@ nv10_identify(struct nouveau_device *device) break; case 0x11: device->cname = "NV11"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -140,7 +140,7 @@ nv10_identify(struct nouveau_device *device) break; case 0x17: device->cname = "NV17"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -159,7 +159,7 @@ nv10_identify(struct nouveau_device *device) break; case 0x1f: device->cname = "nForce2"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -178,7 +178,7 @@ nv10_identify(struct nouveau_device *device) break; case 0x18: device->cname = "NV18"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c index 59cefdd46897..d5ec8937df68 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -35,7 +36,6 @@ #include <subdev/instmem.h> #include <subdev/mmu.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -43,12 +43,12 @@ #include <engine/disp.h> int -nv20_identify(struct nouveau_device *device) +nv20_identify(struct nvkm_device *device) { switch (device->chipset) { case 0x20: device->cname = "NV20"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -67,7 +67,7 @@ nv20_identify(struct nouveau_device *device) break; case 0x25: device->cname = "NV25"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -86,7 +86,7 @@ nv20_identify(struct nouveau_device *device) break; case 0x28: device->cname = "NV28"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -105,7 +105,7 @@ nv20_identify(struct nouveau_device *device) break; case 0x2a: device->cname = "NV2A"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c index dfb610f837b0..dda09621e898 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -34,7 +35,6 @@ #include <subdev/instmem.h> #include <subdev/mmu.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -43,12 +43,12 @@ #include <engine/disp.h> int -nv30_identify(struct nouveau_device *device) +nv30_identify(struct nvkm_device *device) { switch (device->chipset) { case 0x30: device->cname = "NV30"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -67,7 +67,7 @@ nv30_identify(struct nouveau_device *device) break; case 0x35: device->cname = "NV35"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -86,7 +86,7 @@ nv30_identify(struct nouveau_device *device) break; case 0x31: device->cname = "NV31"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -106,7 +106,7 @@ nv30_identify(struct nouveau_device *device) break; case 0x36: device->cname = "NV36"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; @@ -126,7 +126,7 @@ nv30_identify(struct nouveau_device *device) break; case 0x34: device->cname = "NV34"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c index 7bdb7d6729b7..c6301361d14f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -37,7 +38,6 @@ #include <subdev/mmu.h> #include <subdev/volt.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -47,12 +47,12 @@ #include <engine/pm.h> int -nv40_identify(struct nouveau_device *device) +nv40_identify(struct nvkm_device *device) { switch (device->chipset) { case 0x40: device->cname = "NV40"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -75,7 +75,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x41: device->cname = "NV41"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -98,7 +98,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x42: device->cname = "NV42"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -121,7 +121,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x43: device->cname = "NV43"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -144,7 +144,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x45: device->cname = "NV45"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -167,7 +167,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x47: device->cname = "G70"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -190,7 +190,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x49: device->cname = "G71"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -213,7 +213,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x4b: device->cname = "G73"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -236,7 +236,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x44: device->cname = "NV44"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -259,7 +259,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x46: device->cname = "G72"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -282,7 +282,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x4a: device->cname = "NV44A"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -305,7 +305,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x4c: device->cname = "C61"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -328,7 +328,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x4e: device->cname = "C51"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv4e_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -351,7 +351,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x63: device->cname = "C73"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -374,7 +374,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x67: device->cname = "C67"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; @@ -397,7 +397,7 @@ nv40_identify(struct nouveau_device *device) break; case 0x68: device->cname = "C68"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv10_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c index 36944babbb53..249b84454612 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c @@ -21,6 +21,7 @@ * * Authors: Ben Skeggs */ +#include "priv.h" #include <subdev/bios.h> #include <subdev/bus.h> @@ -40,7 +41,6 @@ #include <subdev/pmu.h> #include <subdev/volt.h> -#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/sw.h> @@ -58,12 +58,12 @@ #include <engine/pm.h> int -nv50_identify(struct nouveau_device *device) +nv50_identify(struct nvkm_device *device) { switch (device->chipset) { case 0x50: device->cname = "G80"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv50_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -89,7 +89,7 @@ nv50_identify(struct nouveau_device *device) break; case 0x84: device->cname = "G84"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv50_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -118,7 +118,7 @@ nv50_identify(struct nouveau_device *device) break; case 0x86: device->cname = "G86"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv50_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -147,7 +147,7 @@ nv50_identify(struct nouveau_device *device) break; case 0x92: device->cname = "G92"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = nv50_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -176,7 +176,7 @@ nv50_identify(struct nouveau_device *device) break; case 0x94: device->cname = "G94"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -205,7 +205,7 @@ nv50_identify(struct nouveau_device *device) break; case 0x96: device->cname = "G96"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -234,7 +234,7 @@ nv50_identify(struct nouveau_device *device) break; case 0x98: device->cname = "G98"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -263,7 +263,7 @@ nv50_identify(struct nouveau_device *device) break; case 0xa0: device->cname = "G200"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -292,7 +292,7 @@ nv50_identify(struct nouveau_device *device) break; case 0xaa: device->cname = "MCP77/MCP78"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -321,7 +321,7 @@ nv50_identify(struct nouveau_device *device) break; case 0xac: device->cname = "MCP79/MCP7A"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -350,7 +350,7 @@ nv50_identify(struct nouveau_device *device) break; case 0xa3: device->cname = "GT215"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -381,7 +381,7 @@ nv50_identify(struct nouveau_device *device) break; case 0xa5: device->cname = "GT216"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -411,7 +411,7 @@ nv50_identify(struct nouveau_device *device) break; case 0xa8: device->cname = "GT218"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; @@ -441,7 +441,7 @@ nv50_identify(struct nouveau_device *device) break; case 0xaf: device->cname = "MCP89"; - device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; + device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = g94_gpio_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h b/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h index 035fd5b9cfc3..8d3590e7bd87 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h @@ -1,8 +1,16 @@ #ifndef __NVKM_DEVICE_PRIV_H__ #define __NVKM_DEVICE_PRIV_H__ +#include <core/device.h> -#include <engine/device.h> - -extern struct nouveau_oclass nouveau_control_oclass[]; +extern struct nvkm_oclass nvkm_control_oclass[]; +int nv04_identify(struct nvkm_device *); +int nv10_identify(struct nvkm_device *); +int nv20_identify(struct nvkm_device *); +int nv30_identify(struct nvkm_device *); +int nv40_identify(struct nvkm_device *); +int nv50_identify(struct nvkm_device *); +int gf100_identify(struct nvkm_device *); +int gk104_identify(struct nvkm_device *); +int gm100_identify(struct nvkm_device *); #endif diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h index 131619bda22f..d852bd6de571 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h @@ -1,7 +1,8 @@ #ifndef __NV40_GR_H__ #define __NV40_GR_H__ #include <engine/gr.h> -#include <engine/device.h> + +#include <core/device.h> struct nvkm_gpuobj; /* returns 1 if device is one of the nv4x using the 0x4497 object class, |