diff options
40 files changed, 51 insertions, 51 deletions
diff --git a/configure.ac b/configure.ac index 0c75e971e..fdf2d332b 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,6 @@ AC_OUTPUT( Makefile \ nvkm/subdev/bios/Makefile \ nvkm/subdev/bus/Makefile \ nvkm/subdev/clock/Makefile \ - nvkm/subdev/device/Makefile \ nvkm/subdev/devinit/Makefile \ nvkm/subdev/fb/Makefile \ nvkm/subdev/gpio/Makefile \ @@ -86,11 +85,12 @@ AC_OUTPUT( Makefile \ nvkm/subdev/timer/Makefile \ nvkm/subdev/vm/Makefile \ nvkm/engine/Makefile \ - nvkm/engine/dmaobj/Makefile \ nvkm/engine/bsp/Makefile \ nvkm/engine/copy/Makefile \ nvkm/engine/crypt/Makefile \ + nvkm/engine/device/Makefile \ nvkm/engine/disp/Makefile \ + nvkm/engine/dmaobj/Makefile \ nvkm/engine/fifo/Makefile \ nvkm/engine/graph/Makefile \ nvkm/engine/mpeg/Makefile \ diff --git a/drm/Kbuild b/drm/Kbuild index d77d05671..52930a20d 100644 --- a/drm/Kbuild +++ b/drm/Kbuild @@ -53,15 +53,6 @@ nouveau-y += core/subdev/clock/nva3.o nouveau-y += core/subdev/clock/nvc0.o nouveau-y += core/subdev/clock/pllnv04.o nouveau-y += core/subdev/clock/pllnva3.o -nouveau-y += core/subdev/device/base.o -nouveau-y += core/subdev/device/nv04.o -nouveau-y += core/subdev/device/nv10.o -nouveau-y += core/subdev/device/nv20.o -nouveau-y += core/subdev/device/nv30.o -nouveau-y += core/subdev/device/nv40.o -nouveau-y += core/subdev/device/nv50.o -nouveau-y += core/subdev/device/nvc0.o -nouveau-y += core/subdev/device/nve0.o nouveau-y += core/subdev/devinit/base.o nouveau-y += core/subdev/devinit/nv04.o nouveau-y += core/subdev/devinit/nv05.o @@ -151,6 +142,15 @@ nouveau-y += core/engine/copy/nvc0.o nouveau-y += core/engine/copy/nve0.o nouveau-y += core/engine/crypt/nv84.o nouveau-y += core/engine/crypt/nv98.o +nouveau-y += core/engine/device/base.o +nouveau-y += core/engine/device/nv04.o +nouveau-y += core/engine/device/nv10.o +nouveau-y += core/engine/device/nv20.o +nouveau-y += core/engine/device/nv30.o +nouveau-y += core/engine/device/nv40.o +nouveau-y += core/engine/device/nv50.o +nouveau-y += core/engine/device/nvc0.o +nouveau-y += core/engine/device/nve0.o nouveau-y += core/engine/disp/base.o nouveau-y += core/engine/disp/nv04.o nouveau-y += core/engine/disp/nv50.o diff --git a/drm/core/engine/device/base.c b/drm/core/engine/device/base.c new file mode 120000 index 000000000..d7dc8503b --- /dev/null +++ b/drm/core/engine/device/base.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/base.c
\ No newline at end of file diff --git a/drm/core/engine/device/nv04.c b/drm/core/engine/device/nv04.c new file mode 120000 index 000000000..78018a898 --- /dev/null +++ b/drm/core/engine/device/nv04.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nv04.c
\ No newline at end of file diff --git a/drm/core/engine/device/nv10.c b/drm/core/engine/device/nv10.c new file mode 120000 index 000000000..fd8b601f4 --- /dev/null +++ b/drm/core/engine/device/nv10.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nv10.c
\ No newline at end of file diff --git a/drm/core/engine/device/nv20.c b/drm/core/engine/device/nv20.c new file mode 120000 index 000000000..a1253844a --- /dev/null +++ b/drm/core/engine/device/nv20.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nv20.c
\ No newline at end of file diff --git a/drm/core/engine/device/nv30.c b/drm/core/engine/device/nv30.c new file mode 120000 index 000000000..a9c388ecd --- /dev/null +++ b/drm/core/engine/device/nv30.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nv30.c
\ No newline at end of file diff --git a/drm/core/engine/device/nv40.c b/drm/core/engine/device/nv40.c new file mode 120000 index 000000000..2283a61c6 --- /dev/null +++ b/drm/core/engine/device/nv40.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nv40.c
\ No newline at end of file diff --git a/drm/core/engine/device/nv50.c b/drm/core/engine/device/nv50.c new file mode 120000 index 000000000..91711a842 --- /dev/null +++ b/drm/core/engine/device/nv50.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nv50.c
\ No newline at end of file diff --git a/drm/core/engine/device/nvc0.c b/drm/core/engine/device/nvc0.c new file mode 120000 index 000000000..774a63d07 --- /dev/null +++ b/drm/core/engine/device/nvc0.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nvc0.c
\ No newline at end of file diff --git a/drm/core/engine/device/nve0.c b/drm/core/engine/device/nve0.c new file mode 120000 index 000000000..6e663dd2e --- /dev/null +++ b/drm/core/engine/device/nve0.c @@ -0,0 +1 @@ +../../../../nvkm/engine/device/nve0.c
\ No newline at end of file diff --git a/drm/core/include/engine/device.h b/drm/core/include/engine/device.h new file mode 120000 index 000000000..0a8b27414 --- /dev/null +++ b/drm/core/include/engine/device.h @@ -0,0 +1 @@ +../../../../nvkm/include/engine/device.h
\ No newline at end of file diff --git a/drm/core/include/subdev/device.h b/drm/core/include/subdev/device.h deleted file mode 120000 index 4d636f52b..000000000 --- a/drm/core/include/subdev/device.h +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/include/subdev/device.h
\ No newline at end of file diff --git a/drm/core/subdev/device/base.c b/drm/core/subdev/device/base.c deleted file mode 120000 index 413f29319..000000000 --- a/drm/core/subdev/device/base.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/base.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nv04.c b/drm/core/subdev/device/nv04.c deleted file mode 120000 index 6eee993c5..000000000 --- a/drm/core/subdev/device/nv04.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nv04.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nv10.c b/drm/core/subdev/device/nv10.c deleted file mode 120000 index c516d3dab..000000000 --- a/drm/core/subdev/device/nv10.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nv10.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nv20.c b/drm/core/subdev/device/nv20.c deleted file mode 120000 index d4c192548..000000000 --- a/drm/core/subdev/device/nv20.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nv20.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nv30.c b/drm/core/subdev/device/nv30.c deleted file mode 120000 index 70ab42e1b..000000000 --- a/drm/core/subdev/device/nv30.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nv30.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nv40.c b/drm/core/subdev/device/nv40.c deleted file mode 120000 index 5f6fd28b8..000000000 --- a/drm/core/subdev/device/nv40.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nv40.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nv50.c b/drm/core/subdev/device/nv50.c deleted file mode 120000 index cb94b2355..000000000 --- a/drm/core/subdev/device/nv50.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nv50.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nvc0.c b/drm/core/subdev/device/nvc0.c deleted file mode 120000 index 661670459..000000000 --- a/drm/core/subdev/device/nvc0.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nvc0.c
\ No newline at end of file diff --git a/drm/core/subdev/device/nve0.c b/drm/core/subdev/device/nve0.c deleted file mode 120000 index b834d26af..000000000 --- a/drm/core/subdev/device/nve0.c +++ /dev/null @@ -1 +0,0 @@ -../../../../nvkm/subdev/device/nve0.c
\ No newline at end of file diff --git a/drm/nouveau_drm.c b/drm/nouveau_drm.c index 994574ff8..c33b13fb1 100644 --- a/drm/nouveau_drm.c +++ b/drm/nouveau_drm.c @@ -31,11 +31,11 @@ #include <core/gpuobj.h> #include <core/class.h> -#include <subdev/device.h> -#include <subdev/vm.h> - +#include <engine/device.h> #include <engine/disp.h> +#include <subdev/vm.h> + #include "nouveau_drm.h" #include "nouveau_dma.h" #include "nouveau_ttm.h" diff --git a/lib/main.c b/lib/main.c index 9caf60448..afec06d45 100644 --- a/lib/main.c +++ b/lib/main.c @@ -31,7 +31,7 @@ #include <core/intr.h> #include <core/class.h> -#include <subdev/device.h> +#include <engine/device.h> #include <subdev/mc.h> struct os_device { diff --git a/nvkm/core/client.c b/nvkm/core/client.c index 295c22165..2be389d72 100644 --- a/nvkm/core/client.c +++ b/nvkm/core/client.c @@ -27,7 +27,7 @@ #include <core/handle.h> #include <core/option.h> -#include <subdev/device.h> +#include <engine/device.h> static void nouveau_client_dtor(struct nouveau_object *object) diff --git a/nvkm/core/engine.c b/nvkm/core/engine.c index 09b3bd502..c8bed4a26 100644 --- a/nvkm/core/engine.c +++ b/nvkm/core/engine.c @@ -33,7 +33,6 @@ nouveau_engine_create_(struct nouveau_object *parent, const char *iname, const char *fname, int length, void **pobject) { - struct nouveau_device *device = nv_device(parent); struct nouveau_engine *engine; int ret; @@ -43,7 +42,8 @@ nouveau_engine_create_(struct nouveau_object *parent, if (ret) return ret; - if (!nouveau_boolopt(device->cfgopt, iname, enable)) { + if ( parent && + !nouveau_boolopt(nv_device(parent)->cfgopt, iname, enable)) { if (!enable) nv_warn(engine, "disabled, %s=1 to enable\n", iname); return -ENODEV; diff --git a/nvkm/engine/Makefile.am b/nvkm/engine/Makefile.am index 743767606..761512dc5 100644 --- a/nvkm/engine/Makefile.am +++ b/nvkm/engine/Makefile.am @@ -1,13 +1,14 @@ -SUBDIRS = dmaobj bsp copy crypt disp fifo graph mpeg ppp software vp +SUBDIRS = dmaobj bsp copy crypt device disp fifo graph mpeg ppp software vp noinst_LTLIBRARIES = libengine.la libengine_la_SOURCES = -libengine_la_LIBADD = dmaobj/libdmaobj.la \ - bsp/libbsp.la \ +libengine_la_LIBADD = bsp/libbsp.la \ copy/libcopy.la \ crypt/libcrypt.la \ + device/libdevice.la \ disp/libdisp.la \ + dmaobj/libdmaobj.la \ fifo/libfifo.la \ graph/libgraph.la \ mpeg/libmpeg.la \ diff --git a/nvkm/subdev/device/Makefile.am b/nvkm/engine/device/Makefile.am index 5a687f22c..07a4a24ec 100644 --- a/nvkm/subdev/device/Makefile.am +++ b/nvkm/engine/device/Makefile.am @@ -10,4 +10,4 @@ libdevice_la_SOURCES = base.c \ nvc0.c \ nve0.c -include $(srcdir)/../Makefile.subdev +include $(srcdir)/../Makefile.engine diff --git a/nvkm/subdev/device/base.c b/nvkm/engine/device/base.c index 3937ced5c..35616424f 100644 --- a/nvkm/subdev/device/base.c +++ b/nvkm/engine/device/base.c @@ -29,7 +29,7 @@ #include <core/class.h> -#include <subdev/device.h> +#include <engine/device.h> static DEFINE_MUTEX(nv_devices_mutex); static LIST_HEAD(nv_devices); @@ -428,15 +428,15 @@ nouveau_device_dtor(struct nouveau_object *object) list_del(&device->head); mutex_unlock(&nv_devices_mutex); - if (device->base.mmio) - iounmap(device->base.mmio); + if (nv_subdev(device)->mmio) + iounmap(nv_subdev(device)->mmio); - nouveau_subdev_destroy(&device->base); + nouveau_engine_destroy(&device->base); } static struct nouveau_oclass nouveau_device_oclass = { - .handle = NV_SUBDEV(DEVICE, 0x00), + .handle = NV_ENGINE(DEVICE, 0x00), .ofuncs = &(struct nouveau_ofuncs) { .dtor = nouveau_device_dtor, }, @@ -456,7 +456,7 @@ nouveau_device_create_(struct pci_dev *pdev, u64 name, const char *sname, goto done; } - ret = nouveau_subdev_create_(NULL, NULL, &nouveau_device_oclass, 0, + ret = nouveau_engine_create_(NULL, NULL, &nouveau_device_oclass, true, "DEVICE", "device", length, pobject); device = *pobject; if (ret) diff --git a/nvkm/subdev/device/nv04.c b/nvkm/engine/device/nv04.c index 473c5c03d..a0284cf09 100644 --- a/nvkm/subdev/device/nv04.c +++ b/nvkm/engine/device/nv04.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/i2c.h> @@ -34,6 +33,7 @@ #include <subdev/instmem.h> #include <subdev/vm.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/subdev/device/nv10.c b/nvkm/engine/device/nv10.c index d0774f5be..1b7809a09 100644 --- a/nvkm/subdev/device/nv10.c +++ b/nvkm/engine/device/nv10.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/gpio.h> @@ -35,6 +34,7 @@ #include <subdev/instmem.h> #include <subdev/vm.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/subdev/device/nv20.c b/nvkm/engine/device/nv20.c index ab920e0dc..12a4005fa 100644 --- a/nvkm/subdev/device/nv20.c +++ b/nvkm/engine/device/nv20.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/gpio.h> @@ -36,6 +35,7 @@ #include <subdev/instmem.h> #include <subdev/vm.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/subdev/device/nv30.c b/nvkm/engine/device/nv30.c index 5f2110261..cef0f1ea4 100644 --- a/nvkm/subdev/device/nv30.c +++ b/nvkm/engine/device/nv30.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/gpio.h> @@ -35,6 +34,7 @@ #include <subdev/instmem.h> #include <subdev/vm.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/subdev/device/nv40.c b/nvkm/engine/device/nv40.c index f3d55efe9..1719cb0ee 100644 --- a/nvkm/subdev/device/nv40.c +++ b/nvkm/engine/device/nv40.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/vm.h> @@ -37,6 +36,7 @@ #include <subdev/instmem.h> #include <subdev/vm.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/subdev/device/nv50.c b/nvkm/engine/device/nv50.c index 04b2d75f4..5e8c3de75 100644 --- a/nvkm/subdev/device/nv50.c +++ b/nvkm/engine/device/nv50.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/gpio.h> @@ -38,6 +37,7 @@ #include <subdev/vm.h> #include <subdev/bar.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/subdev/device/nvc0.c b/nvkm/engine/device/nvc0.c index 00f869ee5..955af122c 100644 --- a/nvkm/subdev/device/nvc0.c +++ b/nvkm/engine/device/nvc0.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/gpio.h> @@ -40,6 +39,7 @@ #include <subdev/vm.h> #include <subdev/bar.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/subdev/device/nve0.c b/nvkm/engine/device/nve0.c index 5c1239161..e6a77944f 100644 --- a/nvkm/subdev/device/nve0.c +++ b/nvkm/engine/device/nve0.c @@ -22,7 +22,6 @@ * Authors: Ben Skeggs */ -#include <subdev/device.h> #include <subdev/bios.h> #include <subdev/bus.h> #include <subdev/gpio.h> @@ -40,6 +39,7 @@ #include <subdev/vm.h> #include <subdev/bar.h> +#include <engine/device.h> #include <engine/dmaobj.h> #include <engine/fifo.h> #include <engine/software.h> diff --git a/nvkm/include/core/device.h b/nvkm/include/core/device.h index d351a4e58..05840f3ee 100644 --- a/nvkm/include/core/device.h +++ b/nvkm/include/core/device.h @@ -6,7 +6,7 @@ #include <core/engine.h> enum nv_subdev_type { - NVDEV_SUBDEV_DEVICE, + NVDEV_ENGINE_DEVICE, NVDEV_SUBDEV_VBIOS, /* All subdevs from DEVINIT to DEVINIT_LAST will be created before @@ -57,7 +57,7 @@ enum nv_subdev_type { }; struct nouveau_device { - struct nouveau_subdev base; + struct nouveau_engine base; struct list_head head; struct pci_dev *pdev; @@ -99,7 +99,7 @@ nv_device(void *obj) #if CONFIG_NOUVEAU_DEBUG >= NV_DBG_PARANOIA if (unlikely(!nv_iclass(device, NV_SUBDEV_CLASS) || - (nv_hclass(device) & 0xff) != NVDEV_SUBDEV_DEVICE)) { + (nv_hclass(device) & 0xff) != NVDEV_ENGINE_DEVICE)) { nv_assert("BAD CAST -> NvDevice, 0x%08x 0x%08x", nv_hclass(object), nv_hclass(device)); } diff --git a/nvkm/include/subdev/device.h b/nvkm/include/engine/device.h index c9e4c4afa..c9e4c4afa 100644 --- a/nvkm/include/subdev/device.h +++ b/nvkm/include/engine/device.h diff --git a/nvkm/subdev/Makefile.am b/nvkm/subdev/Makefile.am index c9f9aab09..8c068f73b 100644 --- a/nvkm/subdev/Makefile.am +++ b/nvkm/subdev/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = bar bus bios clock device devinit fb gpio i2c ibus instmem ltcg \ +SUBDIRS = bar bus bios clock devinit fb gpio i2c ibus instmem ltcg \ mc mxm therm timer vm noinst_LTLIBRARIES = libsubdev.la @@ -8,7 +8,6 @@ libsubdev_la_LIBADD = bar/libbar.la \ bios/libbios.la \ bus/libbus.la \ clock/libclock.la \ - device/libdevice.la \ devinit/libdevinit.la \ fb/libfb.la \ gpio/libgpio.la \ |