summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore36
-rw-r--r--Makefile49
-rw-r--r--Makefile.am5
-rwxr-xr-xautogen.sh12
-rw-r--r--bin/.gitignore5
-rw-r--r--bin/Makefile12
-rw-r--r--bin/Makefile.am13
-rw-r--r--configure.ac107
-rw-r--r--drm/.gitignore7
-rw-r--r--drm/Kbuild400
-rw-r--r--drm/Makefile4
-rw-r--r--drm/nouveau.config0
-rw-r--r--drm/nouveau/Kbuild66
-rw-r--r--drm/nouveau/Kconfig (renamed from drm/Kconfig)0
-rw-r--r--drm/nouveau/dispnv04/Kbuild (renamed from drm/dispnv04/Makefile)0
-rw-r--r--drm/nouveau/dispnv04/arb.c (renamed from drm/dispnv04/arb.c)0
-rw-r--r--drm/nouveau/dispnv04/crtc.c (renamed from drm/dispnv04/crtc.c)0
-rw-r--r--drm/nouveau/dispnv04/cursor.c (renamed from drm/dispnv04/cursor.c)0
-rw-r--r--drm/nouveau/dispnv04/dac.c (renamed from drm/dispnv04/dac.c)0
-rw-r--r--drm/nouveau/dispnv04/dfp.c (renamed from drm/dispnv04/dfp.c)0
-rw-r--r--drm/nouveau/dispnv04/disp.c (renamed from drm/dispnv04/disp.c)0
-rw-r--r--drm/nouveau/dispnv04/disp.h (renamed from drm/dispnv04/disp.h)0
-rw-r--r--drm/nouveau/dispnv04/hw.c (renamed from drm/dispnv04/hw.c)0
-rw-r--r--drm/nouveau/dispnv04/hw.h (renamed from drm/dispnv04/hw.h)0
-rw-r--r--drm/nouveau/dispnv04/nvreg.h (renamed from drm/dispnv04/nvreg.h)0
-rw-r--r--drm/nouveau/dispnv04/overlay.c (renamed from drm/dispnv04/overlay.c)0
-rw-r--r--drm/nouveau/dispnv04/tvmodesnv17.c (renamed from drm/dispnv04/tvmodesnv17.c)0
-rw-r--r--drm/nouveau/dispnv04/tvnv04.c (renamed from drm/dispnv04/tvnv04.c)0
-rw-r--r--drm/nouveau/dispnv04/tvnv17.c (renamed from drm/dispnv04/tvnv17.c)0
-rw-r--r--drm/nouveau/dispnv04/tvnv17.h (renamed from drm/dispnv04/tvnv17.h)0
-rw-r--r--drm/nouveau/include/nvif/class.h (renamed from nvif/class.h)0
-rw-r--r--drm/nouveau/include/nvif/client.h (renamed from nvif/client.h)2
-rw-r--r--drm/nouveau/include/nvif/device.h (renamed from nvif/device.h)4
-rw-r--r--drm/nouveau/include/nvif/driver.h (renamed from nvif/driver.h)0
-rw-r--r--drm/nouveau/include/nvif/event.h (renamed from nvif/event.h)0
-rw-r--r--drm/nouveau/include/nvif/ioctl.h (renamed from nvif/ioctl.h)0
-rw-r--r--drm/nouveau/include/nvif/notify.h (renamed from nvif/notify.h)0
-rw-r--r--drm/nouveau/include/nvif/object.h (renamed from nvif/object.h)6
-rw-r--r--drm/nouveau/include/nvif/os.h (renamed from drm/core/os.h)0
-rw-r--r--drm/nouveau/include/nvif/unpack.h (renamed from nvif/unpack.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/client.h (renamed from nvkm/include/core/client.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/debug.h (renamed from nvkm/include/core/debug.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/device.h (renamed from nvkm/include/core/device.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/engctx.h (renamed from nvkm/include/core/engctx.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/engine.h (renamed from nvkm/include/core/engine.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/enum.h (renamed from nvkm/include/core/enum.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/event.h (renamed from nvkm/include/core/event.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/gpuobj.h (renamed from nvkm/include/core/gpuobj.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/handle.h (renamed from nvkm/include/core/handle.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/ioctl.h (renamed from nvkm/include/core/ioctl.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/mm.h (renamed from nvkm/include/core/mm.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/namedb.h (renamed from nvkm/include/core/namedb.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/notify.h (renamed from nvkm/include/core/notify.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/object.h (renamed from nvkm/include/core/object.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/option.h (renamed from nvkm/include/core/option.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/os.h4
-rw-r--r--drm/nouveau/include/nvkm/core/parent.h (renamed from nvkm/include/core/parent.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/printk.h (renamed from nvkm/include/core/printk.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/ramht.h (renamed from nvkm/include/core/ramht.h)0
-rw-r--r--drm/nouveau/include/nvkm/core/subdev.h (renamed from nvkm/include/core/subdev.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/bsp.h (renamed from nvkm/include/engine/bsp.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/copy.h (renamed from nvkm/include/engine/copy.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/crypt.h (renamed from nvkm/include/engine/crypt.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/device.h (renamed from nvkm/include/engine/device.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/disp.h (renamed from nvkm/include/engine/disp.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/dmaobj.h (renamed from nvkm/include/engine/dmaobj.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/falcon.h (renamed from nvkm/include/engine/falcon.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/fifo.h (renamed from nvkm/include/engine/fifo.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/graph.h (renamed from nvkm/include/engine/graph.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/mpeg.h (renamed from nvkm/include/engine/mpeg.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/perfmon.h (renamed from nvkm/include/engine/perfmon.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/ppp.h (renamed from nvkm/include/engine/ppp.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/software.h (renamed from nvkm/include/engine/software.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/vp.h (renamed from nvkm/include/engine/vp.h)0
-rw-r--r--drm/nouveau/include/nvkm/engine/xtensa.h (renamed from nvkm/include/engine/xtensa.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bar.h (renamed from nvkm/include/subdev/bar.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios.h (renamed from nvkm/include/subdev/bios.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/M0203.h (renamed from nvkm/include/subdev/bios/M0203.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/M0205.h (renamed from nvkm/include/subdev/bios/M0205.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/M0209.h (renamed from nvkm/include/subdev/bios/M0209.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/P0260.h (renamed from nvkm/include/subdev/bios/P0260.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/bit.h (renamed from nvkm/include/subdev/bios/bit.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/bmp.h (renamed from nvkm/include/subdev/bios/bmp.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/boost.h (renamed from nvkm/include/subdev/bios/boost.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/conn.h (renamed from nvkm/include/subdev/bios/conn.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/cstep.h (renamed from nvkm/include/subdev/bios/cstep.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/dcb.h (renamed from nvkm/include/subdev/bios/dcb.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/disp.h (renamed from nvkm/include/subdev/bios/disp.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/dp.h (renamed from nvkm/include/subdev/bios/dp.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/extdev.h (renamed from nvkm/include/subdev/bios/extdev.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/fan.h (renamed from nvkm/include/subdev/bios/fan.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/gpio.h (renamed from nvkm/include/subdev/bios/gpio.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/i2c.h (renamed from nvkm/include/subdev/bios/i2c.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/image.h (renamed from nvkm/include/subdev/bios/image.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/init.h (renamed from nvkm/include/subdev/bios/init.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/mxm.h (renamed from nvkm/include/subdev/bios/mxm.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/npde.h (renamed from nvkm/include/subdev/bios/npde.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/pcir.h (renamed from nvkm/include/subdev/bios/pcir.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/perf.h (renamed from nvkm/include/subdev/bios/perf.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/pll.h (renamed from nvkm/include/subdev/bios/pll.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/pmu.h (renamed from nvkm/include/subdev/bios/pmu.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/ramcfg.h (renamed from nvkm/include/subdev/bios/ramcfg.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/rammap.h (renamed from nvkm/include/subdev/bios/rammap.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/therm.h (renamed from nvkm/include/subdev/bios/therm.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/timing.h (renamed from nvkm/include/subdev/bios/timing.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/vmap.h (renamed from nvkm/include/subdev/bios/vmap.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/volt.h (renamed from nvkm/include/subdev/bios/volt.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bios/xpio.h (renamed from nvkm/include/subdev/bios/xpio.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/bus.h (renamed from nvkm/include/subdev/bus.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/clock.h (renamed from nvkm/include/subdev/clock.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/devinit.h (renamed from nvkm/include/subdev/devinit.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/fb.h (renamed from nvkm/include/subdev/fb.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/fuse.h (renamed from nvkm/include/subdev/fuse.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/gpio.h (renamed from nvkm/include/subdev/gpio.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/i2c.h (renamed from nvkm/include/subdev/i2c.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/ibus.h (renamed from nvkm/include/subdev/ibus.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/instmem.h (renamed from nvkm/include/subdev/instmem.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/ltc.h (renamed from nvkm/include/subdev/ltc.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/mc.h (renamed from nvkm/include/subdev/mc.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/mxm.h (renamed from nvkm/include/subdev/mxm.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/pwr.h (renamed from nvkm/include/subdev/pwr.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/therm.h (renamed from nvkm/include/subdev/therm.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/timer.h (renamed from nvkm/include/subdev/timer.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/vga.h (renamed from nvkm/include/subdev/vga.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/vm.h (renamed from nvkm/include/subdev/vm.h)0
-rw-r--r--drm/nouveau/include/nvkm/subdev/volt.h (renamed from nvkm/include/subdev/volt.h)0
-rw-r--r--drm/nouveau/include/uapi/drm/nouveau_drm.h (renamed from drm/uapi/drm/nouveau_drm.h)0
-rw-r--r--drm/nouveau/nouveau_abi16.c (renamed from drm/nouveau_abi16.c)0
-rw-r--r--drm/nouveau/nouveau_abi16.h (renamed from drm/nouveau_abi16.h)0
-rw-r--r--drm/nouveau/nouveau_acpi.c (renamed from drm/nouveau_acpi.c)0
-rw-r--r--drm/nouveau/nouveau_acpi.h (renamed from drm/nouveau_acpi.h)0
-rw-r--r--drm/nouveau/nouveau_agp.c (renamed from drm/nouveau_agp.c)0
-rw-r--r--drm/nouveau/nouveau_agp.h (renamed from drm/nouveau_agp.h)0
-rw-r--r--drm/nouveau/nouveau_backlight.c (renamed from drm/nouveau_backlight.c)0
-rw-r--r--drm/nouveau/nouveau_bios.c (renamed from drm/nouveau_bios.c)0
-rw-r--r--drm/nouveau/nouveau_bios.h (renamed from drm/nouveau_bios.h)0
-rw-r--r--drm/nouveau/nouveau_bo.c (renamed from drm/nouveau_bo.c)0
-rw-r--r--drm/nouveau/nouveau_bo.h (renamed from drm/nouveau_bo.h)0
-rw-r--r--drm/nouveau/nouveau_chan.c (renamed from drm/nouveau_chan.c)0
-rw-r--r--drm/nouveau/nouveau_chan.h (renamed from drm/nouveau_chan.h)0
-rw-r--r--drm/nouveau/nouveau_connector.c (renamed from drm/nouveau_connector.c)0
-rw-r--r--drm/nouveau/nouveau_connector.h (renamed from drm/nouveau_connector.h)0
-rw-r--r--drm/nouveau/nouveau_crtc.h (renamed from drm/nouveau_crtc.h)0
-rw-r--r--drm/nouveau/nouveau_debugfs.c (renamed from drm/nouveau_debugfs.c)0
-rw-r--r--drm/nouveau/nouveau_debugfs.h (renamed from drm/nouveau_debugfs.h)0
-rw-r--r--drm/nouveau/nouveau_display.c (renamed from drm/nouveau_display.c)0
-rw-r--r--drm/nouveau/nouveau_display.h (renamed from drm/nouveau_display.h)0
-rw-r--r--drm/nouveau/nouveau_dma.c (renamed from drm/nouveau_dma.c)0
-rw-r--r--drm/nouveau/nouveau_dma.h (renamed from drm/nouveau_dma.h)0
-rw-r--r--drm/nouveau/nouveau_dp.c (renamed from drm/nouveau_dp.c)0
-rw-r--r--drm/nouveau/nouveau_drm.c (renamed from drm/nouveau_drm.c)0
-rw-r--r--drm/nouveau/nouveau_drm.h (renamed from drm/nouveau_drm.h)0
-rw-r--r--drm/nouveau/nouveau_encoder.h (renamed from drm/nouveau_encoder.h)0
-rw-r--r--drm/nouveau/nouveau_fbcon.c (renamed from drm/nouveau_fbcon.c)0
-rw-r--r--drm/nouveau/nouveau_fbcon.h (renamed from drm/nouveau_fbcon.h)0
-rw-r--r--drm/nouveau/nouveau_fence.c (renamed from drm/nouveau_fence.c)0
-rw-r--r--drm/nouveau/nouveau_fence.h (renamed from drm/nouveau_fence.h)0
-rw-r--r--drm/nouveau/nouveau_gem.c (renamed from drm/nouveau_gem.c)0
-rw-r--r--drm/nouveau/nouveau_gem.h (renamed from drm/nouveau_gem.h)0
-rw-r--r--drm/nouveau/nouveau_hwmon.c (renamed from drm/nouveau_hwmon.c)0
-rw-r--r--drm/nouveau/nouveau_hwmon.h (renamed from drm/nouveau_hwmon.h)0
-rw-r--r--drm/nouveau/nouveau_ioc32.c (renamed from drm/nouveau_ioc32.c)0
-rw-r--r--drm/nouveau/nouveau_ioctl.h (renamed from drm/nouveau_ioctl.h)0
-rw-r--r--drm/nouveau/nouveau_nvif.c (renamed from drm/nouveau_nvif.c)0
-rw-r--r--drm/nouveau/nouveau_platform.c (renamed from drm/nouveau_platform.c)0
-rw-r--r--drm/nouveau/nouveau_platform.h (renamed from drm/nouveau_platform.h)0
-rw-r--r--drm/nouveau/nouveau_prime.c (renamed from drm/nouveau_prime.c)0
-rw-r--r--drm/nouveau/nouveau_reg.h (renamed from drm/nouveau_reg.h)0
-rw-r--r--drm/nouveau/nouveau_sgdma.c (renamed from drm/nouveau_sgdma.c)0
-rw-r--r--drm/nouveau/nouveau_sysfs.c (renamed from drm/nouveau_sysfs.c)0
-rw-r--r--drm/nouveau/nouveau_sysfs.h (renamed from drm/nouveau_sysfs.h)0
-rw-r--r--drm/nouveau/nouveau_ttm.c (renamed from drm/nouveau_ttm.c)2
-rw-r--r--drm/nouveau/nouveau_ttm.h (renamed from drm/nouveau_ttm.h)0
-rw-r--r--drm/nouveau/nouveau_usif.c (renamed from drm/nouveau_usif.c)0
-rw-r--r--drm/nouveau/nouveau_usif.h (renamed from drm/nouveau_usif.h)0
-rw-r--r--drm/nouveau/nouveau_vga.c (renamed from drm/nouveau_vga.c)0
-rw-r--r--drm/nouveau/nouveau_vga.h (renamed from drm/nouveau_vga.h)0
-rw-r--r--drm/nouveau/nv04_fbcon.c (renamed from drm/nv04_fbcon.c)0
-rw-r--r--drm/nouveau/nv04_fence.c (renamed from drm/nv04_fence.c)0
-rw-r--r--drm/nouveau/nv10_fence.c (renamed from drm/nv10_fence.c)0
-rw-r--r--drm/nouveau/nv10_fence.h (renamed from drm/nv10_fence.h)0
-rw-r--r--drm/nouveau/nv17_fence.c (renamed from drm/nv17_fence.c)0
-rw-r--r--drm/nouveau/nv50_display.c (renamed from drm/nv50_display.c)0
-rw-r--r--drm/nouveau/nv50_display.h (renamed from drm/nv50_display.h)0
-rw-r--r--drm/nouveau/nv50_fbcon.c (renamed from drm/nv50_fbcon.c)0
-rw-r--r--drm/nouveau/nv50_fence.c (renamed from drm/nv50_fence.c)0
-rw-r--r--drm/nouveau/nv84_fence.c (renamed from drm/nv84_fence.c)0
-rw-r--r--drm/nouveau/nvc0_fbcon.c (renamed from drm/nvc0_fbcon.c)0
-rw-r--r--drm/nouveau/nvc0_fence.c (renamed from drm/nvc0_fence.c)0
-rw-r--r--drm/nouveau/nvif/Kbuild4
-rw-r--r--drm/nouveau/nvif/client.c (renamed from nvif/client.c)6
-rw-r--r--drm/nouveau/nvif/device.c (renamed from nvif/device.c)2
-rw-r--r--drm/nouveau/nvif/notify.c (renamed from nvif/notify.c)0
-rw-r--r--drm/nouveau/nvif/object.c (renamed from nvif/object.c)8
-rw-r--r--drm/nouveau/nvkm/Kbuild3
-rw-r--r--drm/nouveau/nvkm/core/Kbuild17
-rw-r--r--drm/nouveau/nvkm/core/client.c (renamed from nvkm/core/client.c)0
-rw-r--r--drm/nouveau/nvkm/core/engctx.c (renamed from nvkm/core/engctx.c)0
-rw-r--r--drm/nouveau/nvkm/core/engine.c (renamed from nvkm/core/engine.c)0
-rw-r--r--drm/nouveau/nvkm/core/enum.c (renamed from nvkm/core/enum.c)0
-rw-r--r--drm/nouveau/nvkm/core/event.c (renamed from nvkm/core/event.c)0
-rw-r--r--drm/nouveau/nvkm/core/gpuobj.c (renamed from nvkm/core/gpuobj.c)0
-rw-r--r--drm/nouveau/nvkm/core/handle.c (renamed from nvkm/core/handle.c)0
-rw-r--r--drm/nouveau/nvkm/core/ioctl.c (renamed from nvkm/core/ioctl.c)0
-rw-r--r--drm/nouveau/nvkm/core/mm.c (renamed from nvkm/core/mm.c)0
-rw-r--r--drm/nouveau/nvkm/core/namedb.c (renamed from nvkm/core/namedb.c)0
-rw-r--r--drm/nouveau/nvkm/core/notify.c (renamed from nvkm/core/notify.c)0
-rw-r--r--drm/nouveau/nvkm/core/object.c (renamed from nvkm/core/object.c)0
-rw-r--r--drm/nouveau/nvkm/core/option.c (renamed from nvkm/core/option.c)0
-rw-r--r--drm/nouveau/nvkm/core/parent.c (renamed from nvkm/core/parent.c)0
-rw-r--r--drm/nouveau/nvkm/core/printk.c (renamed from nvkm/core/printk.c)0
-rw-r--r--drm/nouveau/nvkm/core/ramht.c (renamed from nvkm/core/ramht.c)0
-rw-r--r--drm/nouveau/nvkm/core/subdev.c (renamed from nvkm/core/subdev.c)0
-rw-r--r--drm/nouveau/nvkm/engine/Kbuild16
-rw-r--r--drm/nouveau/nvkm/engine/bsp/Kbuild4
-rw-r--r--drm/nouveau/nvkm/engine/bsp/nv84.c (renamed from nvkm/engine/bsp/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/bsp/nv98.c (renamed from nvkm/engine/bsp/nv98.c)0
-rw-r--r--drm/nouveau/nvkm/engine/bsp/nvc0.c (renamed from nvkm/engine/bsp/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/bsp/nve0.c (renamed from nvkm/engine/bsp/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/copy/Kbuild3
-rw-r--r--drm/nouveau/nvkm/engine/copy/fuc/com.fuc (renamed from nvkm/engine/copy/fuc/nva3.fuc)41
-rw-r--r--drm/nouveau/nvkm/engine/copy/fuc/nva3.fuc32
-rw-r--r--drm/nouveau/nvkm/engine/copy/fuc/nva3.fuc3.h (renamed from nvkm/engine/copy/fuc/nva3.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/copy/fuc/nvc0.fuc32
-rw-r--r--drm/nouveau/nvkm/engine/copy/fuc/nvc0.fuc3.h (renamed from nvkm/engine/copy/fuc/nvc0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/copy/nva3.c (renamed from nvkm/engine/copy/nva3.c)2
-rw-r--r--drm/nouveau/nvkm/engine/copy/nvc0.c (renamed from nvkm/engine/copy/nvc0.c)2
-rw-r--r--drm/nouveau/nvkm/engine/copy/nve0.c (renamed from nvkm/engine/copy/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/crypt/Kbuild2
-rw-r--r--drm/nouveau/nvkm/engine/crypt/fuc/nv98.fuc0s (renamed from nvkm/engine/crypt/fuc/nv98.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/crypt/fuc/nv98.fuc0s.h (renamed from nvkm/engine/crypt/fuc/nv98.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/crypt/nv84.c (renamed from nvkm/engine/crypt/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/crypt/nv98.c (renamed from nvkm/engine/crypt/nv98.c)2
-rw-r--r--drm/nouveau/nvkm/engine/device/Kbuild12
-rw-r--r--drm/nouveau/nvkm/engine/device/acpi.c (renamed from nvkm/engine/device/acpi.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/acpi.h (renamed from nvkm/engine/device/acpi.h)0
-rw-r--r--drm/nouveau/nvkm/engine/device/base.c (renamed from nvkm/engine/device/base.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/ctrl.c (renamed from nvkm/engine/device/ctrl.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/gm100.c (renamed from nvkm/engine/device/gm100.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nv04.c (renamed from nvkm/engine/device/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nv10.c (renamed from nvkm/engine/device/nv10.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nv20.c (renamed from nvkm/engine/device/nv20.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nv30.c (renamed from nvkm/engine/device/nv30.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nv40.c (renamed from nvkm/engine/device/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nv50.c (renamed from nvkm/engine/device/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nvc0.c (renamed from nvkm/engine/device/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/nve0.c (renamed from nvkm/engine/device/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/device/priv.h (renamed from nvkm/engine/device/priv.h)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/Kbuild29
-rw-r--r--drm/nouveau/nvkm/engine/disp/base.c (renamed from nvkm/engine/disp/base.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/conn.c (renamed from nvkm/engine/disp/conn.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/conn.h (renamed from nvkm/engine/disp/conn.h)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/dacnv50.c (renamed from nvkm/engine/disp/dacnv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/dport.c (renamed from nvkm/engine/disp/dport.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/dport.h (renamed from nvkm/engine/disp/dport.h)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/gm107.c (renamed from nvkm/engine/disp/gm107.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/gm204.c (renamed from nvkm/engine/disp/gm204.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/hdanva3.c (renamed from nvkm/engine/disp/hdanva3.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/hdanvd0.c (renamed from nvkm/engine/disp/hdanvd0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/hdminv84.c (renamed from nvkm/engine/disp/hdminv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/hdminva3.c (renamed from nvkm/engine/disp/hdminva3.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/hdminvd0.c (renamed from nvkm/engine/disp/hdminvd0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/hdminve0.c (renamed from nvkm/engine/disp/hdminve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nv04.c (renamed from nvkm/engine/disp/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nv50.c (renamed from nvkm/engine/disp/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nv50.h (renamed from nvkm/engine/disp/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nv84.c (renamed from nvkm/engine/disp/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nv94.c (renamed from nvkm/engine/disp/nv94.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nva0.c (renamed from nvkm/engine/disp/nva0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nva3.c (renamed from nvkm/engine/disp/nva3.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nvd0.c (renamed from nvkm/engine/disp/nvd0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nve0.c (renamed from nvkm/engine/disp/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/nvf0.c (renamed from nvkm/engine/disp/nvf0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/outp.c (renamed from nvkm/engine/disp/outp.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/outp.h (renamed from nvkm/engine/disp/outp.h)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/outpdp.c (renamed from nvkm/engine/disp/outpdp.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/outpdp.h (renamed from nvkm/engine/disp/outpdp.h)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/piornv50.c (renamed from nvkm/engine/disp/piornv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/priv.h (renamed from nvkm/engine/disp/priv.h)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/sorgm204.c (renamed from nvkm/engine/disp/sorgm204.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/sornv50.c (renamed from nvkm/engine/disp/sornv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/sornv94.c (renamed from nvkm/engine/disp/sornv94.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/sornvd0.c (renamed from nvkm/engine/disp/sornvd0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/disp/vga.c (renamed from nvkm/engine/disp/vga.c)0
-rw-r--r--drm/nouveau/nvkm/engine/dmaobj/Kbuild5
-rw-r--r--drm/nouveau/nvkm/engine/dmaobj/base.c (renamed from nvkm/engine/dmaobj/base.c)0
-rw-r--r--drm/nouveau/nvkm/engine/dmaobj/nv04.c (renamed from nvkm/engine/dmaobj/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/engine/dmaobj/nv50.c (renamed from nvkm/engine/dmaobj/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/dmaobj/nvc0.c (renamed from nvkm/engine/dmaobj/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/dmaobj/nvd0.c (renamed from nvkm/engine/dmaobj/nvd0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/dmaobj/priv.h (renamed from nvkm/engine/dmaobj/priv.h)0
-rw-r--r--drm/nouveau/nvkm/engine/falcon.c (renamed from nvkm/engine/falcon.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/Kbuild11
-rw-r--r--drm/nouveau/nvkm/engine/fifo/base.c (renamed from nvkm/engine/fifo/base.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/gk20a.c (renamed from nvkm/engine/fifo/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv04.c (renamed from nvkm/engine/fifo/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv04.h (renamed from nvkm/engine/fifo/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv10.c (renamed from nvkm/engine/fifo/nv10.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv108.c (renamed from nvkm/engine/fifo/nv108.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv17.c (renamed from nvkm/engine/fifo/nv17.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv40.c (renamed from nvkm/engine/fifo/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv50.c (renamed from nvkm/engine/fifo/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv50.h (renamed from nvkm/engine/fifo/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nv84.c (renamed from nvkm/engine/fifo/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nvc0.c (renamed from nvkm/engine/fifo/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nve0.c (renamed from nvkm/engine/fifo/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/fifo/nve0.h (renamed from nvkm/engine/fifo/nve0.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/Kbuild36
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctx.h (renamed from nvkm/engine/graph/ctx.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxgk110b.c (renamed from nvkm/engine/graph/ctxgk110b.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxgk20a.c (renamed from nvkm/engine/graph/ctxgk20a.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxgm107.c (renamed from nvkm/engine/graph/ctxgm107.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnv108.c (renamed from nvkm/engine/graph/ctxnv108.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnv40.c (renamed from nvkm/engine/graph/ctxnv40.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnv50.c (renamed from nvkm/engine/graph/ctxnv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvc0.c (renamed from nvkm/engine/graph/ctxnvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvc0.h (renamed from nvkm/engine/graph/ctxnvc0.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvc1.c (renamed from nvkm/engine/graph/ctxnvc1.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvc4.c (renamed from nvkm/engine/graph/ctxnvc4.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvc8.c (renamed from nvkm/engine/graph/ctxnvc8.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvd7.c (renamed from nvkm/engine/graph/ctxnvd7.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvd9.c (renamed from nvkm/engine/graph/ctxnvd9.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnve4.c (renamed from nvkm/engine/graph/ctxnve4.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/ctxnvf0.c (renamed from nvkm/engine/graph/ctxnvf0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/com.fuc (renamed from nvkm/engine/graph/fuc/com.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpc.fuc (renamed from nvkm/engine/graph/fuc/gpc.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5 (renamed from nvkm/engine/graph/fuc/gpcgm107.fuc5)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5.h (renamed from nvkm/engine/graph/fuc/gpcgm107.fuc5.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5 (renamed from nvkm/engine/graph/fuc/gpcnv108.fuc5)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5.h (renamed from nvkm/engine/graph/fuc/gpcnv108.fuc5.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3 (renamed from nvkm/engine/graph/fuc/gpcnvc0.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3.h (renamed from nvkm/engine/graph/fuc/gpcnvc0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3 (renamed from nvkm/engine/graph/fuc/gpcnvd7.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3.h (renamed from nvkm/engine/graph/fuc/gpcnvd7.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3 (renamed from nvkm/engine/graph/fuc/gpcnve0.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3.h (renamed from nvkm/engine/graph/fuc/gpcnve0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3 (renamed from nvkm/engine/graph/fuc/gpcnvf0.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3.h (renamed from nvkm/engine/graph/fuc/gpcnvf0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hub.fuc (renamed from nvkm/engine/graph/fuc/hub.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5 (renamed from nvkm/engine/graph/fuc/hubgm107.fuc5)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5.h (renamed from nvkm/engine/graph/fuc/hubgm107.fuc5.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5 (renamed from nvkm/engine/graph/fuc/hubnv108.fuc5)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5.h (renamed from nvkm/engine/graph/fuc/hubnv108.fuc5.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3 (renamed from nvkm/engine/graph/fuc/hubnvc0.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3.h (renamed from nvkm/engine/graph/fuc/hubnvc0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3 (renamed from nvkm/engine/graph/fuc/hubnvd7.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3.h (renamed from nvkm/engine/graph/fuc/hubnvd7.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3 (renamed from nvkm/engine/graph/fuc/hubnve0.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3.h (renamed from nvkm/engine/graph/fuc/hubnve0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3 (renamed from nvkm/engine/graph/fuc/hubnvf0.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3.h (renamed from nvkm/engine/graph/fuc/hubnvf0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/macros.fuc (renamed from nvkm/engine/graph/fuc/macros.fuc)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/fuc/os.h (renamed from nvkm/engine/graph/fuc/os.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/gk110b.c (renamed from nvkm/engine/graph/gk110b.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/gk20a.c (renamed from nvkm/engine/graph/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/gm107.c (renamed from nvkm/engine/graph/gm107.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv04.c (renamed from nvkm/engine/graph/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv10.c (renamed from nvkm/engine/graph/nv10.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv108.c (renamed from nvkm/engine/graph/nv108.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv20.c (renamed from nvkm/engine/graph/nv20.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv20.h (renamed from nvkm/engine/graph/nv20.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv25.c (renamed from nvkm/engine/graph/nv25.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv2a.c (renamed from nvkm/engine/graph/nv2a.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv30.c (renamed from nvkm/engine/graph/nv30.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv34.c (renamed from nvkm/engine/graph/nv34.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv35.c (renamed from nvkm/engine/graph/nv35.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv40.c (renamed from nvkm/engine/graph/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv40.h (renamed from nvkm/engine/graph/nv40.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv50.c (renamed from nvkm/engine/graph/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nv50.h (renamed from nvkm/engine/graph/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvc0.c (renamed from nvkm/engine/graph/nvc0.c)4
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvc0.h (renamed from nvkm/engine/graph/nvc0.h)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvc1.c (renamed from nvkm/engine/graph/nvc1.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvc4.c (renamed from nvkm/engine/graph/nvc4.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvc8.c (renamed from nvkm/engine/graph/nvc8.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvd7.c (renamed from nvkm/engine/graph/nvd7.c)4
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvd9.c (renamed from nvkm/engine/graph/nvd9.c)0
-rw-r--r--drm/nouveau/nvkm/engine/graph/nve4.c (renamed from nvkm/engine/graph/nve4.c)4
-rw-r--r--drm/nouveau/nvkm/engine/graph/nvf0.c (renamed from nvkm/engine/graph/nvf0.c)4
-rw-r--r--drm/nouveau/nvkm/engine/graph/regs.h (renamed from nvkm/engine/graph/regs.h)0
-rw-r--r--drm/nouveau/nvkm/engine/mpeg/Kbuild5
-rw-r--r--drm/nouveau/nvkm/engine/mpeg/nv31.c (renamed from nvkm/engine/mpeg/nv31.c)0
-rw-r--r--drm/nouveau/nvkm/engine/mpeg/nv31.h (renamed from nvkm/engine/mpeg/nv31.h)0
-rw-r--r--drm/nouveau/nvkm/engine/mpeg/nv40.c (renamed from nvkm/engine/mpeg/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/engine/mpeg/nv44.c (renamed from nvkm/engine/mpeg/nv44.c)0
-rw-r--r--drm/nouveau/nvkm/engine/mpeg/nv50.c (renamed from nvkm/engine/mpeg/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/mpeg/nv84.c (renamed from nvkm/engine/mpeg/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/Kbuild9
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/base.c (renamed from nvkm/engine/perfmon/base.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/daemon.c (renamed from nvkm/engine/perfmon/daemon.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nv40.c (renamed from nvkm/engine/perfmon/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nv40.h (renamed from nvkm/engine/perfmon/nv40.h)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nv50.c (renamed from nvkm/engine/perfmon/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nv84.c (renamed from nvkm/engine/perfmon/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nva3.c (renamed from nvkm/engine/perfmon/nva3.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nvc0.c (renamed from nvkm/engine/perfmon/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nvc0.h (renamed from nvkm/engine/perfmon/nvc0.h)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nve0.c (renamed from nvkm/engine/perfmon/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/nvf0.c (renamed from nvkm/engine/perfmon/nvf0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/perfmon/priv.h (renamed from nvkm/engine/perfmon/priv.h)0
-rw-r--r--drm/nouveau/nvkm/engine/ppp/Kbuild2
-rw-r--r--drm/nouveau/nvkm/engine/ppp/nv98.c (renamed from nvkm/engine/ppp/nv98.c)0
-rw-r--r--drm/nouveau/nvkm/engine/ppp/nvc0.c (renamed from nvkm/engine/ppp/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/software/Kbuild4
-rw-r--r--drm/nouveau/nvkm/engine/software/nv04.c (renamed from nvkm/engine/software/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/engine/software/nv10.c (renamed from nvkm/engine/software/nv10.c)0
-rw-r--r--drm/nouveau/nvkm/engine/software/nv50.c (renamed from nvkm/engine/software/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/engine/software/nv50.h (renamed from nvkm/engine/software/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/engine/software/nvc0.c (renamed from nvkm/engine/software/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/vp/Kbuild4
-rw-r--r--drm/nouveau/nvkm/engine/vp/nv84.c (renamed from nvkm/engine/vp/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/engine/vp/nv98.c (renamed from nvkm/engine/vp/nv98.c)0
-rw-r--r--drm/nouveau/nvkm/engine/vp/nvc0.c (renamed from nvkm/engine/vp/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/vp/nve0.c (renamed from nvkm/engine/vp/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/engine/xtensa.c (renamed from nvkm/engine/xtensa.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/Kbuild19
-rw-r--r--drm/nouveau/nvkm/subdev/bar/Kbuild4
-rw-r--r--drm/nouveau/nvkm/subdev/bar/base.c (renamed from nvkm/subdev/bar/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bar/gk20a.c (renamed from nvkm/subdev/bar/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bar/nv50.c (renamed from nvkm/subdev/bar/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bar/nvc0.c (renamed from nvkm/subdev/bar/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bar/priv.h (renamed from nvkm/subdev/bar/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/Kbuild37
-rw-r--r--drm/nouveau/nvkm/subdev/bios/M0203.c (renamed from nvkm/subdev/bios/M0203.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/M0205.c (renamed from nvkm/subdev/bios/M0205.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/M0209.c (renamed from nvkm/subdev/bios/M0209.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/P0260.c (renamed from nvkm/subdev/bios/P0260.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/base.c (renamed from nvkm/subdev/bios/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/bit.c (renamed from nvkm/subdev/bios/bit.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/boost.c (renamed from nvkm/subdev/bios/boost.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/conn.c (renamed from nvkm/subdev/bios/conn.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/cstep.c (renamed from nvkm/subdev/bios/cstep.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/dcb.c (renamed from nvkm/subdev/bios/dcb.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/disp.c (renamed from nvkm/subdev/bios/disp.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/dp.c (renamed from nvkm/subdev/bios/dp.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/extdev.c (renamed from nvkm/subdev/bios/extdev.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/fan.c (renamed from nvkm/subdev/bios/fan.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/gpio.c (renamed from nvkm/subdev/bios/gpio.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/i2c.c (renamed from nvkm/subdev/bios/i2c.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/image.c (renamed from nvkm/subdev/bios/image.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/init.c (renamed from nvkm/subdev/bios/init.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/mxm.c (renamed from nvkm/subdev/bios/mxm.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/npde.c (renamed from nvkm/subdev/bios/npde.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/pcir.c (renamed from nvkm/subdev/bios/pcir.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/perf.c (renamed from nvkm/subdev/bios/perf.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/pll.c (renamed from nvkm/subdev/bios/pll.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/pmu.c (renamed from nvkm/subdev/bios/pmu.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/priv.h (renamed from nvkm/subdev/bios/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/ramcfg.c (renamed from nvkm/subdev/bios/ramcfg.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/rammap.c (renamed from nvkm/subdev/bios/rammap.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/shadow.c (renamed from nvkm/subdev/bios/shadow.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/shadowacpi.c (renamed from nvkm/subdev/bios/shadowacpi.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/shadowof.c (renamed from nvkm/subdev/bios/shadowof.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/shadowpci.c (renamed from nvkm/subdev/bios/shadowpci.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/shadowramin.c (renamed from nvkm/subdev/bios/shadowramin.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/shadowrom.c (renamed from nvkm/subdev/bios/shadowrom.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/therm.c (renamed from nvkm/subdev/bios/therm.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/timing.c (renamed from nvkm/subdev/bios/timing.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/vmap.c (renamed from nvkm/subdev/bios/vmap.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/volt.c (renamed from nvkm/subdev/bios/volt.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bios/xpio.c (renamed from nvkm/subdev/bios/xpio.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/Kbuild6
-rw-r--r--drm/nouveau/nvkm/subdev/bus/hwsq.c (renamed from nvkm/subdev/bus/hwsq.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/hwsq.h (renamed from nvkm/subdev/bus/hwsq.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/nv04.c (renamed from nvkm/subdev/bus/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/nv04.h (renamed from nvkm/subdev/bus/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/nv31.c (renamed from nvkm/subdev/bus/nv31.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/nv50.c (renamed from nvkm/subdev/bus/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/nv94.c (renamed from nvkm/subdev/bus/nv94.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/bus/nvc0.c (renamed from nvkm/subdev/bus/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/Kbuild12
-rw-r--r--drm/nouveau/nvkm/subdev/clock/base.c (renamed from nvkm/subdev/clock/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/gk20a.c (renamed from nvkm/subdev/clock/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nv04.c (renamed from nvkm/subdev/clock/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nv40.c (renamed from nvkm/subdev/clock/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nv50.c (renamed from nvkm/subdev/clock/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nv50.h (renamed from nvkm/subdev/clock/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nv84.c (renamed from nvkm/subdev/clock/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nva3.c (renamed from nvkm/subdev/clock/nva3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nva3.h (renamed from nvkm/subdev/clock/nva3.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nvaa.c (renamed from nvkm/subdev/clock/nvaa.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nvc0.c (renamed from nvkm/subdev/clock/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/nve0.c (renamed from nvkm/subdev/clock/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/pll.h (renamed from nvkm/subdev/clock/pll.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/pllnv04.c (renamed from nvkm/subdev/clock/pllnv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/pllnva3.c (renamed from nvkm/subdev/clock/pllnva3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/clock/seq.h (renamed from nvkm/subdev/clock/seq.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/Kbuild14
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/base.c (renamed from nvkm/subdev/devinit/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/fbmem.h (renamed from nvkm/subdev/devinit/fbmem.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/gm107.c (renamed from nvkm/subdev/devinit/gm107.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/gm204.c (renamed from nvkm/subdev/devinit/gm204.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv04.c (renamed from nvkm/subdev/devinit/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv04.h (renamed from nvkm/subdev/devinit/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv05.c (renamed from nvkm/subdev/devinit/nv05.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv10.c (renamed from nvkm/subdev/devinit/nv10.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv1a.c (renamed from nvkm/subdev/devinit/nv1a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv20.c (renamed from nvkm/subdev/devinit/nv20.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv50.c (renamed from nvkm/subdev/devinit/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv50.h (renamed from nvkm/subdev/devinit/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv84.c (renamed from nvkm/subdev/devinit/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nv98.c (renamed from nvkm/subdev/devinit/nv98.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nva3.c (renamed from nvkm/subdev/devinit/nva3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nvaf.c (renamed from nvkm/subdev/devinit/nvaf.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/nvc0.c (renamed from nvkm/subdev/devinit/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/devinit/priv.h (renamed from nvkm/subdev/devinit/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/Kbuild45
-rw-r--r--drm/nouveau/nvkm/subdev/fb/base.c (renamed from nvkm/subdev/fb/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/gddr3.c (renamed from nvkm/subdev/fb/gddr3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/gddr5.c (renamed from nvkm/subdev/fb/gddr5.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/gk20a.c (renamed from nvkm/subdev/fb/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/gm107.c (renamed from nvkm/subdev/fb/gm107.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv04.c (renamed from nvkm/subdev/fb/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv04.h (renamed from nvkm/subdev/fb/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv10.c (renamed from nvkm/subdev/fb/nv10.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv1a.c (renamed from nvkm/subdev/fb/nv1a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv20.c (renamed from nvkm/subdev/fb/nv20.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv25.c (renamed from nvkm/subdev/fb/nv25.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv30.c (renamed from nvkm/subdev/fb/nv30.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv35.c (renamed from nvkm/subdev/fb/nv35.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv36.c (renamed from nvkm/subdev/fb/nv36.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv40.c (renamed from nvkm/subdev/fb/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv40.h (renamed from nvkm/subdev/fb/nv40.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv41.c (renamed from nvkm/subdev/fb/nv41.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv44.c (renamed from nvkm/subdev/fb/nv44.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv46.c (renamed from nvkm/subdev/fb/nv46.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv47.c (renamed from nvkm/subdev/fb/nv47.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv49.c (renamed from nvkm/subdev/fb/nv49.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv4e.c (renamed from nvkm/subdev/fb/nv4e.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv50.c (renamed from nvkm/subdev/fb/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv50.h (renamed from nvkm/subdev/fb/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nv84.c (renamed from nvkm/subdev/fb/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nva3.c (renamed from nvkm/subdev/fb/nva3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nvaa.c (renamed from nvkm/subdev/fb/nvaa.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nvaf.c (renamed from nvkm/subdev/fb/nvaf.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nvc0.c (renamed from nvkm/subdev/fb/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nvc0.h (renamed from nvkm/subdev/fb/nvc0.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/nve0.c (renamed from nvkm/subdev/fb/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/priv.h (renamed from nvkm/subdev/fb/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramfuc.h (renamed from nvkm/subdev/fb/ramfuc.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramgk20a.c (renamed from nvkm/subdev/fb/ramgk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramgm107.c (renamed from nvkm/subdev/fb/ramgm107.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv04.c (renamed from nvkm/subdev/fb/ramnv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv10.c (renamed from nvkm/subdev/fb/ramnv10.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv1a.c (renamed from nvkm/subdev/fb/ramnv1a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv20.c (renamed from nvkm/subdev/fb/ramnv20.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv40.c (renamed from nvkm/subdev/fb/ramnv40.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv41.c (renamed from nvkm/subdev/fb/ramnv41.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv44.c (renamed from nvkm/subdev/fb/ramnv44.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv49.c (renamed from nvkm/subdev/fb/ramnv49.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv4e.c (renamed from nvkm/subdev/fb/ramnv4e.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnv50.c (renamed from nvkm/subdev/fb/ramnv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnva3.c (renamed from nvkm/subdev/fb/ramnva3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnvaa.c (renamed from nvkm/subdev/fb/ramnvaa.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnvc0.c (renamed from nvkm/subdev/fb/ramnvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramnve0.c (renamed from nvkm/subdev/fb/ramnve0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/ramseq.h (renamed from nvkm/subdev/fb/ramseq.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/regsnv04.h (renamed from nvkm/include/subdev/fb/regsnv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/sddr2.c (renamed from nvkm/subdev/fb/sddr2.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fb/sddr3.c (renamed from nvkm/subdev/fb/sddr3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fuse/Kbuild4
-rw-r--r--drm/nouveau/nvkm/subdev/fuse/base.c (renamed from nvkm/subdev/fuse/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fuse/g80.c (renamed from nvkm/subdev/fuse/g80.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fuse/gf100.c (renamed from nvkm/subdev/fuse/gf100.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fuse/gm107.c (renamed from nvkm/subdev/fuse/gm107.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/fuse/priv.h (renamed from nvkm/subdev/fuse/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/Kbuild6
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/base.c (renamed from nvkm/subdev/gpio/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/nv10.c (renamed from nvkm/subdev/gpio/nv10.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/nv50.c (renamed from nvkm/subdev/gpio/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/nv94.c (renamed from nvkm/subdev/gpio/nv94.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/nvd0.c (renamed from nvkm/subdev/gpio/nvd0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/nve0.c (renamed from nvkm/subdev/gpio/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/gpio/priv.h (renamed from nvkm/subdev/gpio/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/Kbuild16
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/anx9805.c (renamed from nvkm/subdev/i2c/anx9805.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/aux.c (renamed from nvkm/subdev/i2c/aux.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/base.c (renamed from nvkm/subdev/i2c/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/bit.c (renamed from nvkm/subdev/i2c/bit.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/gf117.c (renamed from nvkm/subdev/i2c/gf117.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/gm204.c (renamed from nvkm/subdev/i2c/gm204.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/nv04.c (renamed from nvkm/subdev/i2c/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/nv4e.c (renamed from nvkm/subdev/i2c/nv4e.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/nv50.c (renamed from nvkm/subdev/i2c/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/nv50.h (renamed from nvkm/subdev/i2c/nv50.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/nv94.c (renamed from nvkm/subdev/i2c/nv94.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/nvd0.c (renamed from nvkm/subdev/i2c/nvd0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/nve0.c (renamed from nvkm/subdev/i2c/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/pad.c (renamed from nvkm/subdev/i2c/pad.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/pad.h (renamed from nvkm/subdev/i2c/pad.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/padgm204.c (renamed from nvkm/subdev/i2c/padgm204.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/padnv04.c (renamed from nvkm/subdev/i2c/padnv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/padnv94.c (renamed from nvkm/subdev/i2c/padnv94.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/port.h (renamed from nvkm/subdev/i2c/port.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/i2c/priv.h (renamed from nvkm/subdev/i2c/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/ibus/Kbuild3
-rw-r--r--drm/nouveau/nvkm/subdev/ibus/gk20a.c (renamed from nvkm/subdev/ibus/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/ibus/nvc0.c (renamed from nvkm/subdev/ibus/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/ibus/nve0.c (renamed from nvkm/subdev/ibus/nve0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/Kbuild4
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/base.c (renamed from nvkm/subdev/instmem/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/nv04.c (renamed from nvkm/subdev/instmem/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/nv04.h (renamed from nvkm/subdev/instmem/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/nv40.c (renamed from nvkm/subdev/instmem/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/nv50.c (renamed from nvkm/subdev/instmem/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/instmem/priv.h (renamed from nvkm/subdev/instmem/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/ltc/Kbuild4
-rw-r--r--drm/nouveau/nvkm/subdev/ltc/base.c (renamed from nvkm/subdev/ltc/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/ltc/gf100.c (renamed from nvkm/subdev/ltc/gf100.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/ltc/gk104.c (renamed from nvkm/subdev/ltc/gk104.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/ltc/gm107.c (renamed from nvkm/subdev/ltc/gm107.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/ltc/priv.h (renamed from nvkm/subdev/ltc/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/Kbuild11
-rw-r--r--drm/nouveau/nvkm/subdev/mc/base.c (renamed from nvkm/subdev/mc/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/gk20a.c (renamed from nvkm/subdev/mc/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv04.c (renamed from nvkm/subdev/mc/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv04.h (renamed from nvkm/subdev/mc/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv40.c (renamed from nvkm/subdev/mc/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv44.c (renamed from nvkm/subdev/mc/nv44.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv4c.c (renamed from nvkm/subdev/mc/nv4c.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv50.c (renamed from nvkm/subdev/mc/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv94.c (renamed from nvkm/subdev/mc/nv94.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nv98.c (renamed from nvkm/subdev/mc/nv98.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nvc0.c (renamed from nvkm/subdev/mc/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/nvc3.c (renamed from nvkm/subdev/mc/nvc3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mc/priv.h (renamed from nvkm/subdev/mc/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/mxm/Kbuild3
-rw-r--r--drm/nouveau/nvkm/subdev/mxm/base.c (renamed from nvkm/subdev/mxm/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mxm/mxms.c (renamed from nvkm/subdev/mxm/mxms.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/mxm/mxms.h (renamed from nvkm/subdev/mxm/mxms.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/mxm/nv50.c (renamed from nvkm/subdev/mxm/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/Kbuild8
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/base.c (renamed from nvkm/subdev/pwr/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/arith.fuc (renamed from nvkm/subdev/pwr/fuc/arith.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/host.fuc (renamed from nvkm/subdev/pwr/fuc/host.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/i2c_.fuc (renamed from nvkm/subdev/pwr/fuc/i2c_.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/idle.fuc (renamed from nvkm/subdev/pwr/fuc/idle.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/kernel.fuc (renamed from nvkm/subdev/pwr/fuc/kernel.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/macros.fuc (renamed from nvkm/subdev/pwr/fuc/macros.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/memx.fuc (renamed from nvkm/subdev/pwr/fuc/memx.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nv108.fuc5 (renamed from nvkm/subdev/pwr/fuc/nv108.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nv108.fuc5.h (renamed from nvkm/subdev/pwr/fuc/nv108.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nva3.fuc3 (renamed from nvkm/subdev/pwr/fuc/nva3.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nva3.fuc3.h (renamed from nvkm/subdev/pwr/fuc/nva3.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nvc0.fuc3 (renamed from nvkm/subdev/pwr/fuc/nvc0.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nvc0.fuc3.h (renamed from nvkm/subdev/pwr/fuc/nvc0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nvd0.fuc4 (renamed from nvkm/subdev/pwr/fuc/nvd0.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/nvd0.fuc4.h (renamed from nvkm/subdev/pwr/fuc/nvd0.fuc.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/os.h (renamed from nvkm/subdev/pwr/fuc/os.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/perf.fuc (renamed from nvkm/subdev/pwr/fuc/perf.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/fuc/test.fuc (renamed from nvkm/subdev/pwr/fuc/test.fuc)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/gk104.c (renamed from nvkm/subdev/pwr/gk104.c)2
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/gk20a.c (renamed from nvkm/subdev/pwr/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/memx.c (renamed from nvkm/subdev/pwr/memx.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/nv108.c (renamed from nvkm/subdev/pwr/nv108.c)2
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/nva3.c (renamed from nvkm/subdev/pwr/nva3.c)2
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/nvc0.c (renamed from nvkm/subdev/pwr/nvc0.c)2
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/nvd0.c (renamed from nvkm/subdev/pwr/nvd0.c)2
-rw-r--r--drm/nouveau/nvkm/subdev/pwr/priv.h (renamed from nvkm/subdev/pwr/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/Kbuild13
-rw-r--r--drm/nouveau/nvkm/subdev/therm/base.c (renamed from nvkm/subdev/therm/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/fan.c (renamed from nvkm/subdev/therm/fan.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/fannil.c (renamed from nvkm/subdev/therm/fannil.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/fanpwm.c (renamed from nvkm/subdev/therm/fanpwm.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/fantog.c (renamed from nvkm/subdev/therm/fantog.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/gm107.c (renamed from nvkm/subdev/therm/gm107.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/ic.c (renamed from nvkm/subdev/therm/ic.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/nv40.c (renamed from nvkm/subdev/therm/nv40.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/nv50.c (renamed from nvkm/subdev/therm/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/nv84.c (renamed from nvkm/subdev/therm/nv84.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/nva3.c (renamed from nvkm/subdev/therm/nva3.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/nvd0.c (renamed from nvkm/subdev/therm/nvd0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/priv.h (renamed from nvkm/subdev/therm/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/therm/temp.c (renamed from nvkm/subdev/therm/temp.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/timer/Kbuild3
-rw-r--r--drm/nouveau/nvkm/subdev/timer/base.c (renamed from nvkm/subdev/timer/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/timer/gk20a.c (renamed from nvkm/subdev/timer/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/timer/nv04.c (renamed from nvkm/subdev/timer/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/timer/nv04.h (renamed from nvkm/subdev/timer/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/timer/priv.h (renamed from nvkm/subdev/timer/priv.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/vm/Kbuild6
-rw-r--r--drm/nouveau/nvkm/subdev/vm/base.c (renamed from nvkm/subdev/vm/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/vm/nv04.c (renamed from nvkm/subdev/vm/nv04.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/vm/nv04.h (renamed from nvkm/subdev/vm/nv04.h)0
-rw-r--r--drm/nouveau/nvkm/subdev/vm/nv41.c (renamed from nvkm/subdev/vm/nv41.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/vm/nv44.c (renamed from nvkm/subdev/vm/nv44.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/vm/nv50.c (renamed from nvkm/subdev/vm/nv50.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/vm/nvc0.c (renamed from nvkm/subdev/vm/nvc0.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/volt/Kbuild4
-rw-r--r--drm/nouveau/nvkm/subdev/volt/base.c (renamed from nvkm/subdev/volt/base.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/volt/gk20a.c (renamed from nvkm/subdev/volt/gk20a.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/volt/gpio.c (renamed from nvkm/subdev/volt/gpio.c)0
-rw-r--r--drm/nouveau/nvkm/subdev/volt/nv40.c (renamed from nvkm/subdev/volt/nv40.c)0
l---------include1
-rw-r--r--lib/.gitignore3
-rw-r--r--lib/Makefile75
-rw-r--r--lib/Makefile.am13
-rw-r--r--lib/drm.c (renamed from lib/kern.c)2
-rw-r--r--lib/include/nvif/list.h (renamed from lib/core/list.h)0
-rw-r--r--lib/include/nvif/os.h (renamed from lib/core/os.h)8
-rw-r--r--m4/.gitignore5
l---------nvif1
-rw-r--r--nvif/Makefile.am12
-rw-r--r--nvif/list.h353
l---------nvif/os.h1
l---------nvkm1
-rw-r--r--nvkm/Makefile.am8
-rw-r--r--nvkm/core/Makefile.am23
-rw-r--r--nvkm/engine/Makefile.am23
-rw-r--r--nvkm/engine/Makefile.engine4
-rw-r--r--nvkm/engine/bsp/Makefile.am8
-rw-r--r--nvkm/engine/copy/Makefile.am17
-rw-r--r--nvkm/engine/crypt/Makefile.am13
-rw-r--r--nvkm/engine/device/Makefile.am16
-rw-r--r--nvkm/engine/disp/Makefile.am33
-rw-r--r--nvkm/engine/dmaobj/Makefile.am9
-rw-r--r--nvkm/engine/fifo/Makefile.am15
-rw-r--r--nvkm/engine/graph/Makefile.am62
-rw-r--r--nvkm/engine/mpeg/Makefile.am9
-rw-r--r--nvkm/engine/perfmon/Makefile.am13
-rw-r--r--nvkm/engine/ppp/Makefile.am6
-rw-r--r--nvkm/engine/software/Makefile.am8
-rw-r--r--nvkm/engine/vp/Makefile.am8
-rw-r--r--nvkm/include/core/intr.h8
l---------nvkm/include/nvif/class.h1
l---------nvkm/include/nvif/event.h1
l---------nvkm/include/nvif/ioctl.h1
l---------nvkm/include/nvif/unpack.h1
-rw-r--r--nvkm/include/subdev/bios/dfp.h4
-rw-r--r--nvkm/subdev/Makefile.am25
-rw-r--r--nvkm/subdev/Makefile.subdev3
-rw-r--r--nvkm/subdev/bar/Makefile.am8
-rw-r--r--nvkm/subdev/bios/Makefile.am41
-rw-r--r--nvkm/subdev/bus/Makefile.am10
-rw-r--r--nvkm/subdev/clock/Makefile.am16
-rw-r--r--nvkm/subdev/devinit/Makefile.am18
-rw-r--r--nvkm/subdev/fb/Makefile.am36
-rw-r--r--nvkm/subdev/fuse/Makefile.am8
-rw-r--r--nvkm/subdev/gpio/Makefile.am10
-rw-r--r--nvkm/subdev/i2c/Makefile.am20
-rw-r--r--nvkm/subdev/ibus/Makefile.am7
-rw-r--r--nvkm/subdev/instmem/Makefile.am8
-rw-r--r--nvkm/subdev/ltc/Makefile.am8
-rw-r--r--nvkm/subdev/mc/Makefile.am15
-rw-r--r--nvkm/subdev/mxm/Makefile.am7
-rw-r--r--nvkm/subdev/pwr/Makefile.am46
-rw-r--r--nvkm/subdev/therm/Makefile.am17
-rw-r--r--nvkm/subdev/timer/Makefile.am7
-rw-r--r--nvkm/subdev/vm/Makefile.am10
-rw-r--r--nvkm/subdev/volt/Makefile.am8
-rwxr-xr-xscripts/nvkm-am42
751 files changed, 717 insertions, 1634 deletions
diff --git a/.gitignore b/.gitignore
index 805ec91d7..1377554eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,37 +1 @@
-.deps
-.libs
-Makefile
-Makefile.in
-*.la
-*.lo
-*.o
-aclocal.m4
-autom4te.cache/
-config.guess
-config.sub
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-install-sh
-libtool
-ltmain.sh
-missing
-stamp-h1
*.swp
-*.in
-
-*.cmd
-*.mod.c
-*.symvers
-*.order
-*.ko*
-.tmp_versions/
-
-bin/nv_*
-!bin/nv_*.c
-!bin/nv_*.h
-compile
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..c003ff4e1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,49 @@
+.PHONY: all build clean install
+all: build
+
+prefix ?= /usr/local
+bindir ?= $(prefix)/bin
+libdir ?= $(prefix)/lib
+
+top := .
+drm := $(top)/drm/nouveau
+lib := $(top)/lib
+bin := $(top)/bin
+
+CFLAGS ?= -O0 -ggdb3
+CFLAGS += -I$(lib)/include -I$(drm)/include -I$(drm)/include/nvkm \
+ -I$(drm)/nvkm -I/usr/include/libdrm \
+ -fno-strict-aliasing -Wall -Wundef -Wstrict-prototypes \
+ -DCONFIG_NOUVEAU_DEBUG=7 \
+ -DCONFIG_NOUVEAU_DEBUG_DEFAULT=3 \
+ -DCONFIG_NOUVEAU_I2C_INTERNAL \
+ -DCONFIG_NOUVEAU_I2C_INTERNAL_DEFAULT
+ENVYAS ?= envyas
+ENVYPP = $(CC) -E -CC -xc $(1) | $(CC) -E - | sed -e "/^\#/d"
+INSTALL ?= install
+
+deps :=
+objs :=
+libs :=
+bins :=
+fws :=
+
+include $(lib)/Makefile
+include $(bin)/Makefile
+
+build: $(bins)
+
+clean:
+ @rm -f $(deps) $(objs) $(libs) $(bins)
+
+clean-fw:
+ @rm -f $(fws)
+
+install-lib = $(INSTALL) -D -m 755 $(1) $(libdir);
+install-bin = $(INSTALL) -D -m 755 $(1) $(bindir);
+install:
+ $(foreach lib,$(libs),$(call install-lib,$(lib)))
+ ldconfig $(libdir)
+ $(foreach bin,$(bins),$(call install-bin,$(bin)))
+
+-include $(deps)
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index bfd427ca0..000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-AUTOMAKE_OPTIONS = foreign
-
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
-SUBDIRS = nvkm lib nvif bin
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index f033e0474..000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
-autoreconf -v --force --install || exit 1
-cd $ORIGDIR || exit $?
-
-$srcdir/configure "$@"
diff --git a/bin/.gitignore b/bin/.gitignore
new file mode 100644
index 000000000..f59c0c66d
--- /dev/null
+++ b/bin/.gitignore
@@ -0,0 +1,5 @@
+*.d
+*.o
+nv_*
+!nv_*.c
+!nv_*.h
diff --git a/bin/Makefile b/bin/Makefile
new file mode 100644
index 000000000..f64b3b839
--- /dev/null
+++ b/bin/Makefile
@@ -0,0 +1,12 @@
+BINNVIF_CC = $(CFLAGS)
+BINNVIF_LD = $(LDFLAGS) -lnvif -lncurses -lmenu -lform -L$(lib)
+
+srcs = $(wildcard $(bin)/*.c)
+outp = $(srcs:.c=)
+
+$(outp): %: %.c $(lib)/libnvif.so
+ @echo -e " CCLD $@"
+ @$(CC) $(BINNVIF_CC) $(BINNVIF_LD) -MMD -MP -o $@ $<
+
+deps += $(srcs:.c=.d)
+bins += $(outp)
diff --git a/bin/Makefile.am b/bin/Makefile.am
deleted file mode 100644
index 13f75fd5e..000000000
--- a/bin/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-bin_PROGRAMS = \
- nv_rd08 nv_rd16 nv_rd32 nv_wr08 nv_wr16 nv_wr32 \
- nv_rf08 nv_rf16 nv_rf32 nv_wf08 nv_wf16 nv_wf32 \
- nv_ri08 nv_ri16 nv_ri32 nv_wi08 nv_wi16 nv_wi32 \
- nv_rv08 nv_rv16 nv_rv32 nv_wv08 nv_wv16 nv_wv32 \
- nv_rs08 nv_rs16 nv_rs32 nv_ws08 nv_ws16 nv_ws32 \
- nv_disp nv_i2c nv_aux nv_init nv_rdfuc nv_perfmon
-
-AM_CPPFLAGS = -I$(top_srcdir)/nvkm/include \
- -I$(top_srcdir)/lib/ \
- -I$(top_srcdir)/
-
-LDFLAGS = $(top_srcdir)/nvif/libnvif.la -lncurses -lmenu -lform
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index b4404a5a9..000000000
--- a/configure.ac
+++ /dev/null
@@ -1,107 +0,0 @@
-AC_INIT([nouveau], 1.0.2)
-AC_CONFIG_SRCDIR([configure.ac])
-AC_CONFIG_MACRO_DIR([m4])
-
-AC_PROG_CC
-AC_LANG_C
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-AC_PROG_LIBTOOL
-
-AM_INIT_AUTOMAKE
-AM_SILENT_RULES([yes])
-
-PKG_CHECK_MODULES(PCIACCESS, pciaccess)
-AC_SUBST([PCIACCESS_CFLAGS])
-AC_SUBST([PCIACCESS_LIBS])
-
-AC_ARG_ENABLE([debug-level],
- [AS_HELP_STRING([--enable-debug-level=LEVEL],
- [select highest debug level to build support for
- (fatal, error, warning, info, debug,
- trace, paranoia, spam) [default = debug]])],
- [ debug=$enableval ],
- [ debug=debug ])
-
-AC_MSG_CHECKING([for maximum debug level to build])
-if test "x$debug" = "xfatal"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [0])
-elif test "x$debug" = "xerror"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [1])
-elif test "x$debug" = "xwarning"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [2])
-elif test "x$debug" = "xinfo"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [3])
-elif test "x$debug" = "xdebug"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [4])
-elif test "x$debug" = "xtrace"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [5])
-elif test "x$debug" = "xparanoia"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [6])
-elif test "x$debug" = "xspam"; then
- AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [7])
-else
- AC_MSG_ERROR([invalid debug level specified])
-fi
-AC_MSG_RESULT($debug)
-AC_DEFINE([CONFIG_NOUVEAU_DEBUG_DEFAULT], [3])
-
-AC_ARG_ENABLE([internal-bitbang],
- [AS_HELP_STRING([--enable-internal-bitbang[[=default]]],
- [enable use of internal i2c bit-banging algo ])],
- [ bitbang=$enableval ],
- [ bitbang=default ])
-
-AC_MSG_CHECKING([whether to enable internal i2c bit-banging algo])
-if test "x$bitbang" = "xdefault"; then
- AC_DEFINE([CONFIG_NOUVEAU_I2C_INTERNAL], [1])
- AC_DEFINE([CONFIG_NOUVEAU_I2C_INTERNAL_DEFAULT], [1])
- AC_MSG_RESULT([default])
-elif test "x$bitbang" = "xyes"; then
- AC_DEFINE([CONFIG_NOUVEAU_I2C_INTERNAL], [1])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-AC_OUTPUT( Makefile \
- nvkm/Makefile \
- nvkm/core/Makefile \
- nvkm/subdev/Makefile \
- nvkm/subdev/bar/Makefile \
- nvkm/subdev/bios/Makefile \
- nvkm/subdev/bus/Makefile \
- nvkm/subdev/clock/Makefile \
- nvkm/subdev/devinit/Makefile \
- nvkm/subdev/fb/Makefile \
- nvkm/subdev/fuse/Makefile \
- nvkm/subdev/gpio/Makefile \
- nvkm/subdev/i2c/Makefile \
- nvkm/subdev/ibus/Makefile \
- nvkm/subdev/instmem/Makefile \
- nvkm/subdev/ltc/Makefile \
- nvkm/subdev/mc/Makefile \
- nvkm/subdev/mxm/Makefile \
- nvkm/subdev/pwr/Makefile \
- nvkm/subdev/therm/Makefile \
- nvkm/subdev/timer/Makefile \
- nvkm/subdev/vm/Makefile \
- nvkm/subdev/volt/Makefile \
- nvkm/engine/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 \
- nvkm/engine/perfmon/Makefile \
- nvkm/engine/ppp/Makefile \
- nvkm/engine/software/Makefile \
- nvkm/engine/vp/Makefile \
- nvif/Makefile \
- lib/Makefile \
- bin/Makefile \
-)
diff --git a/drm/.gitignore b/drm/.gitignore
new file mode 100644
index 000000000..37bdc36a3
--- /dev/null
+++ b/drm/.gitignore
@@ -0,0 +1,7 @@
+*.cmd
+*.mod.c
+*.symvers
+*.order
+*.ko*
+*.o
+.tmp_versions/
diff --git a/drm/Kbuild b/drm/Kbuild
deleted file mode 100644
index 1febf6ec0..000000000
--- a/drm/Kbuild
+++ /dev/null
@@ -1,400 +0,0 @@
-#
-# Makefile for the drm device driver. This driver provides support for the
-# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
-
-ccflags-y := -Iinclude/drm
-ccflags-y += -I$(src)/core/include
-ccflags-y += -I$(src)/core
-ccflags-y += -I$(src)
-
-nouveau-y := core/core/client.o
-nouveau-y += core/core/engctx.o
-nouveau-y += core/core/engine.o
-nouveau-y += core/core/enum.o
-nouveau-y += core/core/event.o
-nouveau-y += core/core/gpuobj.o
-nouveau-y += core/core/handle.o
-nouveau-y += core/core/ioctl.o
-nouveau-y += core/core/mm.o
-nouveau-y += core/core/namedb.o
-nouveau-y += core/core/notify.o
-nouveau-y += core/core/object.o
-nouveau-y += core/core/option.o
-nouveau-y += core/core/parent.o
-nouveau-y += core/core/printk.o
-nouveau-y += core/core/ramht.o
-nouveau-y += core/core/subdev.o
-
-nouveau-y += core/subdev/bar/base.o
-nouveau-y += core/subdev/bar/nv50.o
-nouveau-y += core/subdev/bar/nvc0.o
-nouveau-y += core/subdev/bar/gk20a.o
-nouveau-y += core/subdev/bios/base.o
-nouveau-y += core/subdev/bios/bit.o
-nouveau-y += core/subdev/bios/boost.o
-nouveau-y += core/subdev/bios/conn.o
-nouveau-y += core/subdev/bios/cstep.o
-nouveau-y += core/subdev/bios/dcb.o
-nouveau-y += core/subdev/bios/disp.o
-nouveau-y += core/subdev/bios/dp.o
-nouveau-y += core/subdev/bios/extdev.o
-nouveau-y += core/subdev/bios/fan.o
-nouveau-y += core/subdev/bios/gpio.o
-nouveau-y += core/subdev/bios/i2c.o
-nouveau-y += core/subdev/bios/image.o
-nouveau-y += core/subdev/bios/init.o
-nouveau-y += core/subdev/bios/mxm.o
-nouveau-y += core/subdev/bios/npde.o
-nouveau-y += core/subdev/bios/pcir.o
-nouveau-y += core/subdev/bios/perf.o
-nouveau-y += core/subdev/bios/pll.o
-nouveau-y += core/subdev/bios/pmu.o
-nouveau-y += core/subdev/bios/ramcfg.o
-nouveau-y += core/subdev/bios/rammap.o
-nouveau-y += core/subdev/bios/shadow.o
-nouveau-y += core/subdev/bios/shadowacpi.o
-nouveau-y += core/subdev/bios/shadowof.o
-nouveau-y += core/subdev/bios/shadowpci.o
-nouveau-y += core/subdev/bios/shadowramin.o
-nouveau-y += core/subdev/bios/shadowrom.o
-nouveau-y += core/subdev/bios/timing.o
-nouveau-y += core/subdev/bios/therm.o
-nouveau-y += core/subdev/bios/vmap.o
-nouveau-y += core/subdev/bios/volt.o
-nouveau-y += core/subdev/bios/xpio.o
-nouveau-y += core/subdev/bios/M0203.o
-nouveau-y += core/subdev/bios/M0205.o
-nouveau-y += core/subdev/bios/M0209.o
-nouveau-y += core/subdev/bios/P0260.o
-nouveau-y += core/subdev/bus/hwsq.o
-nouveau-y += core/subdev/bus/nv04.o
-nouveau-y += core/subdev/bus/nv31.o
-nouveau-y += core/subdev/bus/nv50.o
-nouveau-y += core/subdev/bus/nv94.o
-nouveau-y += core/subdev/bus/nvc0.o
-nouveau-y += core/subdev/clock/base.o
-nouveau-y += core/subdev/clock/nv04.o
-nouveau-y += core/subdev/clock/nv40.o
-nouveau-y += core/subdev/clock/nv50.o
-nouveau-y += core/subdev/clock/nv84.o
-nouveau-y += core/subdev/clock/nva3.o
-nouveau-y += core/subdev/clock/nvaa.o
-nouveau-y += core/subdev/clock/nvc0.o
-nouveau-y += core/subdev/clock/nve0.o
-nouveau-y += core/subdev/clock/gk20a.o
-nouveau-y += core/subdev/clock/pllnv04.o
-nouveau-y += core/subdev/clock/pllnva3.o
-nouveau-y += core/subdev/devinit/base.o
-nouveau-y += core/subdev/devinit/nv04.o
-nouveau-y += core/subdev/devinit/nv05.o
-nouveau-y += core/subdev/devinit/nv10.o
-nouveau-y += core/subdev/devinit/nv1a.o
-nouveau-y += core/subdev/devinit/nv20.o
-nouveau-y += core/subdev/devinit/nv50.o
-nouveau-y += core/subdev/devinit/nv84.o
-nouveau-y += core/subdev/devinit/nv98.o
-nouveau-y += core/subdev/devinit/nva3.o
-nouveau-y += core/subdev/devinit/nvaf.o
-nouveau-y += core/subdev/devinit/nvc0.o
-nouveau-y += core/subdev/devinit/gm107.o
-nouveau-y += core/subdev/devinit/gm204.o
-nouveau-y += core/subdev/fb/base.o
-nouveau-y += core/subdev/fb/nv04.o
-nouveau-y += core/subdev/fb/nv10.o
-nouveau-y += core/subdev/fb/nv1a.o
-nouveau-y += core/subdev/fb/nv20.o
-nouveau-y += core/subdev/fb/nv25.o
-nouveau-y += core/subdev/fb/nv30.o
-nouveau-y += core/subdev/fb/nv35.o
-nouveau-y += core/subdev/fb/nv36.o
-nouveau-y += core/subdev/fb/nv40.o
-nouveau-y += core/subdev/fb/nv41.o
-nouveau-y += core/subdev/fb/nv44.o
-nouveau-y += core/subdev/fb/nv46.o
-nouveau-y += core/subdev/fb/nv47.o
-nouveau-y += core/subdev/fb/nv49.o
-nouveau-y += core/subdev/fb/nv4e.o
-nouveau-y += core/subdev/fb/nv50.o
-nouveau-y += core/subdev/fb/nv84.o
-nouveau-y += core/subdev/fb/nva3.o
-nouveau-y += core/subdev/fb/nvaa.o
-nouveau-y += core/subdev/fb/nvaf.o
-nouveau-y += core/subdev/fb/nvc0.o
-nouveau-y += core/subdev/fb/nve0.o
-nouveau-y += core/subdev/fb/gk20a.o
-nouveau-y += core/subdev/fb/gm107.o
-nouveau-y += core/subdev/fb/ramnv04.o
-nouveau-y += core/subdev/fb/ramnv10.o
-nouveau-y += core/subdev/fb/ramnv1a.o
-nouveau-y += core/subdev/fb/ramnv20.o
-nouveau-y += core/subdev/fb/ramnv40.o
-nouveau-y += core/subdev/fb/ramnv41.o
-nouveau-y += core/subdev/fb/ramnv44.o
-nouveau-y += core/subdev/fb/ramnv49.o
-nouveau-y += core/subdev/fb/ramnv4e.o
-nouveau-y += core/subdev/fb/ramnv50.o
-nouveau-y += core/subdev/fb/ramnva3.o
-nouveau-y += core/subdev/fb/ramnvaa.o
-nouveau-y += core/subdev/fb/ramnvc0.o
-nouveau-y += core/subdev/fb/ramnve0.o
-nouveau-y += core/subdev/fb/ramgk20a.o
-nouveau-y += core/subdev/fb/ramgm107.o
-nouveau-y += core/subdev/fb/sddr2.o
-nouveau-y += core/subdev/fb/sddr3.o
-nouveau-y += core/subdev/fb/gddr3.o
-nouveau-y += core/subdev/fb/gddr5.o
-nouveau-y += core/subdev/fuse/base.o
-nouveau-y += core/subdev/fuse/g80.o
-nouveau-y += core/subdev/fuse/gf100.o
-nouveau-y += core/subdev/fuse/gm107.o
-nouveau-y += core/subdev/gpio/base.o
-nouveau-y += core/subdev/gpio/nv10.o
-nouveau-y += core/subdev/gpio/nv50.o
-nouveau-y += core/subdev/gpio/nv94.o
-nouveau-y += core/subdev/gpio/nvd0.o
-nouveau-y += core/subdev/gpio/nve0.o
-nouveau-y += core/subdev/i2c/base.o
-nouveau-y += core/subdev/i2c/anx9805.o
-nouveau-y += core/subdev/i2c/aux.o
-nouveau-y += core/subdev/i2c/bit.o
-nouveau-y += core/subdev/i2c/pad.o
-nouveau-y += core/subdev/i2c/padnv04.o
-nouveau-y += core/subdev/i2c/padnv94.o
-nouveau-y += core/subdev/i2c/padgm204.o
-nouveau-y += core/subdev/i2c/nv04.o
-nouveau-y += core/subdev/i2c/nv4e.o
-nouveau-y += core/subdev/i2c/nv50.o
-nouveau-y += core/subdev/i2c/nv94.o
-nouveau-y += core/subdev/i2c/nvd0.o
-nouveau-y += core/subdev/i2c/gf117.o
-nouveau-y += core/subdev/i2c/nve0.o
-nouveau-y += core/subdev/i2c/gm204.o
-nouveau-y += core/subdev/ibus/nvc0.o
-nouveau-y += core/subdev/ibus/nve0.o
-nouveau-y += core/subdev/ibus/gk20a.o
-nouveau-y += core/subdev/instmem/base.o
-nouveau-y += core/subdev/instmem/nv04.o
-nouveau-y += core/subdev/instmem/nv40.o
-nouveau-y += core/subdev/instmem/nv50.o
-nouveau-y += core/subdev/ltc/base.o
-nouveau-y += core/subdev/ltc/gf100.o
-nouveau-y += core/subdev/ltc/gk104.o
-nouveau-y += core/subdev/ltc/gm107.o
-nouveau-y += core/subdev/mc/base.o
-nouveau-y += core/subdev/mc/nv04.o
-nouveau-y += core/subdev/mc/nv40.o
-nouveau-y += core/subdev/mc/nv44.o
-nouveau-y += core/subdev/mc/nv4c.o
-nouveau-y += core/subdev/mc/nv50.o
-nouveau-y += core/subdev/mc/nv94.o
-nouveau-y += core/subdev/mc/nv98.o
-nouveau-y += core/subdev/mc/nvc0.o
-nouveau-y += core/subdev/mc/nvc3.o
-nouveau-y += core/subdev/mc/gk20a.o
-nouveau-y += core/subdev/mxm/base.o
-nouveau-y += core/subdev/mxm/mxms.o
-nouveau-y += core/subdev/mxm/nv50.o
-nouveau-y += core/subdev/pwr/base.o
-nouveau-y += core/subdev/pwr/memx.o
-nouveau-y += core/subdev/pwr/nva3.o
-nouveau-y += core/subdev/pwr/nvc0.o
-nouveau-y += core/subdev/pwr/nvd0.o
-nouveau-y += core/subdev/pwr/gk104.o
-nouveau-y += core/subdev/pwr/nv108.o
-nouveau-y += core/subdev/pwr/gk20a.o
-nouveau-y += core/subdev/therm/base.o
-nouveau-y += core/subdev/therm/fan.o
-nouveau-y += core/subdev/therm/fannil.o
-nouveau-y += core/subdev/therm/fanpwm.o
-nouveau-y += core/subdev/therm/fantog.o
-nouveau-y += core/subdev/therm/ic.o
-nouveau-y += core/subdev/therm/temp.o
-nouveau-y += core/subdev/therm/nv40.o
-nouveau-y += core/subdev/therm/nv50.o
-nouveau-y += core/subdev/therm/nv84.o
-nouveau-y += core/subdev/therm/nva3.o
-nouveau-y += core/subdev/therm/nvd0.o
-nouveau-y += core/subdev/therm/gm107.o
-nouveau-y += core/subdev/timer/base.o
-nouveau-y += core/subdev/timer/nv04.o
-nouveau-y += core/subdev/timer/gk20a.o
-nouveau-y += core/subdev/vm/base.o
-nouveau-y += core/subdev/vm/nv04.o
-nouveau-y += core/subdev/vm/nv41.o
-nouveau-y += core/subdev/vm/nv44.o
-nouveau-y += core/subdev/vm/nv50.o
-nouveau-y += core/subdev/vm/nvc0.o
-nouveau-y += core/subdev/volt/base.o
-nouveau-y += core/subdev/volt/gpio.o
-nouveau-y += core/subdev/volt/nv40.o
-nouveau-y += core/subdev/volt/gk20a.o
-
-nouveau-y += core/engine/falcon.o
-nouveau-y += core/engine/xtensa.o
-nouveau-y += core/engine/dmaobj/base.o
-nouveau-y += core/engine/dmaobj/nv04.o
-nouveau-y += core/engine/dmaobj/nv50.o
-nouveau-y += core/engine/dmaobj/nvc0.o
-nouveau-y += core/engine/dmaobj/nvd0.o
-nouveau-y += core/engine/bsp/nv84.o
-nouveau-y += core/engine/bsp/nv98.o
-nouveau-y += core/engine/bsp/nvc0.o
-nouveau-y += core/engine/bsp/nve0.o
-nouveau-y += core/engine/copy/nva3.o
-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/acpi.o
-nouveau-y += core/engine/device/base.o
-nouveau-y += core/engine/device/ctrl.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/device/gm100.o
-nouveau-y += core/engine/disp/base.o
-nouveau-y += core/engine/disp/conn.o
-nouveau-y += core/engine/disp/outp.o
-nouveau-y += core/engine/disp/outpdp.o
-nouveau-y += core/engine/disp/nv04.o
-nouveau-y += core/engine/disp/nv50.o
-nouveau-y += core/engine/disp/nv84.o
-nouveau-y += core/engine/disp/nv94.o
-nouveau-y += core/engine/disp/nva0.o
-nouveau-y += core/engine/disp/nva3.o
-nouveau-y += core/engine/disp/nvd0.o
-nouveau-y += core/engine/disp/nve0.o
-nouveau-y += core/engine/disp/nvf0.o
-nouveau-y += core/engine/disp/gm107.o
-nouveau-y += core/engine/disp/gm204.o
-nouveau-y += core/engine/disp/dacnv50.o
-nouveau-y += core/engine/disp/dport.o
-nouveau-y += core/engine/disp/hdanva3.o
-nouveau-y += core/engine/disp/hdanvd0.o
-nouveau-y += core/engine/disp/hdminv84.o
-nouveau-y += core/engine/disp/hdminva3.o
-nouveau-y += core/engine/disp/hdminvd0.o
-nouveau-y += core/engine/disp/hdminve0.o
-nouveau-y += core/engine/disp/piornv50.o
-nouveau-y += core/engine/disp/sornv50.o
-nouveau-y += core/engine/disp/sornv94.o
-nouveau-y += core/engine/disp/sornvd0.o
-nouveau-y += core/engine/disp/sorgm204.o
-nouveau-y += core/engine/disp/vga.o
-nouveau-y += core/engine/fifo/base.o
-nouveau-y += core/engine/fifo/nv04.o
-nouveau-y += core/engine/fifo/nv10.o
-nouveau-y += core/engine/fifo/nv17.o
-nouveau-y += core/engine/fifo/nv40.o
-nouveau-y += core/engine/fifo/nv50.o
-nouveau-y += core/engine/fifo/nv84.o
-nouveau-y += core/engine/fifo/nvc0.o
-nouveau-y += core/engine/fifo/nve0.o
-nouveau-y += core/engine/fifo/gk20a.o
-nouveau-y += core/engine/fifo/nv108.o
-nouveau-y += core/engine/graph/ctxnv40.o
-nouveau-y += core/engine/graph/ctxnv50.o
-nouveau-y += core/engine/graph/ctxnvc0.o
-nouveau-y += core/engine/graph/ctxnvc1.o
-nouveau-y += core/engine/graph/ctxnvc4.o
-nouveau-y += core/engine/graph/ctxnvc8.o
-nouveau-y += core/engine/graph/ctxnvd7.o
-nouveau-y += core/engine/graph/ctxnvd9.o
-nouveau-y += core/engine/graph/ctxnve4.o
-nouveau-y += core/engine/graph/ctxgk20a.o
-nouveau-y += core/engine/graph/ctxnvf0.o
-nouveau-y += core/engine/graph/ctxgk110b.o
-nouveau-y += core/engine/graph/ctxnv108.o
-nouveau-y += core/engine/graph/ctxgm107.o
-nouveau-y += core/engine/graph/nv04.o
-nouveau-y += core/engine/graph/nv10.o
-nouveau-y += core/engine/graph/nv20.o
-nouveau-y += core/engine/graph/nv25.o
-nouveau-y += core/engine/graph/nv2a.o
-nouveau-y += core/engine/graph/nv30.o
-nouveau-y += core/engine/graph/nv34.o
-nouveau-y += core/engine/graph/nv35.o
-nouveau-y += core/engine/graph/nv40.o
-nouveau-y += core/engine/graph/nv50.o
-nouveau-y += core/engine/graph/nvc0.o
-nouveau-y += core/engine/graph/nvc1.o
-nouveau-y += core/engine/graph/nvc4.o
-nouveau-y += core/engine/graph/nvc8.o
-nouveau-y += core/engine/graph/nvd7.o
-nouveau-y += core/engine/graph/nvd9.o
-nouveau-y += core/engine/graph/nve4.o
-nouveau-y += core/engine/graph/gk20a.o
-nouveau-y += core/engine/graph/nvf0.o
-nouveau-y += core/engine/graph/gk110b.o
-nouveau-y += core/engine/graph/nv108.o
-nouveau-y += core/engine/graph/gm107.o
-nouveau-y += core/engine/mpeg/nv31.o
-nouveau-y += core/engine/mpeg/nv40.o
-nouveau-y += core/engine/mpeg/nv44.o
-nouveau-y += core/engine/mpeg/nv50.o
-nouveau-y += core/engine/mpeg/nv84.o
-nouveau-y += core/engine/perfmon/base.o
-nouveau-y += core/engine/perfmon/daemon.o
-nouveau-y += core/engine/perfmon/nv40.o
-nouveau-y += core/engine/perfmon/nv50.o
-nouveau-y += core/engine/perfmon/nv84.o
-nouveau-y += core/engine/perfmon/nva3.o
-nouveau-y += core/engine/perfmon/nvc0.o
-nouveau-y += core/engine/perfmon/nve0.o
-nouveau-y += core/engine/perfmon/nvf0.o
-nouveau-y += core/engine/ppp/nv98.o
-nouveau-y += core/engine/ppp/nvc0.o
-nouveau-y += core/engine/software/nv04.o
-nouveau-y += core/engine/software/nv10.o
-nouveau-y += core/engine/software/nv50.o
-nouveau-y += core/engine/software/nvc0.o
-nouveau-y += core/engine/vp/nv84.o
-nouveau-y += core/engine/vp/nv98.o
-nouveau-y += core/engine/vp/nvc0.o
-nouveau-y += core/engine/vp/nve0.o
-
-# nvif
-nouveau-y += nvif/object.o
-nouveau-y += nvif/client.o
-nouveau-y += nvif/device.o
-nouveau-y += nvif/notify.o
-
-# drm/core
-nouveau-y += nouveau_drm.o nouveau_chan.o nouveau_dma.o nouveau_fence.o
-nouveau-y += nouveau_vga.o nouveau_agp.o
-nouveau-y += nouveau_ttm.o nouveau_sgdma.o nouveau_bo.o nouveau_gem.o
-nouveau-y += nouveau_prime.o nouveau_abi16.o
-nouveau-y += nouveau_nvif.o nouveau_usif.o
-nouveau-y += nv04_fence.o nv10_fence.o nv17_fence.o
-nouveau-y += nv50_fence.o nv84_fence.o nvc0_fence.o
-
-# drm/kms
-nouveau-y += nouveau_bios.o nouveau_fbcon.o nouveau_display.o
-nouveau-y += nouveau_connector.o nouveau_dp.o
-nouveau-y += nv04_fbcon.o nv50_fbcon.o nvc0_fbcon.o
-
-# drm/kms/nv04:nv50
-include $(src)/dispnv04/Makefile
-
-# drm/kms/nv50-
-nouveau-y += nv50_display.o
-
-# drm/pm
-nouveau-y += nouveau_hwmon.o nouveau_sysfs.o
-
-# other random bits
-nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
-ifdef CONFIG_X86
-nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
-endif
-nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
-nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
-nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
-
-obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
-
diff --git a/drm/Makefile b/drm/Makefile
index 60bd87649..f79c8ea18 100644
--- a/drm/Makefile
+++ b/drm/Makefile
@@ -9,8 +9,8 @@ LINUXDIR := $(shell if [ -e /lib/modules/$(LINUXVER)/source ]; \
)
endif
-KBUILD_OPTS := M=$(CURDIR)
-KBUILD_OPTS += KCPPFLAGS="$(shell cat nouveau.config)"
+KBUILD_OPTS := M=$(CURDIR)/nouveau
+KBUILD_OPTS += KCPPFLAGS=""
all: modules
diff --git a/drm/nouveau.config b/drm/nouveau.config
deleted file mode 100644
index e69de29bb..000000000
--- a/drm/nouveau.config
+++ /dev/null
diff --git a/drm/nouveau/Kbuild b/drm/nouveau/Kbuild
new file mode 100644
index 000000000..2b765663c
--- /dev/null
+++ b/drm/nouveau/Kbuild
@@ -0,0 +1,66 @@
+ccflags-y := -Iinclude/drm
+ccflags-y += -I$(src)/include
+ccflags-y += -I$(src)/include/nvkm
+ccflags-y += -I$(src)/nvkm
+ccflags-y += -I$(src)
+
+# NVKM - HW resource manager
+#- code also used by various userspace tools/tests
+include $(src)/nvif/Kbuild
+nouveau-y := $(nvif-y)
+
+# NVIF - NVKM interface library (NVKM user interface also defined here)
+#- code also used by various userspace tools/tests
+include $(src)/nvkm/Kbuild
+nouveau-y += $(nvkm-y)
+
+# DRM - general
+ifdef CONFIG_X86
+nouveau-$(CONFIG_ACPI) += nouveau_acpi.o
+endif
+nouveau-y += nouveau_agp.o
+nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o
+nouveau-y += nouveau_drm.o
+nouveau-y += nouveau_hwmon.o
+nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
+nouveau-y += nouveau_nvif.o
+nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o
+nouveau-y += nouveau_sysfs.o
+nouveau-y += nouveau_usif.o # userspace <-> nvif
+nouveau-y += nouveau_vga.o
+
+# DRM - memory management
+nouveau-y += nouveau_bo.o
+nouveau-y += nouveau_gem.o
+nouveau-y += nouveau_prime.o
+nouveau-y += nouveau_sgdma.o
+nouveau-y += nouveau_ttm.o
+
+# DRM - modesetting
+nouveau-$(CONFIG_DRM_NOUVEAU_BACKLIGHT) += nouveau_backlight.o
+nouveau-y += nouveau_connector.o
+nouveau-y += nouveau_display.o
+nouveau-y += nv50_display.o
+nouveau-y += nouveau_dp.o
+nouveau-y += nouveau_fbcon.o
+nouveau-y += nv04_fbcon.o
+nouveau-y += nv50_fbcon.o
+nouveau-y += nvc0_fbcon.o
+
+# DRM - command submission
+nouveau-y += nouveau_abi16.o
+nouveau-y += nouveau_chan.o
+nouveau-y += nouveau_dma.o
+nouveau-y += nouveau_fence.o
+nouveau-y += nv04_fence.o
+nouveau-y += nv10_fence.o
+nouveau-y += nv17_fence.o
+nouveau-y += nv50_fence.o
+nouveau-y += nv84_fence.o
+nouveau-y += nvc0_fence.o
+
+# DRM - prehistoric modesetting (NV04-G7x)
+nouveau-y += nouveau_bios.o
+include $(src)/dispnv04/Kbuild
+
+obj-$(CONFIG_DRM_NOUVEAU) += nouveau.o
diff --git a/drm/Kconfig b/drm/nouveau/Kconfig
index 5ab13e793..5ab13e793 100644
--- a/drm/Kconfig
+++ b/drm/nouveau/Kconfig
diff --git a/drm/dispnv04/Makefile b/drm/nouveau/dispnv04/Kbuild
index 424a489d0..424a489d0 100644
--- a/drm/dispnv04/Makefile
+++ b/drm/nouveau/dispnv04/Kbuild
diff --git a/drm/dispnv04/arb.c b/drm/nouveau/dispnv04/arb.c
index c6361422a..c6361422a 100644
--- a/drm/dispnv04/arb.c
+++ b/drm/nouveau/dispnv04/arb.c
diff --git a/drm/dispnv04/crtc.c b/drm/nouveau/dispnv04/crtc.c
index 38402ade6..38402ade6 100644
--- a/drm/dispnv04/crtc.c
+++ b/drm/nouveau/dispnv04/crtc.c
diff --git a/drm/dispnv04/cursor.c b/drm/nouveau/dispnv04/cursor.c
index 4e61173c3..4e61173c3 100644
--- a/drm/dispnv04/cursor.c
+++ b/drm/nouveau/dispnv04/cursor.c
diff --git a/drm/dispnv04/dac.c b/drm/nouveau/dispnv04/dac.c
index 2d8056cde..2d8056cde 100644
--- a/drm/dispnv04/dac.c
+++ b/drm/nouveau/dispnv04/dac.c
diff --git a/drm/dispnv04/dfp.c b/drm/nouveau/dispnv04/dfp.c
index 42a543525..42a543525 100644
--- a/drm/dispnv04/dfp.c
+++ b/drm/nouveau/dispnv04/dfp.c
diff --git a/drm/dispnv04/disp.c b/drm/nouveau/dispnv04/disp.c
index bdf7cf49a..bdf7cf49a 100644
--- a/drm/dispnv04/disp.c
+++ b/drm/nouveau/dispnv04/disp.c
diff --git a/drm/dispnv04/disp.h b/drm/nouveau/dispnv04/disp.h
index 3ad3ee818..3ad3ee818 100644
--- a/drm/dispnv04/disp.h
+++ b/drm/nouveau/dispnv04/disp.h
diff --git a/drm/dispnv04/hw.c b/drm/nouveau/dispnv04/hw.c
index 3d4c19300..3d4c19300 100644
--- a/drm/dispnv04/hw.c
+++ b/drm/nouveau/dispnv04/hw.c
diff --git a/drm/dispnv04/hw.h b/drm/nouveau/dispnv04/hw.h
index 7f53c571f..7f53c571f 100644
--- a/drm/dispnv04/hw.h
+++ b/drm/nouveau/dispnv04/hw.h
diff --git a/drm/dispnv04/nvreg.h b/drm/nouveau/dispnv04/nvreg.h
index bbfb1a68f..bbfb1a68f 100644
--- a/drm/dispnv04/nvreg.h
+++ b/drm/nouveau/dispnv04/nvreg.h
diff --git a/drm/dispnv04/overlay.c b/drm/nouveau/dispnv04/overlay.c
index 9f2498571..9f2498571 100644
--- a/drm/dispnv04/overlay.c
+++ b/drm/nouveau/dispnv04/overlay.c
diff --git a/drm/dispnv04/tvmodesnv17.c b/drm/nouveau/dispnv04/tvmodesnv17.c
index 08c6f5e50..08c6f5e50 100644
--- a/drm/dispnv04/tvmodesnv17.c
+++ b/drm/nouveau/dispnv04/tvmodesnv17.c
diff --git a/drm/dispnv04/tvnv04.c b/drm/nouveau/dispnv04/tvnv04.c
index 8061d8d0c..8061d8d0c 100644
--- a/drm/dispnv04/tvnv04.c
+++ b/drm/nouveau/dispnv04/tvnv04.c
diff --git a/drm/dispnv04/tvnv17.c b/drm/nouveau/dispnv04/tvnv17.c
index 72d2ab04d..72d2ab04d 100644
--- a/drm/dispnv04/tvnv17.c
+++ b/drm/nouveau/dispnv04/tvnv17.c
diff --git a/drm/dispnv04/tvnv17.h b/drm/nouveau/dispnv04/tvnv17.h
index 225894cdc..225894cdc 100644
--- a/drm/dispnv04/tvnv17.h
+++ b/drm/nouveau/dispnv04/tvnv17.h
diff --git a/nvif/class.h b/drm/nouveau/include/nvif/class.h
index 4e308eacb..4e308eacb 100644
--- a/nvif/class.h
+++ b/drm/nouveau/include/nvif/class.h
diff --git a/nvif/client.h b/drm/nouveau/include/nvif/client.h
index 28352f088..8b0048426 100644
--- a/nvif/client.h
+++ b/drm/nouveau/include/nvif/client.h
@@ -1,7 +1,7 @@
#ifndef __NVIF_CLIENT_H__
#define __NVIF_CLIENT_H__
-#include "object.h"
+#include <nvif/object.h>
struct nvif_client {
struct nvif_object base;
diff --git a/nvif/device.h b/drm/nouveau/include/nvif/device.h
index 43180f9fe..4aa1b93a8 100644
--- a/nvif/device.h
+++ b/drm/nouveau/include/nvif/device.h
@@ -1,8 +1,8 @@
#ifndef __NVIF_DEVICE_H__
#define __NVIF_DEVICE_H__
-#include "object.h"
-#include "class.h"
+#include <nvif/object.h>
+#include <nvif/class.h>
struct nvif_device {
struct nvif_object base;
diff --git a/nvif/driver.h b/drm/nouveau/include/nvif/driver.h
index 8bd39e692..8bd39e692 100644
--- a/nvif/driver.h
+++ b/drm/nouveau/include/nvif/driver.h
diff --git a/nvif/event.h b/drm/nouveau/include/nvif/event.h
index 21764499b..21764499b 100644
--- a/nvif/event.h
+++ b/drm/nouveau/include/nvif/event.h
diff --git a/nvif/ioctl.h b/drm/nouveau/include/nvif/ioctl.h
index 4cd8e323b..4cd8e323b 100644
--- a/nvif/ioctl.h
+++ b/drm/nouveau/include/nvif/ioctl.h
diff --git a/nvif/notify.h b/drm/nouveau/include/nvif/notify.h
index 9ebfa3b45..9ebfa3b45 100644
--- a/nvif/notify.h
+++ b/drm/nouveau/include/nvif/notify.h
diff --git a/nvif/object.h b/drm/nouveau/include/nvif/object.h
index fac3a3bbe..fe519179b 100644
--- a/nvif/object.h
+++ b/drm/nouveau/include/nvif/object.h
@@ -14,7 +14,7 @@ struct nvif_object {
void *priv; /*XXX: hack */
void (*dtor)(struct nvif_object *);
struct {
- void *ptr;
+ void __iomem *ptr;
u32 size;
} map;
};
@@ -42,7 +42,7 @@ void nvif_object_unmap(struct nvif_object *);
struct nvif_object *_object = nvif_object(a); \
u32 _data; \
if (likely(_object->map.ptr)) \
- _data = ioread##b##_native((u8 *)_object->map.ptr + (c)); \
+ _data = ioread##b##_native((u8 __iomem *)_object->map.ptr + (c)); \
else \
_data = nvif_object_rd(_object, (b) / 8, (c)); \
_data; \
@@ -50,7 +50,7 @@ void nvif_object_unmap(struct nvif_object *);
#define nvif_wr(a,b,c,d) ({ \
struct nvif_object *_object = nvif_object(a); \
if (likely(_object->map.ptr)) \
- iowrite##b##_native((d), (u8 *)_object->map.ptr + (c)); \
+ iowrite##b##_native((d), (u8 __iomem *)_object->map.ptr + (c)); \
else \
nvif_object_wr(_object, (b) / 8, (c), (d)); \
})
diff --git a/drm/core/os.h b/drm/nouveau/include/nvif/os.h
index bdd05ee7e..bdd05ee7e 100644
--- a/drm/core/os.h
+++ b/drm/nouveau/include/nvif/os.h
diff --git a/nvif/unpack.h b/drm/nouveau/include/nvif/unpack.h
index 5933188b4..5933188b4 100644
--- a/nvif/unpack.h
+++ b/drm/nouveau/include/nvif/unpack.h
diff --git a/nvkm/include/core/client.h b/drm/nouveau/include/nvkm/core/client.h
index 827c4e972..827c4e972 100644
--- a/nvkm/include/core/client.h
+++ b/drm/nouveau/include/nvkm/core/client.h
diff --git a/nvkm/include/core/debug.h b/drm/nouveau/include/nvkm/core/debug.h
index 8092e2e90..8092e2e90 100644
--- a/nvkm/include/core/debug.h
+++ b/drm/nouveau/include/nvkm/core/debug.h
diff --git a/nvkm/include/core/device.h b/drm/nouveau/include/nvkm/core/device.h
index 21a055aca..21a055aca 100644
--- a/nvkm/include/core/device.h
+++ b/drm/nouveau/include/nvkm/core/device.h
diff --git a/nvkm/include/core/engctx.h b/drm/nouveau/include/nvkm/core/engctx.h
index dbc6a3e6d..dbc6a3e6d 100644
--- a/nvkm/include/core/engctx.h
+++ b/drm/nouveau/include/nvkm/core/engctx.h
diff --git a/nvkm/include/core/engine.h b/drm/nouveau/include/nvkm/core/engine.h
index d7ebd35ef..d7ebd35ef 100644
--- a/nvkm/include/core/engine.h
+++ b/drm/nouveau/include/nvkm/core/engine.h
diff --git a/nvkm/include/core/enum.h b/drm/nouveau/include/nvkm/core/enum.h
index 4fc62bb8c..4fc62bb8c 100644
--- a/nvkm/include/core/enum.h
+++ b/drm/nouveau/include/nvkm/core/enum.h
diff --git a/nvkm/include/core/event.h b/drm/nouveau/include/nvkm/core/event.h
index 928765289..928765289 100644
--- a/nvkm/include/core/event.h
+++ b/drm/nouveau/include/nvkm/core/event.h
diff --git a/nvkm/include/core/gpuobj.h b/drm/nouveau/include/nvkm/core/gpuobj.h
index c262c2505..c262c2505 100644
--- a/nvkm/include/core/gpuobj.h
+++ b/drm/nouveau/include/nvkm/core/gpuobj.h
diff --git a/nvkm/include/core/handle.h b/drm/nouveau/include/nvkm/core/handle.h
index d22a59138..d22a59138 100644
--- a/nvkm/include/core/handle.h
+++ b/drm/nouveau/include/nvkm/core/handle.h
diff --git a/nvkm/include/core/ioctl.h b/drm/nouveau/include/nvkm/core/ioctl.h
index ac7935c24..ac7935c24 100644
--- a/nvkm/include/core/ioctl.h
+++ b/drm/nouveau/include/nvkm/core/ioctl.h
diff --git a/nvkm/include/core/mm.h b/drm/nouveau/include/nvkm/core/mm.h
index bfe693154..bfe693154 100644
--- a/nvkm/include/core/mm.h
+++ b/drm/nouveau/include/nvkm/core/mm.h
diff --git a/nvkm/include/core/namedb.h b/drm/nouveau/include/nvkm/core/namedb.h
index 98e666b1e..98e666b1e 100644
--- a/nvkm/include/core/namedb.h
+++ b/drm/nouveau/include/nvkm/core/namedb.h
diff --git a/nvkm/include/core/notify.h b/drm/nouveau/include/nvkm/core/notify.h
index a7c3c5f57..a7c3c5f57 100644
--- a/nvkm/include/core/notify.h
+++ b/drm/nouveau/include/nvkm/core/notify.h
diff --git a/nvkm/include/core/object.h b/drm/nouveau/include/nvkm/core/object.h
index 64c0038f1..64c0038f1 100644
--- a/nvkm/include/core/object.h
+++ b/drm/nouveau/include/nvkm/core/object.h
diff --git a/nvkm/include/core/option.h b/drm/nouveau/include/nvkm/core/option.h
index ed0558478..ed0558478 100644
--- a/nvkm/include/core/option.h
+++ b/drm/nouveau/include/nvkm/core/option.h
diff --git a/drm/nouveau/include/nvkm/core/os.h b/drm/nouveau/include/nvkm/core/os.h
new file mode 100644
index 000000000..cd57e238d
--- /dev/null
+++ b/drm/nouveau/include/nvkm/core/os.h
@@ -0,0 +1,4 @@
+#ifndef __NVKM_OS_H__
+#define __NVKM_OS_H__
+#include <nvif/os.h>
+#endif
diff --git a/nvkm/include/core/parent.h b/drm/nouveau/include/nvkm/core/parent.h
index 4e2345a5c..4e2345a5c 100644
--- a/nvkm/include/core/parent.h
+++ b/drm/nouveau/include/nvkm/core/parent.h
diff --git a/nvkm/include/core/printk.h b/drm/nouveau/include/nvkm/core/printk.h
index 451b6ed20..451b6ed20 100644
--- a/nvkm/include/core/printk.h
+++ b/drm/nouveau/include/nvkm/core/printk.h
diff --git a/nvkm/include/core/ramht.h b/drm/nouveau/include/nvkm/core/ramht.h
index e51014337..e51014337 100644
--- a/nvkm/include/core/ramht.h
+++ b/drm/nouveau/include/nvkm/core/ramht.h
diff --git a/nvkm/include/core/subdev.h b/drm/nouveau/include/nvkm/core/subdev.h
index 68f1c419d..68f1c419d 100644
--- a/nvkm/include/core/subdev.h
+++ b/drm/nouveau/include/nvkm/core/subdev.h
diff --git a/nvkm/include/engine/bsp.h b/drm/nouveau/include/nvkm/engine/bsp.h
index 67662e2c4..67662e2c4 100644
--- a/nvkm/include/engine/bsp.h
+++ b/drm/nouveau/include/nvkm/engine/bsp.h
diff --git a/nvkm/include/engine/copy.h b/drm/nouveau/include/nvkm/engine/copy.h
index 316a28ae5..316a28ae5 100644
--- a/nvkm/include/engine/copy.h
+++ b/drm/nouveau/include/nvkm/engine/copy.h
diff --git a/nvkm/include/engine/crypt.h b/drm/nouveau/include/nvkm/engine/crypt.h
index db975618e..db975618e 100644
--- a/nvkm/include/engine/crypt.h
+++ b/drm/nouveau/include/nvkm/engine/crypt.h
diff --git a/nvkm/include/engine/device.h b/drm/nouveau/include/nvkm/engine/device.h
index 672d3c8f4..672d3c8f4 100644
--- a/nvkm/include/engine/device.h
+++ b/drm/nouveau/include/nvkm/engine/device.h
diff --git a/nvkm/include/engine/disp.h b/drm/nouveau/include/nvkm/engine/disp.h
index 626508d8d..626508d8d 100644
--- a/nvkm/include/engine/disp.h
+++ b/drm/nouveau/include/nvkm/engine/disp.h
diff --git a/nvkm/include/engine/dmaobj.h b/drm/nouveau/include/nvkm/engine/dmaobj.h
index 1b283a7b7..1b283a7b7 100644
--- a/nvkm/include/engine/dmaobj.h
+++ b/drm/nouveau/include/nvkm/engine/dmaobj.h
diff --git a/nvkm/include/engine/falcon.h b/drm/nouveau/include/nvkm/engine/falcon.h
index 181aa7da5..181aa7da5 100644
--- a/nvkm/include/engine/falcon.h
+++ b/drm/nouveau/include/nvkm/engine/falcon.h
diff --git a/nvkm/include/engine/fifo.h b/drm/nouveau/include/nvkm/engine/fifo.h
index 27f05de8f..27f05de8f 100644
--- a/nvkm/include/engine/fifo.h
+++ b/drm/nouveau/include/nvkm/engine/fifo.h
diff --git a/nvkm/include/engine/graph.h b/drm/nouveau/include/nvkm/engine/graph.h
index d61dcb7d6..d61dcb7d6 100644
--- a/nvkm/include/engine/graph.h
+++ b/drm/nouveau/include/nvkm/engine/graph.h
diff --git a/nvkm/include/engine/mpeg.h b/drm/nouveau/include/nvkm/engine/mpeg.h
index 9b0d93819..9b0d93819 100644
--- a/nvkm/include/engine/mpeg.h
+++ b/drm/nouveau/include/nvkm/engine/mpeg.h
diff --git a/nvkm/include/engine/perfmon.h b/drm/nouveau/include/nvkm/engine/perfmon.h
index 251c8545c..251c8545c 100644
--- a/nvkm/include/engine/perfmon.h
+++ b/drm/nouveau/include/nvkm/engine/perfmon.h
diff --git a/nvkm/include/engine/ppp.h b/drm/nouveau/include/nvkm/engine/ppp.h
index 0a66781e8..0a66781e8 100644
--- a/nvkm/include/engine/ppp.h
+++ b/drm/nouveau/include/nvkm/engine/ppp.h
diff --git a/nvkm/include/engine/software.h b/drm/nouveau/include/nvkm/engine/software.h
index 23a462b50..23a462b50 100644
--- a/nvkm/include/engine/software.h
+++ b/drm/nouveau/include/nvkm/engine/software.h
diff --git a/nvkm/include/engine/vp.h b/drm/nouveau/include/nvkm/engine/vp.h
index 39baebec7..39baebec7 100644
--- a/nvkm/include/engine/vp.h
+++ b/drm/nouveau/include/nvkm/engine/vp.h
diff --git a/nvkm/include/engine/xtensa.h b/drm/nouveau/include/nvkm/engine/xtensa.h
index 306100f31..306100f31 100644
--- a/nvkm/include/engine/xtensa.h
+++ b/drm/nouveau/include/nvkm/engine/xtensa.h
diff --git a/nvkm/include/subdev/bar.h b/drm/nouveau/include/nvkm/subdev/bar.h
index 960e33a30..960e33a30 100644
--- a/nvkm/include/subdev/bar.h
+++ b/drm/nouveau/include/nvkm/subdev/bar.h
diff --git a/nvkm/include/subdev/bios.h b/drm/nouveau/include/nvkm/subdev/bios.h
index 39528a9f3..39528a9f3 100644
--- a/nvkm/include/subdev/bios.h
+++ b/drm/nouveau/include/nvkm/subdev/bios.h
diff --git a/nvkm/include/subdev/bios/M0203.h b/drm/nouveau/include/nvkm/subdev/bios/M0203.h
index 1f84d3612..1f84d3612 100644
--- a/nvkm/include/subdev/bios/M0203.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/M0203.h
diff --git a/nvkm/include/subdev/bios/M0205.h b/drm/nouveau/include/nvkm/subdev/bios/M0205.h
index e171120ce..e171120ce 100644
--- a/nvkm/include/subdev/bios/M0205.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/M0205.h
diff --git a/nvkm/include/subdev/bios/M0209.h b/drm/nouveau/include/nvkm/subdev/bios/M0209.h
index 67dc50d83..67dc50d83 100644
--- a/nvkm/include/subdev/bios/M0209.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/M0209.h
diff --git a/nvkm/include/subdev/bios/P0260.h b/drm/nouveau/include/nvkm/subdev/bios/P0260.h
index bba01ab1e..bba01ab1e 100644
--- a/nvkm/include/subdev/bios/P0260.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/P0260.h
diff --git a/nvkm/include/subdev/bios/bit.h b/drm/nouveau/include/nvkm/subdev/bios/bit.h
index 73f060b07..73f060b07 100644
--- a/nvkm/include/subdev/bios/bit.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/bit.h
diff --git a/nvkm/include/subdev/bios/bmp.h b/drm/nouveau/include/nvkm/subdev/bios/bmp.h
index 10e4dbca6..10e4dbca6 100644
--- a/nvkm/include/subdev/bios/bmp.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/bmp.h
diff --git a/nvkm/include/subdev/bios/boost.h b/drm/nouveau/include/nvkm/subdev/bios/boost.h
index 662b20726..662b20726 100644
--- a/nvkm/include/subdev/bios/boost.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/boost.h
diff --git a/nvkm/include/subdev/bios/conn.h b/drm/nouveau/include/nvkm/subdev/bios/conn.h
index f3930c27c..f3930c27c 100644
--- a/nvkm/include/subdev/bios/conn.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/conn.h
diff --git a/nvkm/include/subdev/bios/cstep.h b/drm/nouveau/include/nvkm/subdev/bios/cstep.h
index a80a43809..a80a43809 100644
--- a/nvkm/include/subdev/bios/cstep.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/cstep.h
diff --git a/nvkm/include/subdev/bios/dcb.h b/drm/nouveau/include/nvkm/subdev/bios/dcb.h
index 123270e98..123270e98 100644
--- a/nvkm/include/subdev/bios/dcb.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/dcb.h
diff --git a/nvkm/include/subdev/bios/disp.h b/drm/nouveau/include/nvkm/subdev/bios/disp.h
index c35937e2f..c35937e2f 100644
--- a/nvkm/include/subdev/bios/disp.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/disp.h
diff --git a/nvkm/include/subdev/bios/dp.h b/drm/nouveau/include/nvkm/subdev/bios/dp.h
index 728206e21..728206e21 100644
--- a/nvkm/include/subdev/bios/dp.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/dp.h
diff --git a/nvkm/include/subdev/bios/extdev.h b/drm/nouveau/include/nvkm/subdev/bios/extdev.h
index 949fee3af..949fee3af 100644
--- a/nvkm/include/subdev/bios/extdev.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/extdev.h
diff --git a/nvkm/include/subdev/bios/fan.h b/drm/nouveau/include/nvkm/subdev/bios/fan.h
index 119d0874e..119d0874e 100644
--- a/nvkm/include/subdev/bios/fan.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/fan.h
diff --git a/nvkm/include/subdev/bios/gpio.h b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
index c7b2e586b..c7b2e586b 100644
--- a/nvkm/include/subdev/bios/gpio.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/gpio.h
diff --git a/nvkm/include/subdev/bios/i2c.h b/drm/nouveau/include/nvkm/subdev/bios/i2c.h
index c9bb11289..c9bb11289 100644
--- a/nvkm/include/subdev/bios/i2c.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/i2c.h
diff --git a/nvkm/include/subdev/bios/image.h b/drm/nouveau/include/nvkm/subdev/bios/image.h
index 3348b4580..3348b4580 100644
--- a/nvkm/include/subdev/bios/image.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/image.h
diff --git a/nvkm/include/subdev/bios/init.h b/drm/nouveau/include/nvkm/subdev/bios/init.h
index ca2f6bf37..ca2f6bf37 100644
--- a/nvkm/include/subdev/bios/init.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/init.h
diff --git a/nvkm/include/subdev/bios/mxm.h b/drm/nouveau/include/nvkm/subdev/bios/mxm.h
index 5572e6041..5572e6041 100644
--- a/nvkm/include/subdev/bios/mxm.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/mxm.h
diff --git a/nvkm/include/subdev/bios/npde.h b/drm/nouveau/include/nvkm/subdev/bios/npde.h
index b18413d95..b18413d95 100644
--- a/nvkm/include/subdev/bios/npde.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/npde.h
diff --git a/nvkm/include/subdev/bios/pcir.h b/drm/nouveau/include/nvkm/subdev/bios/pcir.h
index 3d634a06d..3d634a06d 100644
--- a/nvkm/include/subdev/bios/pcir.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/pcir.h
diff --git a/nvkm/include/subdev/bios/perf.h b/drm/nouveau/include/nvkm/subdev/bios/perf.h
index 16ff06ec2..16ff06ec2 100644
--- a/nvkm/include/subdev/bios/perf.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/perf.h
diff --git a/nvkm/include/subdev/bios/pll.h b/drm/nouveau/include/nvkm/subdev/bios/pll.h
index b2f3d4d0a..b2f3d4d0a 100644
--- a/nvkm/include/subdev/bios/pll.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/pll.h
diff --git a/nvkm/include/subdev/bios/pmu.h b/drm/nouveau/include/nvkm/subdev/bios/pmu.h
index 9de593dea..9de593dea 100644
--- a/nvkm/include/subdev/bios/pmu.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/pmu.h
diff --git a/nvkm/include/subdev/bios/ramcfg.h b/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h
index 4a0e0ceb4..4a0e0ceb4 100644
--- a/nvkm/include/subdev/bios/ramcfg.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/ramcfg.h
diff --git a/nvkm/include/subdev/bios/rammap.h b/drm/nouveau/include/nvkm/subdev/bios/rammap.h
index 47e021d3e..47e021d3e 100644
--- a/nvkm/include/subdev/bios/rammap.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/rammap.h
diff --git a/nvkm/include/subdev/bios/therm.h b/drm/nouveau/include/nvkm/subdev/bios/therm.h
index 295d093f3..295d093f3 100644
--- a/nvkm/include/subdev/bios/therm.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/therm.h
diff --git a/nvkm/include/subdev/bios/timing.h b/drm/nouveau/include/nvkm/subdev/bios/timing.h
index 76d914b67..76d914b67 100644
--- a/nvkm/include/subdev/bios/timing.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/timing.h
diff --git a/nvkm/include/subdev/bios/vmap.h b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
index ad5a8f20e..ad5a8f20e 100644
--- a/nvkm/include/subdev/bios/vmap.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
diff --git a/nvkm/include/subdev/bios/volt.h b/drm/nouveau/include/nvkm/subdev/bios/volt.h
index 6a11dcd59..6a11dcd59 100644
--- a/nvkm/include/subdev/bios/volt.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/volt.h
diff --git a/nvkm/include/subdev/bios/xpio.h b/drm/nouveau/include/nvkm/subdev/bios/xpio.h
index 360baab52..360baab52 100644
--- a/nvkm/include/subdev/bios/xpio.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/xpio.h
diff --git a/nvkm/include/subdev/bus.h b/drm/nouveau/include/nvkm/subdev/bus.h
index 2d40f0c2f..2d40f0c2f 100644
--- a/nvkm/include/subdev/bus.h
+++ b/drm/nouveau/include/nvkm/subdev/bus.h
diff --git a/nvkm/include/subdev/clock.h b/drm/nouveau/include/nvkm/subdev/clock.h
index 39ad2d2ce..39ad2d2ce 100644
--- a/nvkm/include/subdev/clock.h
+++ b/drm/nouveau/include/nvkm/subdev/clock.h
diff --git a/nvkm/include/subdev/devinit.h b/drm/nouveau/include/nvkm/subdev/devinit.h
index b627d5329..b627d5329 100644
--- a/nvkm/include/subdev/devinit.h
+++ b/drm/nouveau/include/nvkm/subdev/devinit.h
diff --git a/nvkm/include/subdev/fb.h b/drm/nouveau/include/nvkm/subdev/fb.h
index 889603fbb..889603fbb 100644
--- a/nvkm/include/subdev/fb.h
+++ b/drm/nouveau/include/nvkm/subdev/fb.h
diff --git a/nvkm/include/subdev/fuse.h b/drm/nouveau/include/nvkm/subdev/fuse.h
index cc6b02fec..cc6b02fec 100644
--- a/nvkm/include/subdev/fuse.h
+++ b/drm/nouveau/include/nvkm/subdev/fuse.h
diff --git a/nvkm/include/subdev/gpio.h b/drm/nouveau/include/nvkm/subdev/gpio.h
index 8b60c5de6..8b60c5de6 100644
--- a/nvkm/include/subdev/gpio.h
+++ b/drm/nouveau/include/nvkm/subdev/gpio.h
diff --git a/nvkm/include/subdev/i2c.h b/drm/nouveau/include/nvkm/subdev/i2c.h
index a400e67f2..a400e67f2 100644
--- a/nvkm/include/subdev/i2c.h
+++ b/drm/nouveau/include/nvkm/subdev/i2c.h
diff --git a/nvkm/include/subdev/ibus.h b/drm/nouveau/include/nvkm/subdev/ibus.h
index b6387d27e..b6387d27e 100644
--- a/nvkm/include/subdev/ibus.h
+++ b/drm/nouveau/include/nvkm/subdev/ibus.h
diff --git a/nvkm/include/subdev/instmem.h b/drm/nouveau/include/nvkm/subdev/instmem.h
index 4953e6c6c..4953e6c6c 100644
--- a/nvkm/include/subdev/instmem.h
+++ b/drm/nouveau/include/nvkm/subdev/instmem.h
diff --git a/nvkm/include/subdev/ltc.h b/drm/nouveau/include/nvkm/subdev/ltc.h
index 432717a42..432717a42 100644
--- a/nvkm/include/subdev/ltc.h
+++ b/drm/nouveau/include/nvkm/subdev/ltc.h
diff --git a/nvkm/include/subdev/mc.h b/drm/nouveau/include/nvkm/subdev/mc.h
index af7926f3a..af7926f3a 100644
--- a/nvkm/include/subdev/mc.h
+++ b/drm/nouveau/include/nvkm/subdev/mc.h
diff --git a/nvkm/include/subdev/mxm.h b/drm/nouveau/include/nvkm/subdev/mxm.h
index 94b8af23c..94b8af23c 100644
--- a/nvkm/include/subdev/mxm.h
+++ b/drm/nouveau/include/nvkm/subdev/mxm.h
diff --git a/nvkm/include/subdev/pwr.h b/drm/nouveau/include/nvkm/subdev/pwr.h
index 83f85ac15..83f85ac15 100644
--- a/nvkm/include/subdev/pwr.h
+++ b/drm/nouveau/include/nvkm/subdev/pwr.h
diff --git a/nvkm/include/subdev/therm.h b/drm/nouveau/include/nvkm/subdev/therm.h
index 42f9574a0..42f9574a0 100644
--- a/nvkm/include/subdev/therm.h
+++ b/drm/nouveau/include/nvkm/subdev/therm.h
diff --git a/nvkm/include/subdev/timer.h b/drm/nouveau/include/nvkm/subdev/timer.h
index 36b5184e3..36b5184e3 100644
--- a/nvkm/include/subdev/timer.h
+++ b/drm/nouveau/include/nvkm/subdev/timer.h
diff --git a/nvkm/include/subdev/vga.h b/drm/nouveau/include/nvkm/subdev/vga.h
index fee09ad81..fee09ad81 100644
--- a/nvkm/include/subdev/vga.h
+++ b/drm/nouveau/include/nvkm/subdev/vga.h
diff --git a/nvkm/include/subdev/vm.h b/drm/nouveau/include/nvkm/subdev/vm.h
index d56585f1c..d56585f1c 100644
--- a/nvkm/include/subdev/vm.h
+++ b/drm/nouveau/include/nvkm/subdev/vm.h
diff --git a/nvkm/include/subdev/volt.h b/drm/nouveau/include/nvkm/subdev/volt.h
index 13e9a83ce..13e9a83ce 100644
--- a/nvkm/include/subdev/volt.h
+++ b/drm/nouveau/include/nvkm/subdev/volt.h
diff --git a/drm/uapi/drm/nouveau_drm.h b/drm/nouveau/include/uapi/drm/nouveau_drm.h
index 0d7608dc1..0d7608dc1 100644
--- a/drm/uapi/drm/nouveau_drm.h
+++ b/drm/nouveau/include/uapi/drm/nouveau_drm.h
diff --git a/drm/nouveau_abi16.c b/drm/nouveau/nouveau_abi16.c
index d39a15000..d39a15000 100644
--- a/drm/nouveau_abi16.c
+++ b/drm/nouveau/nouveau_abi16.c
diff --git a/drm/nouveau_abi16.h b/drm/nouveau/nouveau_abi16.h
index 39844e6bf..39844e6bf 100644
--- a/drm/nouveau_abi16.h
+++ b/drm/nouveau/nouveau_abi16.h
diff --git a/drm/nouveau_acpi.c b/drm/nouveau/nouveau_acpi.c
index 622424692..622424692 100644
--- a/drm/nouveau_acpi.c
+++ b/drm/nouveau/nouveau_acpi.c
diff --git a/drm/nouveau_acpi.h b/drm/nouveau/nouveau_acpi.h
index 74acf0f87..74acf0f87 100644
--- a/drm/nouveau_acpi.h
+++ b/drm/nouveau/nouveau_acpi.h
diff --git a/drm/nouveau_agp.c b/drm/nouveau/nouveau_agp.c
index 1f6f6ba68..1f6f6ba68 100644
--- a/drm/nouveau_agp.c
+++ b/drm/nouveau/nouveau_agp.c
diff --git a/drm/nouveau_agp.h b/drm/nouveau/nouveau_agp.h
index b55c08652..b55c08652 100644
--- a/drm/nouveau_agp.h
+++ b/drm/nouveau/nouveau_agp.h
diff --git a/drm/nouveau_backlight.c b/drm/nouveau/nouveau_backlight.c
index e566c5b53..e566c5b53 100644
--- a/drm/nouveau_backlight.c
+++ b/drm/nouveau/nouveau_backlight.c
diff --git a/drm/nouveau_bios.c b/drm/nouveau/nouveau_bios.c
index 7df6acc8b..7df6acc8b 100644
--- a/drm/nouveau_bios.c
+++ b/drm/nouveau/nouveau_bios.c
diff --git a/drm/nouveau_bios.h b/drm/nouveau/nouveau_bios.h
index 0067586eb..0067586eb 100644
--- a/drm/nouveau_bios.h
+++ b/drm/nouveau/nouveau_bios.h
diff --git a/drm/nouveau_bo.c b/drm/nouveau/nouveau_bo.c
index d96fe3524..d96fe3524 100644
--- a/drm/nouveau_bo.c
+++ b/drm/nouveau/nouveau_bo.c
diff --git a/drm/nouveau_bo.h b/drm/nouveau/nouveau_bo.h
index 302aa63b8..302aa63b8 100644
--- a/drm/nouveau_bo.h
+++ b/drm/nouveau/nouveau_bo.h
diff --git a/drm/nouveau_chan.c b/drm/nouveau/nouveau_chan.c
index aff9099aa..aff9099aa 100644
--- a/drm/nouveau_chan.c
+++ b/drm/nouveau/nouveau_chan.c
diff --git a/drm/nouveau_chan.h b/drm/nouveau/nouveau_chan.h
index 8309c24ee..8309c24ee 100644
--- a/drm/nouveau_chan.h
+++ b/drm/nouveau/nouveau_chan.h
diff --git a/drm/nouveau_connector.c b/drm/nouveau/nouveau_connector.c
index 9c871f93c..9c871f93c 100644
--- a/drm/nouveau_connector.c
+++ b/drm/nouveau/nouveau_connector.c
diff --git a/drm/nouveau_connector.h b/drm/nouveau/nouveau_connector.h
index a2d099142..a2d099142 100644
--- a/drm/nouveau_connector.h
+++ b/drm/nouveau/nouveau_connector.h
diff --git a/drm/nouveau_crtc.h b/drm/nouveau/nouveau_crtc.h
index f19cb1c5f..f19cb1c5f 100644
--- a/drm/nouveau_crtc.h
+++ b/drm/nouveau/nouveau_crtc.h
diff --git a/drm/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c
index 5392e07ed..5392e07ed 100644
--- a/drm/nouveau_debugfs.c
+++ b/drm/nouveau/nouveau_debugfs.c
diff --git a/drm/nouveau_debugfs.h b/drm/nouveau/nouveau_debugfs.h
index a62af6fb5..a62af6fb5 100644
--- a/drm/nouveau_debugfs.h
+++ b/drm/nouveau/nouveau_debugfs.h
diff --git a/drm/nouveau_display.c b/drm/nouveau/nouveau_display.c
index f972e9c1a..f972e9c1a 100644
--- a/drm/nouveau_display.c
+++ b/drm/nouveau/nouveau_display.c
diff --git a/drm/nouveau_display.h b/drm/nouveau/nouveau_display.h
index be3d5947c..be3d5947c 100644
--- a/drm/nouveau_display.h
+++ b/drm/nouveau/nouveau_display.h
diff --git a/drm/nouveau_dma.c b/drm/nouveau/nouveau_dma.c
index 8508603cc..8508603cc 100644
--- a/drm/nouveau_dma.c
+++ b/drm/nouveau/nouveau_dma.c
diff --git a/drm/nouveau_dma.h b/drm/nouveau/nouveau_dma.h
index 8da0a272c..8da0a272c 100644
--- a/drm/nouveau_dma.h
+++ b/drm/nouveau/nouveau_dma.h
diff --git a/drm/nouveau_dp.c b/drm/nouveau/nouveau_dp.c
index c5137cccc..c5137cccc 100644
--- a/drm/nouveau_dp.c
+++ b/drm/nouveau/nouveau_dp.c
diff --git a/drm/nouveau_drm.c b/drm/nouveau/nouveau_drm.c
index 1118efa56..1118efa56 100644
--- a/drm/nouveau_drm.c
+++ b/drm/nouveau/nouveau_drm.c
diff --git a/drm/nouveau_drm.h b/drm/nouveau/nouveau_drm.h
index 8ae36f265..8ae36f265 100644
--- a/drm/nouveau_drm.h
+++ b/drm/nouveau/nouveau_drm.h
diff --git a/drm/nouveau_encoder.h b/drm/nouveau/nouveau_encoder.h
index 5f0e37fc2..5f0e37fc2 100644
--- a/drm/nouveau_encoder.h
+++ b/drm/nouveau/nouveau_encoder.h
diff --git a/drm/nouveau_fbcon.c b/drm/nouveau/nouveau_fbcon.c
index d6e6958bc..d6e6958bc 100644
--- a/drm/nouveau_fbcon.c
+++ b/drm/nouveau/nouveau_fbcon.c
diff --git a/drm/nouveau_fbcon.h b/drm/nouveau/nouveau_fbcon.h
index 1e2e9e27a..1e2e9e27a 100644
--- a/drm/nouveau_fbcon.h
+++ b/drm/nouveau/nouveau_fbcon.h
diff --git a/drm/nouveau_fence.c b/drm/nouveau/nouveau_fence.c
index f32a43472..f32a43472 100644
--- a/drm/nouveau_fence.c
+++ b/drm/nouveau/nouveau_fence.c
diff --git a/drm/nouveau_fence.h b/drm/nouveau/nouveau_fence.h
index 96e461c6f..96e461c6f 100644
--- a/drm/nouveau_fence.h
+++ b/drm/nouveau/nouveau_fence.h
diff --git a/drm/nouveau_gem.c b/drm/nouveau/nouveau_gem.c
index 9eb8af4da..9eb8af4da 100644
--- a/drm/nouveau_gem.c
+++ b/drm/nouveau/nouveau_gem.c
diff --git a/drm/nouveau_gem.h b/drm/nouveau/nouveau_gem.h
index e4049faca..e4049faca 100644
--- a/drm/nouveau_gem.h
+++ b/drm/nouveau/nouveau_gem.h
diff --git a/drm/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c
index afb36d66e..afb36d66e 100644
--- a/drm/nouveau_hwmon.c
+++ b/drm/nouveau/nouveau_hwmon.c
diff --git a/drm/nouveau_hwmon.h b/drm/nouveau/nouveau_hwmon.h
index 62ccbb398..62ccbb398 100644
--- a/drm/nouveau_hwmon.h
+++ b/drm/nouveau/nouveau_hwmon.h
diff --git a/drm/nouveau_ioc32.c b/drm/nouveau/nouveau_ioc32.c
index 462679a8f..462679a8f 100644
--- a/drm/nouveau_ioc32.c
+++ b/drm/nouveau/nouveau_ioc32.c
diff --git a/drm/nouveau_ioctl.h b/drm/nouveau/nouveau_ioctl.h
index 3b9f2e546..3b9f2e546 100644
--- a/drm/nouveau_ioctl.h
+++ b/drm/nouveau/nouveau_ioctl.h
diff --git a/drm/nouveau_nvif.c b/drm/nouveau/nouveau_nvif.c
index 6544b84f0..6544b84f0 100644
--- a/drm/nouveau_nvif.c
+++ b/drm/nouveau/nouveau_nvif.c
diff --git a/drm/nouveau_platform.c b/drm/nouveau/nouveau_platform.c
index 34d78b288..34d78b288 100644
--- a/drm/nouveau_platform.c
+++ b/drm/nouveau/nouveau_platform.c
diff --git a/drm/nouveau_platform.h b/drm/nouveau/nouveau_platform.h
index ca22c5253..ca22c5253 100644
--- a/drm/nouveau_platform.h
+++ b/drm/nouveau/nouveau_platform.h
diff --git a/drm/nouveau_prime.c b/drm/nouveau/nouveau_prime.c
index dd32ad6db..dd32ad6db 100644
--- a/drm/nouveau_prime.c
+++ b/drm/nouveau/nouveau_prime.c
diff --git a/drm/nouveau_reg.h b/drm/nouveau/nouveau_reg.h
index 43a96b99e..43a96b99e 100644
--- a/drm/nouveau_reg.h
+++ b/drm/nouveau/nouveau_reg.h
diff --git a/drm/nouveau_sgdma.c b/drm/nouveau/nouveau_sgdma.c
index 23c377a6c..23c377a6c 100644
--- a/drm/nouveau_sgdma.c
+++ b/drm/nouveau/nouveau_sgdma.c
diff --git a/drm/nouveau_sysfs.c b/drm/nouveau/nouveau_sysfs.c
index 8fbbf3093..8fbbf3093 100644
--- a/drm/nouveau_sysfs.c
+++ b/drm/nouveau/nouveau_sysfs.c
diff --git a/drm/nouveau_sysfs.h b/drm/nouveau/nouveau_sysfs.h
index 4e5ea9241..4e5ea9241 100644
--- a/drm/nouveau_sysfs.h
+++ b/drm/nouveau/nouveau_sysfs.h
diff --git a/drm/nouveau_ttm.c b/drm/nouveau/nouveau_ttm.c
index 3d1cfcb96..2e0d1d998 100644
--- a/drm/nouveau_ttm.c
+++ b/drm/nouveau/nouveau_ttm.c
@@ -203,7 +203,7 @@ const struct ttm_mem_type_manager_func nouveau_gart_manager = {
};
/*XXX*/
-#include <core/subdev/vm/nv04.h>
+#include <subdev/vm/nv04.h>
static int
nv04_gart_manager_init(struct ttm_mem_type_manager *man, unsigned long psize)
{
diff --git a/drm/nouveau_ttm.h b/drm/nouveau/nouveau_ttm.h
index 25b0de413..25b0de413 100644
--- a/drm/nouveau_ttm.h
+++ b/drm/nouveau/nouveau_ttm.h
diff --git a/drm/nouveau_usif.c b/drm/nouveau/nouveau_usif.c
index cb1182d7e..cb1182d7e 100644
--- a/drm/nouveau_usif.c
+++ b/drm/nouveau/nouveau_usif.c
diff --git a/drm/nouveau_usif.h b/drm/nouveau/nouveau_usif.h
index c037e3ae8..c037e3ae8 100644
--- a/drm/nouveau_usif.h
+++ b/drm/nouveau/nouveau_usif.h
diff --git a/drm/nouveau_vga.c b/drm/nouveau/nouveau_vga.c
index c7592ec8e..c7592ec8e 100644
--- a/drm/nouveau_vga.c
+++ b/drm/nouveau/nouveau_vga.c
diff --git a/drm/nouveau_vga.h b/drm/nouveau/nouveau_vga.h
index ea3ad6974..ea3ad6974 100644
--- a/drm/nouveau_vga.h
+++ b/drm/nouveau/nouveau_vga.h
diff --git a/drm/nv04_fbcon.c b/drm/nouveau/nv04_fbcon.c
index 4ef602c54..4ef602c54 100644
--- a/drm/nv04_fbcon.c
+++ b/drm/nouveau/nv04_fbcon.c
diff --git a/drm/nv04_fence.c b/drm/nouveau/nv04_fence.c
index f9859deb1..f9859deb1 100644
--- a/drm/nv04_fence.c
+++ b/drm/nouveau/nv04_fence.c
diff --git a/drm/nv10_fence.c b/drm/nouveau/nv10_fence.c
index 5e1ea1cdc..5e1ea1cdc 100644
--- a/drm/nv10_fence.c
+++ b/drm/nouveau/nv10_fence.c
diff --git a/drm/nv10_fence.h b/drm/nouveau/nv10_fence.h
index a87259f39..a87259f39 100644
--- a/drm/nv10_fence.h
+++ b/drm/nouveau/nv10_fence.h
diff --git a/drm/nv17_fence.c b/drm/nouveau/nv17_fence.c
index 57860cfa1..57860cfa1 100644
--- a/drm/nv17_fence.c
+++ b/drm/nouveau/nv17_fence.c
diff --git a/drm/nv50_display.c b/drm/nouveau/nv50_display.c
index 113e8cdb0..113e8cdb0 100644
--- a/drm/nv50_display.c
+++ b/drm/nouveau/nv50_display.c
diff --git a/drm/nv50_display.h b/drm/nouveau/nv50_display.h
index 70da347aa..70da347aa 100644
--- a/drm/nv50_display.h
+++ b/drm/nouveau/nv50_display.h
diff --git a/drm/nv50_fbcon.c b/drm/nouveau/nv50_fbcon.c
index 394c89abc..394c89abc 100644
--- a/drm/nv50_fbcon.c
+++ b/drm/nouveau/nv50_fbcon.c
diff --git a/drm/nv50_fence.c b/drm/nouveau/nv50_fence.c
index a82d9ea7c..a82d9ea7c 100644
--- a/drm/nv50_fence.c
+++ b/drm/nouveau/nv50_fence.c
diff --git a/drm/nv84_fence.c b/drm/nouveau/nv84_fence.c
index cb5b88938..cb5b88938 100644
--- a/drm/nv84_fence.c
+++ b/drm/nouveau/nv84_fence.c
diff --git a/drm/nvc0_fbcon.c b/drm/nouveau/nvc0_fbcon.c
index 61246677e..61246677e 100644
--- a/drm/nvc0_fbcon.c
+++ b/drm/nouveau/nvc0_fbcon.c
diff --git a/drm/nvc0_fence.c b/drm/nouveau/nvc0_fence.c
index becf19abd..becf19abd 100644
--- a/drm/nvc0_fence.c
+++ b/drm/nouveau/nvc0_fence.c
diff --git a/drm/nouveau/nvif/Kbuild b/drm/nouveau/nvif/Kbuild
new file mode 100644
index 000000000..ff8ed3a04
--- /dev/null
+++ b/drm/nouveau/nvif/Kbuild
@@ -0,0 +1,4 @@
+nvif-y := nvif/object.o
+nvif-y += nvif/client.o
+nvif-y += nvif/device.o
+nvif-y += nvif/notify.o
diff --git a/nvif/client.c b/drm/nouveau/nvif/client.c
index 3f7ac5bc8..80b968442 100644
--- a/nvif/client.c
+++ b/drm/nouveau/nvif/client.c
@@ -22,9 +22,9 @@
* Authors: Ben Skeggs <bskeggs@redhat.com>
*/
-#include "client.h"
-#include "driver.h"
-#include "ioctl.h"
+#include <nvif/client.h>
+#include <nvif/driver.h>
+#include <nvif/ioctl.h>
int
nvif_client_ioctl(struct nvif_client *client, void *data, u32 size)
diff --git a/nvif/device.c b/drm/nouveau/nvif/device.c
index f47757972..6f72244c5 100644
--- a/nvif/device.c
+++ b/drm/nouveau/nvif/device.c
@@ -22,7 +22,7 @@
* Authors: Ben Skeggs <bskeggs@redhat.com>
*/
-#include "device.h"
+#include <nvif/device.h>
void
nvif_device_fini(struct nvif_device *device)
diff --git a/nvif/notify.c b/drm/nouveau/nvif/notify.c
index 0898c3155..0898c3155 100644
--- a/nvif/notify.c
+++ b/drm/nouveau/nvif/notify.c
diff --git a/nvif/object.c b/drm/nouveau/nvif/object.c
index dd85b56f6..3ab4e2f8c 100644
--- a/nvif/object.c
+++ b/drm/nouveau/nvif/object.c
@@ -22,10 +22,10 @@
* Authors: Ben Skeggs <bskeggs@redhat.com>
*/
-#include "object.h"
-#include "client.h"
-#include "driver.h"
-#include "ioctl.h"
+#include <nvif/object.h>
+#include <nvif/client.h>
+#include <nvif/driver.h>
+#include <nvif/ioctl.h>
int
nvif_object_ioctl(struct nvif_object *object, void *data, u32 size, void **hack)
diff --git a/drm/nouveau/nvkm/Kbuild b/drm/nouveau/nvkm/Kbuild
new file mode 100644
index 000000000..2832147b6
--- /dev/null
+++ b/drm/nouveau/nvkm/Kbuild
@@ -0,0 +1,3 @@
+include $(src)/nvkm/core/Kbuild
+include $(src)/nvkm/subdev/Kbuild
+include $(src)/nvkm/engine/Kbuild
diff --git a/drm/nouveau/nvkm/core/Kbuild b/drm/nouveau/nvkm/core/Kbuild
new file mode 100644
index 000000000..a2bdb2069
--- /dev/null
+++ b/drm/nouveau/nvkm/core/Kbuild
@@ -0,0 +1,17 @@
+nvkm-y := nvkm/core/client.o
+nvkm-y += nvkm/core/engctx.o
+nvkm-y += nvkm/core/engine.o
+nvkm-y += nvkm/core/enum.o
+nvkm-y += nvkm/core/event.o
+nvkm-y += nvkm/core/gpuobj.o
+nvkm-y += nvkm/core/handle.o
+nvkm-y += nvkm/core/ioctl.o
+nvkm-y += nvkm/core/mm.o
+nvkm-y += nvkm/core/namedb.o
+nvkm-y += nvkm/core/notify.o
+nvkm-y += nvkm/core/object.o
+nvkm-y += nvkm/core/option.o
+nvkm-y += nvkm/core/parent.o
+nvkm-y += nvkm/core/printk.o
+nvkm-y += nvkm/core/ramht.o
+nvkm-y += nvkm/core/subdev.o
diff --git a/nvkm/core/client.c b/drm/nouveau/nvkm/core/client.c
index acff10387..acff10387 100644
--- a/nvkm/core/client.c
+++ b/drm/nouveau/nvkm/core/client.c
diff --git a/nvkm/core/engctx.c b/drm/nouveau/nvkm/core/engctx.c
index 16f09b128..16f09b128 100644
--- a/nvkm/core/engctx.c
+++ b/drm/nouveau/nvkm/core/engctx.c
diff --git a/nvkm/core/engine.c b/drm/nouveau/nvkm/core/engine.c
index c9414b153..c9414b153 100644
--- a/nvkm/core/engine.c
+++ b/drm/nouveau/nvkm/core/engine.c
diff --git a/nvkm/core/enum.c b/drm/nouveau/nvkm/core/enum.c
index dd434790c..dd434790c 100644
--- a/nvkm/core/enum.c
+++ b/drm/nouveau/nvkm/core/enum.c
diff --git a/nvkm/core/event.c b/drm/nouveau/nvkm/core/event.c
index 760947e38..760947e38 100644
--- a/nvkm/core/event.c
+++ b/drm/nouveau/nvkm/core/event.c
diff --git a/nvkm/core/gpuobj.c b/drm/nouveau/nvkm/core/gpuobj.c
index 0fa64576b..0fa64576b 100644
--- a/nvkm/core/gpuobj.c
+++ b/drm/nouveau/nvkm/core/gpuobj.c
diff --git a/nvkm/core/handle.c b/drm/nouveau/nvkm/core/handle.c
index 13f816cb0..13f816cb0 100644
--- a/nvkm/core/handle.c
+++ b/drm/nouveau/nvkm/core/handle.c
diff --git a/nvkm/core/ioctl.c b/drm/nouveau/nvkm/core/ioctl.c
index bdfabb4a8..bdfabb4a8 100644
--- a/nvkm/core/ioctl.c
+++ b/drm/nouveau/nvkm/core/ioctl.c
diff --git a/nvkm/core/mm.c b/drm/nouveau/nvkm/core/mm.c
index b4f5db66d..b4f5db66d 100644
--- a/nvkm/core/mm.c
+++ b/drm/nouveau/nvkm/core/mm.c
diff --git a/nvkm/core/namedb.c b/drm/nouveau/nvkm/core/namedb.c
index 0594a599f..0594a599f 100644
--- a/nvkm/core/namedb.c
+++ b/drm/nouveau/nvkm/core/namedb.c
diff --git a/nvkm/core/notify.c b/drm/nouveau/nvkm/core/notify.c
index 839a32577..839a32577 100644
--- a/nvkm/core/notify.c
+++ b/drm/nouveau/nvkm/core/notify.c
diff --git a/nvkm/core/object.c b/drm/nouveau/nvkm/core/object.c
index b160860ed..b160860ed 100644
--- a/nvkm/core/object.c
+++ b/drm/nouveau/nvkm/core/object.c
diff --git a/nvkm/core/option.c b/drm/nouveau/nvkm/core/option.c
index 9f6fcc5f6..9f6fcc5f6 100644
--- a/nvkm/core/option.c
+++ b/drm/nouveau/nvkm/core/option.c
diff --git a/nvkm/core/parent.c b/drm/nouveau/nvkm/core/parent.c
index 1f28fa12e..1f28fa12e 100644
--- a/nvkm/core/parent.c
+++ b/drm/nouveau/nvkm/core/parent.c
diff --git a/nvkm/core/printk.c b/drm/nouveau/nvkm/core/printk.c
index ed424f99f..ed424f99f 100644
--- a/nvkm/core/printk.c
+++ b/drm/nouveau/nvkm/core/printk.c
diff --git a/nvkm/core/ramht.c b/drm/nouveau/nvkm/core/ramht.c
index 25cd6f290..25cd6f290 100644
--- a/nvkm/core/ramht.c
+++ b/drm/nouveau/nvkm/core/ramht.c
diff --git a/nvkm/core/subdev.c b/drm/nouveau/nvkm/core/subdev.c
index cb1c49c2e..cb1c49c2e 100644
--- a/nvkm/core/subdev.c
+++ b/drm/nouveau/nvkm/core/subdev.c
diff --git a/drm/nouveau/nvkm/engine/Kbuild b/drm/nouveau/nvkm/engine/Kbuild
new file mode 100644
index 000000000..ebd30be3a
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/Kbuild
@@ -0,0 +1,16 @@
+nvkm-y += nvkm/engine/falcon.o
+nvkm-y += nvkm/engine/xtensa.o
+
+include $(src)/nvkm/engine/bsp/Kbuild
+include $(src)/nvkm/engine/copy/Kbuild
+include $(src)/nvkm/engine/crypt/Kbuild
+include $(src)/nvkm/engine/device/Kbuild
+include $(src)/nvkm/engine/disp/Kbuild
+include $(src)/nvkm/engine/dmaobj/Kbuild
+include $(src)/nvkm/engine/fifo/Kbuild
+include $(src)/nvkm/engine/graph/Kbuild
+include $(src)/nvkm/engine/mpeg/Kbuild
+include $(src)/nvkm/engine/perfmon/Kbuild
+include $(src)/nvkm/engine/ppp/Kbuild
+include $(src)/nvkm/engine/software/Kbuild
+include $(src)/nvkm/engine/vp/Kbuild
diff --git a/drm/nouveau/nvkm/engine/bsp/Kbuild b/drm/nouveau/nvkm/engine/bsp/Kbuild
new file mode 100644
index 000000000..da54c5610
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/bsp/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/engine/bsp/nv84.o
+nvkm-y += nvkm/engine/bsp/nv98.o
+nvkm-y += nvkm/engine/bsp/nvc0.o
+nvkm-y += nvkm/engine/bsp/nve0.o
diff --git a/nvkm/engine/bsp/nv84.c b/drm/nouveau/nvkm/engine/bsp/nv84.c
index 1e8e75c06..1e8e75c06 100644
--- a/nvkm/engine/bsp/nv84.c
+++ b/drm/nouveau/nvkm/engine/bsp/nv84.c
diff --git a/nvkm/engine/bsp/nv98.c b/drm/nouveau/nvkm/engine/bsp/nv98.c
index 6b089e022..6b089e022 100644
--- a/nvkm/engine/bsp/nv98.c
+++ b/drm/nouveau/nvkm/engine/bsp/nv98.c
diff --git a/nvkm/engine/bsp/nvc0.c b/drm/nouveau/nvkm/engine/bsp/nvc0.c
index ce860de43..ce860de43 100644
--- a/nvkm/engine/bsp/nvc0.c
+++ b/drm/nouveau/nvkm/engine/bsp/nvc0.c
diff --git a/nvkm/engine/bsp/nve0.c b/drm/nouveau/nvkm/engine/bsp/nve0.c
index ba6aeca02..ba6aeca02 100644
--- a/nvkm/engine/bsp/nve0.c
+++ b/drm/nouveau/nvkm/engine/bsp/nve0.c
diff --git a/drm/nouveau/nvkm/engine/copy/Kbuild b/drm/nouveau/nvkm/engine/copy/Kbuild
new file mode 100644
index 000000000..d8aa5edba
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/copy/Kbuild
@@ -0,0 +1,3 @@
+nvkm-y += nvkm/engine/copy/nva3.o
+nvkm-y += nvkm/engine/copy/nvc0.o
+nvkm-y += nvkm/engine/copy/nve0.o
diff --git a/nvkm/engine/copy/fuc/nva3.fuc b/drm/nouveau/nvkm/engine/copy/fuc/com.fuc
index 219850d53..33b67dc71 100644
--- a/nvkm/engine/copy/fuc/nva3.fuc
+++ b/drm/nouveau/nvkm/engine/copy/fuc/com.fuc
@@ -30,19 +30,19 @@
* m4 -DNVC0 nva3_copy.fuc | envyas -a -w -m fuc -V nva3 -o nvc0_copy.fuc.h
*/
-ifdef(`NVA3',
+#ifdef NVA3
.section #nva3_pcopy_data
-,
+#else
.section #nvc0_pcopy_data
-)
+#endif
ctx_object: .b32 0
-ifdef(`NVA3',
+#ifdef NVA3
ctx_dma:
ctx_dma_query: .b32 0
ctx_dma_src: .b32 0
ctx_dma_dst: .b32 0
-,)
+#endif
.equ #ctx_dma_count 3
ctx_query_address_high: .b32 0
ctx_query_address_low: .b32 0
@@ -86,14 +86,14 @@ dispatch_table:
// mthd 0x0140, PM_TRIGGER
.b16 0x050 1
.b32 0x00010000 + #cmd_pm_trigger ~0xffffffff
-ifdef(`NVA3', `
+#ifdef NVA3
// mthd 0x0180-0x018c, DMA_
.b16 0x060 #ctx_dma_count
dispatch_dma:
.b32 0x00010000 + #cmd_dma ~0xffffffff
.b32 0x00010000 + #cmd_dma ~0xffffffff
.b32 0x00010000 + #cmd_dma ~0xffffffff
-',)
+#endif
// mthd 0x0200-0x0218, SRC_TILE
.b16 0x80 7
.b32 #ctx_src_tile_mode ~0x00000fff
@@ -134,11 +134,11 @@ dispatch_dma:
.b32 #ctx_query_counter ~0xffffffff
.b16 0x800 0
-ifdef(`NVA3',
+#ifdef NVA3
.section #nva3_pcopy_code
-,
+#else
.section #nvc0_pcopy_code
-)
+#endif
main:
clear b32 $r0
@@ -190,10 +190,10 @@ ih:
swctx:
mov $r4 0x7700
mov $xtargets $r4
-ifdef(`NVA3', `
+#ifdef NVA3
// target 7 hardcoded to ctx dma object
mov $xdbase $r0
-', ` // NVC0
+#else
// read SCRATCH3 to decide if we are PCOPY0 or PCOPY1
mov $r4 0x2100
iord $r4 I[$r4 + 0]
@@ -231,7 +231,7 @@ ifdef(`NVA3', `
shl b32 $r6 24
or $r4 $r6
mov $xdbase $r4
-')
+#endif
// 256-byte context, at start of data segment
mov b32 $r4 $r0
sethi $r4 0x60000
@@ -271,7 +271,7 @@ chsw:
bra e #chsw_finish_load
bset $flags $p1
call #swctx
-ifdef(`NVA3',
+#ifdef NVA3
// load dma objects back into TARGET regs
mov $r5 #ctx_dma
mov $r6 #ctx_dma_count
@@ -282,8 +282,7 @@ ifdef(`NVA3',
iowr I[$r8] $r7
sub b32 $r6 1
bra nc #chsw_load_ctx_dma
-,)
-
+#endif
chsw_finish_load:
mov $r3 2
iowr I[$r2 + 0x200] $r3
@@ -397,7 +396,7 @@ cmd_pm_trigger:
iowr I[$r2] $r3
ret
-ifdef(`NVA3',
+#ifdef NVA3
// SET_DMA_* method handler
//
// Inputs:
@@ -419,7 +418,7 @@ cmd_dma:
shl b32 $r4 6
iowr I[$r4] $r3
ret
-,)
+#endif
// Calculates the hw swizzle mask and adjusts the surface's xcnt to match
//
@@ -548,11 +547,11 @@ cmd_exec_set_surface_tiled:
ld b32 $r7 D[$r5 + #ctx_src_tile_mode]
extr $r9 $r7 8:11
extr $r8 $r7 4:7
-ifdef(`NVA3',
+#ifdef NVA3
add b32 $r8 2
-,
+#else
add b32 $r8 3
-)
+#endif
extr $r7 $r7 0:3
cmp b32 $r7 0xe
bra ne #xtile64
diff --git a/drm/nouveau/nvkm/engine/copy/fuc/nva3.fuc3 b/drm/nouveau/nvkm/engine/copy/fuc/nva3.fuc3
new file mode 100644
index 000000000..e67062022
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/copy/fuc/nva3.fuc3
@@ -0,0 +1,2 @@
+#define NVA3
+#include "com.fuc"
diff --git a/nvkm/engine/copy/fuc/nva3.fuc.h b/drm/nouveau/nvkm/engine/copy/fuc/nva3.fuc3.h
index 241b27201..241b27201 100644
--- a/nvkm/engine/copy/fuc/nva3.fuc.h
+++ b/drm/nouveau/nvkm/engine/copy/fuc/nva3.fuc3.h
diff --git a/drm/nouveau/nvkm/engine/copy/fuc/nvc0.fuc3 b/drm/nouveau/nvkm/engine/copy/fuc/nvc0.fuc3
new file mode 100644
index 000000000..df6866c34
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/copy/fuc/nvc0.fuc3
@@ -0,0 +1,2 @@
+#define NVC0
+#include "com.fuc"
diff --git a/nvkm/engine/copy/fuc/nvc0.fuc.h b/drm/nouveau/nvkm/engine/copy/fuc/nvc0.fuc3.h
index 98cc4216a..98cc4216a 100644
--- a/nvkm/engine/copy/fuc/nvc0.fuc.h
+++ b/drm/nouveau/nvkm/engine/copy/fuc/nvc0.fuc3.h
diff --git a/nvkm/engine/copy/nva3.c b/drm/nouveau/nvkm/engine/copy/nva3.c
index abb410ef0..13c05e09f 100644
--- a/nvkm/engine/copy/nva3.c
+++ b/drm/nouveau/nvkm/engine/copy/nva3.c
@@ -33,7 +33,7 @@
#include <core/enum.h>
-#include "fuc/nva3.fuc.h"
+#include "fuc/nva3.fuc3.h"
struct nva3_copy_priv {
struct nouveau_falcon base;
diff --git a/nvkm/engine/copy/nvc0.c b/drm/nouveau/nvkm/engine/copy/nvc0.c
index 20a8cd7f7..abe324993 100644
--- a/nvkm/engine/copy/nvc0.c
+++ b/drm/nouveau/nvkm/engine/copy/nvc0.c
@@ -29,7 +29,7 @@
#include <core/enum.h>
#include <core/enum.h>
-#include "fuc/nvc0.fuc.h"
+#include "fuc/nvc0.fuc3.h"
struct nvc0_copy_priv {
struct nouveau_falcon base;
diff --git a/nvkm/engine/copy/nve0.c b/drm/nouveau/nvkm/engine/copy/nve0.c
index b140a01dd..b140a01dd 100644
--- a/nvkm/engine/copy/nve0.c
+++ b/drm/nouveau/nvkm/engine/copy/nve0.c
diff --git a/drm/nouveau/nvkm/engine/crypt/Kbuild b/drm/nouveau/nvkm/engine/crypt/Kbuild
new file mode 100644
index 000000000..eaeafdf3b
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/crypt/Kbuild
@@ -0,0 +1,2 @@
+nvkm-y += nvkm/engine/crypt/nv84.o
+nvkm-y += nvkm/engine/crypt/nv98.o
diff --git a/nvkm/engine/crypt/fuc/nv98.fuc b/drm/nouveau/nvkm/engine/crypt/fuc/nv98.fuc0s
index 629da02dc..629da02dc 100644
--- a/nvkm/engine/crypt/fuc/nv98.fuc
+++ b/drm/nouveau/nvkm/engine/crypt/fuc/nv98.fuc0s
diff --git a/nvkm/engine/crypt/fuc/nv98.fuc.h b/drm/nouveau/nvkm/engine/crypt/fuc/nv98.fuc0s.h
index 38676c74e..38676c74e 100644
--- a/nvkm/engine/crypt/fuc/nv98.fuc.h
+++ b/drm/nouveau/nvkm/engine/crypt/fuc/nv98.fuc0s.h
diff --git a/nvkm/engine/crypt/nv84.c b/drm/nouveau/nvkm/engine/crypt/nv84.c
index ea5c42f31..ea5c42f31 100644
--- a/nvkm/engine/crypt/nv84.c
+++ b/drm/nouveau/nvkm/engine/crypt/nv84.c
diff --git a/nvkm/engine/crypt/nv98.c b/drm/nouveau/nvkm/engine/crypt/nv98.c
index 5571c0953..e0838c46e 100644
--- a/nvkm/engine/crypt/nv98.c
+++ b/drm/nouveau/nvkm/engine/crypt/nv98.c
@@ -34,7 +34,7 @@
#include <engine/fifo.h>
#include <engine/crypt.h>
-#include "fuc/nv98.fuc.h"
+#include "fuc/nv98.fuc0s.h"
struct nv98_crypt_priv {
struct nouveau_falcon base;
diff --git a/drm/nouveau/nvkm/engine/device/Kbuild b/drm/nouveau/nvkm/engine/device/Kbuild
new file mode 100644
index 000000000..77d06d46e
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/device/Kbuild
@@ -0,0 +1,12 @@
+nvkm-y += nvkm/engine/device/acpi.o
+nvkm-y += nvkm/engine/device/base.o
+nvkm-y += nvkm/engine/device/ctrl.o
+nvkm-y += nvkm/engine/device/nv04.o
+nvkm-y += nvkm/engine/device/nv10.o
+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/gm100.o
diff --git a/nvkm/engine/device/acpi.c b/drm/nouveau/nvkm/engine/device/acpi.c
index 4dbf0ba89..4dbf0ba89 100644
--- a/nvkm/engine/device/acpi.c
+++ b/drm/nouveau/nvkm/engine/device/acpi.c
diff --git a/nvkm/engine/device/acpi.h b/drm/nouveau/nvkm/engine/device/acpi.h
index cc49f4f56..cc49f4f56 100644
--- a/nvkm/engine/device/acpi.h
+++ b/drm/nouveau/nvkm/engine/device/acpi.h
diff --git a/nvkm/engine/device/base.c b/drm/nouveau/nvkm/engine/device/base.c
index f74f9cbbf..f74f9cbbf 100644
--- a/nvkm/engine/device/base.c
+++ b/drm/nouveau/nvkm/engine/device/base.c
diff --git a/nvkm/engine/device/ctrl.c b/drm/nouveau/nvkm/engine/device/ctrl.c
index e34101a34..e34101a34 100644
--- a/nvkm/engine/device/ctrl.c
+++ b/drm/nouveau/nvkm/engine/device/ctrl.c
diff --git a/nvkm/engine/device/gm100.c b/drm/nouveau/nvkm/engine/device/gm100.c
index 4e74a3376..4e74a3376 100644
--- a/nvkm/engine/device/gm100.c
+++ b/drm/nouveau/nvkm/engine/device/gm100.c
diff --git a/nvkm/engine/device/nv04.c b/drm/nouveau/nvkm/engine/device/nv04.c
index 573b55f5c..573b55f5c 100644
--- a/nvkm/engine/device/nv04.c
+++ b/drm/nouveau/nvkm/engine/device/nv04.c
diff --git a/nvkm/engine/device/nv10.c b/drm/nouveau/nvkm/engine/device/nv10.c
index 183a85a62..183a85a62 100644
--- a/nvkm/engine/device/nv10.c
+++ b/drm/nouveau/nvkm/engine/device/nv10.c
diff --git a/nvkm/engine/device/nv20.c b/drm/nouveau/nvkm/engine/device/nv20.c
index aa564c68a..aa564c68a 100644
--- a/nvkm/engine/device/nv20.c
+++ b/drm/nouveau/nvkm/engine/device/nv20.c
diff --git a/nvkm/engine/device/nv30.c b/drm/nouveau/nvkm/engine/device/nv30.c
index 11bd31da8..11bd31da8 100644
--- a/nvkm/engine/device/nv30.c
+++ b/drm/nouveau/nvkm/engine/device/nv30.c
diff --git a/nvkm/engine/device/nv40.c b/drm/nouveau/nvkm/engine/device/nv40.c
index e96c223cb..e96c223cb 100644
--- a/nvkm/engine/device/nv40.c
+++ b/drm/nouveau/nvkm/engine/device/nv40.c
diff --git a/nvkm/engine/device/nv50.c b/drm/nouveau/nvkm/engine/device/nv50.c
index 96f568d13..96f568d13 100644
--- a/nvkm/engine/device/nv50.c
+++ b/drm/nouveau/nvkm/engine/device/nv50.c
diff --git a/nvkm/engine/device/nvc0.c b/drm/nouveau/nvkm/engine/device/nvc0.c
index 72a40f95d..72a40f95d 100644
--- a/nvkm/engine/device/nvc0.c
+++ b/drm/nouveau/nvkm/engine/device/nvc0.c
diff --git a/nvkm/engine/device/nve0.c b/drm/nouveau/nvkm/engine/device/nve0.c
index d308aee02..d308aee02 100644
--- a/nvkm/engine/device/nve0.c
+++ b/drm/nouveau/nvkm/engine/device/nve0.c
diff --git a/nvkm/engine/device/priv.h b/drm/nouveau/nvkm/engine/device/priv.h
index 035fd5b9c..035fd5b9c 100644
--- a/nvkm/engine/device/priv.h
+++ b/drm/nouveau/nvkm/engine/device/priv.h
diff --git a/drm/nouveau/nvkm/engine/disp/Kbuild b/drm/nouveau/nvkm/engine/disp/Kbuild
new file mode 100644
index 000000000..50bd1e2bb
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/disp/Kbuild
@@ -0,0 +1,29 @@
+nvkm-y += nvkm/engine/disp/base.o
+nvkm-y += nvkm/engine/disp/conn.o
+nvkm-y += nvkm/engine/disp/outp.o
+nvkm-y += nvkm/engine/disp/outpdp.o
+nvkm-y += nvkm/engine/disp/nv04.o
+nvkm-y += nvkm/engine/disp/nv50.o
+nvkm-y += nvkm/engine/disp/nv84.o
+nvkm-y += nvkm/engine/disp/nv94.o
+nvkm-y += nvkm/engine/disp/nva0.o
+nvkm-y += nvkm/engine/disp/nva3.o
+nvkm-y += nvkm/engine/disp/nvd0.o
+nvkm-y += nvkm/engine/disp/nve0.o
+nvkm-y += nvkm/engine/disp/nvf0.o
+nvkm-y += nvkm/engine/disp/gm107.o
+nvkm-y += nvkm/engine/disp/gm204.o
+nvkm-y += nvkm/engine/disp/dacnv50.o
+nvkm-y += nvkm/engine/disp/dport.o
+nvkm-y += nvkm/engine/disp/hdanva3.o
+nvkm-y += nvkm/engine/disp/hdanvd0.o
+nvkm-y += nvkm/engine/disp/hdminv84.o
+nvkm-y += nvkm/engine/disp/hdminva3.o
+nvkm-y += nvkm/engine/disp/hdminvd0.o
+nvkm-y += nvkm/engine/disp/hdminve0.o
+nvkm-y += nvkm/engine/disp/piornv50.o
+nvkm-y += nvkm/engine/disp/sornv50.o
+nvkm-y += nvkm/engine/disp/sornv94.o
+nvkm-y += nvkm/engine/disp/sornvd0.o
+nvkm-y += nvkm/engine/disp/sorgm204.o
+nvkm-y += nvkm/engine/disp/vga.o
diff --git a/nvkm/engine/disp/base.c b/drm/nouveau/nvkm/engine/disp/base.c
index c8a5f810e..c8a5f810e 100644
--- a/nvkm/engine/disp/base.c
+++ b/drm/nouveau/nvkm/engine/disp/base.c
diff --git a/nvkm/engine/disp/conn.c b/drm/nouveau/nvkm/engine/disp/conn.c
index 498ab4b8a..498ab4b8a 100644
--- a/nvkm/engine/disp/conn.c
+++ b/drm/nouveau/nvkm/engine/disp/conn.c
diff --git a/nvkm/engine/disp/conn.h b/drm/nouveau/nvkm/engine/disp/conn.h
index a1bf359e5..a1bf359e5 100644
--- a/nvkm/engine/disp/conn.h
+++ b/drm/nouveau/nvkm/engine/disp/conn.h
diff --git a/nvkm/engine/disp/dacnv50.c b/drm/nouveau/nvkm/engine/disp/dacnv50.c
index b36addff0..b36addff0 100644
--- a/nvkm/engine/disp/dacnv50.c
+++ b/drm/nouveau/nvkm/engine/disp/dacnv50.c
diff --git a/nvkm/engine/disp/dport.c b/drm/nouveau/nvkm/engine/disp/dport.c
index 16db08dfb..16db08dfb 100644
--- a/nvkm/engine/disp/dport.c
+++ b/drm/nouveau/nvkm/engine/disp/dport.c
diff --git a/nvkm/engine/disp/dport.h b/drm/nouveau/nvkm/engine/disp/dport.h
index 5628d2d5e..5628d2d5e 100644
--- a/nvkm/engine/disp/dport.h
+++ b/drm/nouveau/nvkm/engine/disp/dport.h
diff --git a/nvkm/engine/disp/gm107.c b/drm/nouveau/nvkm/engine/disp/gm107.c
index e2ad0543f..e2ad0543f 100644
--- a/nvkm/engine/disp/gm107.c
+++ b/drm/nouveau/nvkm/engine/disp/gm107.c
diff --git a/nvkm/engine/disp/gm204.c b/drm/nouveau/nvkm/engine/disp/gm204.c
index 672ded79b..672ded79b 100644
--- a/nvkm/engine/disp/gm204.c
+++ b/drm/nouveau/nvkm/engine/disp/gm204.c
diff --git a/nvkm/engine/disp/hdanva3.c b/drm/nouveau/nvkm/engine/disp/hdanva3.c
index fe9ef5894..fe9ef5894 100644
--- a/nvkm/engine/disp/hdanva3.c
+++ b/drm/nouveau/nvkm/engine/disp/hdanva3.c
diff --git a/nvkm/engine/disp/hdanvd0.c b/drm/nouveau/nvkm/engine/disp/hdanvd0.c
index 1d4e8432d..1d4e8432d 100644
--- a/nvkm/engine/disp/hdanvd0.c
+++ b/drm/nouveau/nvkm/engine/disp/hdanvd0.c
diff --git a/nvkm/engine/disp/hdminv84.c b/drm/nouveau/nvkm/engine/disp/hdminv84.c
index fa276dede..fa276dede 100644
--- a/nvkm/engine/disp/hdminv84.c
+++ b/drm/nouveau/nvkm/engine/disp/hdminv84.c
diff --git a/nvkm/engine/disp/hdminva3.c b/drm/nouveau/nvkm/engine/disp/hdminva3.c
index 57eeed1d1..57eeed1d1 100644
--- a/nvkm/engine/disp/hdminva3.c
+++ b/drm/nouveau/nvkm/engine/disp/hdminva3.c
diff --git a/nvkm/engine/disp/hdminvd0.c b/drm/nouveau/nvkm/engine/disp/hdminvd0.c
index bac4fc457..bac4fc457 100644
--- a/nvkm/engine/disp/hdminvd0.c
+++ b/drm/nouveau/nvkm/engine/disp/hdminvd0.c
diff --git a/nvkm/engine/disp/hdminve0.c b/drm/nouveau/nvkm/engine/disp/hdminve0.c
index 528d14ec2..528d14ec2 100644
--- a/nvkm/engine/disp/hdminve0.c
+++ b/drm/nouveau/nvkm/engine/disp/hdminve0.c
diff --git a/nvkm/engine/disp/nv04.c b/drm/nouveau/nvkm/engine/disp/nv04.c
index 366f315fc..366f315fc 100644
--- a/nvkm/engine/disp/nv04.c
+++ b/drm/nouveau/nvkm/engine/disp/nv04.c
diff --git a/nvkm/engine/disp/nv50.c b/drm/nouveau/nvkm/engine/disp/nv50.c
index 44a8290aa..44a8290aa 100644
--- a/nvkm/engine/disp/nv50.c
+++ b/drm/nouveau/nvkm/engine/disp/nv50.c
diff --git a/nvkm/engine/disp/nv50.h b/drm/nouveau/nvkm/engine/disp/nv50.h
index 7f08078ee..7f08078ee 100644
--- a/nvkm/engine/disp/nv50.h
+++ b/drm/nouveau/nvkm/engine/disp/nv50.h
diff --git a/nvkm/engine/disp/nv84.c b/drm/nouveau/nvkm/engine/disp/nv84.c
index 13eff5e4e..13eff5e4e 100644
--- a/nvkm/engine/disp/nv84.c
+++ b/drm/nouveau/nvkm/engine/disp/nv84.c
diff --git a/nvkm/engine/disp/nv94.c b/drm/nouveau/nvkm/engine/disp/nv94.c
index 2bb7ac5cd..2bb7ac5cd 100644
--- a/nvkm/engine/disp/nv94.c
+++ b/drm/nouveau/nvkm/engine/disp/nv94.c
diff --git a/nvkm/engine/disp/nva0.c b/drm/nouveau/nvkm/engine/disp/nva0.c
index b32456c94..b32456c94 100644
--- a/nvkm/engine/disp/nva0.c
+++ b/drm/nouveau/nvkm/engine/disp/nva0.c
diff --git a/nvkm/engine/disp/nva3.c b/drm/nouveau/nvkm/engine/disp/nva3.c
index 951d79f9b..951d79f9b 100644
--- a/nvkm/engine/disp/nva3.c
+++ b/drm/nouveau/nvkm/engine/disp/nva3.c
diff --git a/nvkm/engine/disp/nvd0.c b/drm/nouveau/nvkm/engine/disp/nvd0.c
index 181a2d57e..181a2d57e 100644
--- a/nvkm/engine/disp/nvd0.c
+++ b/drm/nouveau/nvkm/engine/disp/nvd0.c
diff --git a/nvkm/engine/disp/nve0.c b/drm/nouveau/nvkm/engine/disp/nve0.c
index 55debec7e..55debec7e 100644
--- a/nvkm/engine/disp/nve0.c
+++ b/drm/nouveau/nvkm/engine/disp/nve0.c
diff --git a/nvkm/engine/disp/nvf0.c b/drm/nouveau/nvkm/engine/disp/nvf0.c
index 3e7e2d287..3e7e2d287 100644
--- a/nvkm/engine/disp/nvf0.c
+++ b/drm/nouveau/nvkm/engine/disp/nvf0.c
diff --git a/nvkm/engine/disp/outp.c b/drm/nouveau/nvkm/engine/disp/outp.c
index c5589c26e..c5589c26e 100644
--- a/nvkm/engine/disp/outp.c
+++ b/drm/nouveau/nvkm/engine/disp/outp.c
diff --git a/nvkm/engine/disp/outp.h b/drm/nouveau/nvkm/engine/disp/outp.h
index 5305aa0f7..5305aa0f7 100644
--- a/nvkm/engine/disp/outp.h
+++ b/drm/nouveau/nvkm/engine/disp/outp.h
diff --git a/nvkm/engine/disp/outpdp.c b/drm/nouveau/nvkm/engine/disp/outpdp.c
index 667a9070e..667a9070e 100644
--- a/nvkm/engine/disp/outpdp.c
+++ b/drm/nouveau/nvkm/engine/disp/outpdp.c
diff --git a/nvkm/engine/disp/outpdp.h b/drm/nouveau/nvkm/engine/disp/outpdp.h
index 1fac367cc..1fac367cc 100644
--- a/nvkm/engine/disp/outpdp.h
+++ b/drm/nouveau/nvkm/engine/disp/outpdp.h
diff --git a/nvkm/engine/disp/piornv50.c b/drm/nouveau/nvkm/engine/disp/piornv50.c
index d00f89a46..d00f89a46 100644
--- a/nvkm/engine/disp/piornv50.c
+++ b/drm/nouveau/nvkm/engine/disp/piornv50.c
diff --git a/nvkm/engine/disp/priv.h b/drm/nouveau/nvkm/engine/disp/priv.h
index 6a0511d54..6a0511d54 100644
--- a/nvkm/engine/disp/priv.h
+++ b/drm/nouveau/nvkm/engine/disp/priv.h
diff --git a/nvkm/engine/disp/sorgm204.c b/drm/nouveau/nvkm/engine/disp/sorgm204.c
index 0b4fad39e..0b4fad39e 100644
--- a/nvkm/engine/disp/sorgm204.c
+++ b/drm/nouveau/nvkm/engine/disp/sorgm204.c
diff --git a/nvkm/engine/disp/sornv50.c b/drm/nouveau/nvkm/engine/disp/sornv50.c
index ddf1760c4..ddf1760c4 100644
--- a/nvkm/engine/disp/sornv50.c
+++ b/drm/nouveau/nvkm/engine/disp/sornv50.c
diff --git a/nvkm/engine/disp/sornv94.c b/drm/nouveau/nvkm/engine/disp/sornv94.c
index 39f85d627..39f85d627 100644
--- a/nvkm/engine/disp/sornv94.c
+++ b/drm/nouveau/nvkm/engine/disp/sornv94.c
diff --git a/nvkm/engine/disp/sornvd0.c b/drm/nouveau/nvkm/engine/disp/sornvd0.c
index fdab29390..fdab29390 100644
--- a/nvkm/engine/disp/sornvd0.c
+++ b/drm/nouveau/nvkm/engine/disp/sornvd0.c
diff --git a/nvkm/engine/disp/vga.c b/drm/nouveau/nvkm/engine/disp/vga.c
index 8836c3cb9..8836c3cb9 100644
--- a/nvkm/engine/disp/vga.c
+++ b/drm/nouveau/nvkm/engine/disp/vga.c
diff --git a/drm/nouveau/nvkm/engine/dmaobj/Kbuild b/drm/nouveau/nvkm/engine/dmaobj/Kbuild
new file mode 100644
index 000000000..4f9286a03
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/dmaobj/Kbuild
@@ -0,0 +1,5 @@
+nvkm-y += nvkm/engine/dmaobj/base.o
+nvkm-y += nvkm/engine/dmaobj/nv04.o
+nvkm-y += nvkm/engine/dmaobj/nv50.o
+nvkm-y += nvkm/engine/dmaobj/nvc0.o
+nvkm-y += nvkm/engine/dmaobj/nvd0.o
diff --git a/nvkm/engine/dmaobj/base.c b/drm/nouveau/nvkm/engine/dmaobj/base.c
index e1500f77a..e1500f77a 100644
--- a/nvkm/engine/dmaobj/base.c
+++ b/drm/nouveau/nvkm/engine/dmaobj/base.c
diff --git a/nvkm/engine/dmaobj/nv04.c b/drm/nouveau/nvkm/engine/dmaobj/nv04.c
index 20c9dbfe3..20c9dbfe3 100644
--- a/nvkm/engine/dmaobj/nv04.c
+++ b/drm/nouveau/nvkm/engine/dmaobj/nv04.c
diff --git a/nvkm/engine/dmaobj/nv50.c b/drm/nouveau/nvkm/engine/dmaobj/nv50.c
index a740ddba2..a740ddba2 100644
--- a/nvkm/engine/dmaobj/nv50.c
+++ b/drm/nouveau/nvkm/engine/dmaobj/nv50.c
diff --git a/nvkm/engine/dmaobj/nvc0.c b/drm/nouveau/nvkm/engine/dmaobj/nvc0.c
index 88ec33b20..88ec33b20 100644
--- a/nvkm/engine/dmaobj/nvc0.c
+++ b/drm/nouveau/nvkm/engine/dmaobj/nvc0.c
diff --git a/nvkm/engine/dmaobj/nvd0.c b/drm/nouveau/nvkm/engine/dmaobj/nvd0.c
index 19f5f6522..19f5f6522 100644
--- a/nvkm/engine/dmaobj/nvd0.c
+++ b/drm/nouveau/nvkm/engine/dmaobj/nvd0.c
diff --git a/nvkm/engine/dmaobj/priv.h b/drm/nouveau/nvkm/engine/dmaobj/priv.h
index 36f743866..36f743866 100644
--- a/nvkm/engine/dmaobj/priv.h
+++ b/drm/nouveau/nvkm/engine/dmaobj/priv.h
diff --git a/nvkm/engine/falcon.c b/drm/nouveau/nvkm/engine/falcon.c
index 2914646c8..2914646c8 100644
--- a/nvkm/engine/falcon.c
+++ b/drm/nouveau/nvkm/engine/falcon.c
diff --git a/drm/nouveau/nvkm/engine/fifo/Kbuild b/drm/nouveau/nvkm/engine/fifo/Kbuild
new file mode 100644
index 000000000..f38820faf
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/fifo/Kbuild
@@ -0,0 +1,11 @@
+nvkm-y += nvkm/engine/fifo/base.o
+nvkm-y += nvkm/engine/fifo/nv04.o
+nvkm-y += nvkm/engine/fifo/nv10.o
+nvkm-y += nvkm/engine/fifo/nv17.o
+nvkm-y += nvkm/engine/fifo/nv40.o
+nvkm-y += nvkm/engine/fifo/nv50.o
+nvkm-y += nvkm/engine/fifo/nv84.o
+nvkm-y += nvkm/engine/fifo/nvc0.o
+nvkm-y += nvkm/engine/fifo/nve0.o
+nvkm-y += nvkm/engine/fifo/gk20a.o
+nvkm-y += nvkm/engine/fifo/nv108.o
diff --git a/nvkm/engine/fifo/base.c b/drm/nouveau/nvkm/engine/fifo/base.c
index 836c6d32e..836c6d32e 100644
--- a/nvkm/engine/fifo/base.c
+++ b/drm/nouveau/nvkm/engine/fifo/base.c
diff --git a/nvkm/engine/fifo/gk20a.c b/drm/nouveau/nvkm/engine/fifo/gk20a.c
index 327456eae..327456eae 100644
--- a/nvkm/engine/fifo/gk20a.c
+++ b/drm/nouveau/nvkm/engine/fifo/gk20a.c
diff --git a/nvkm/engine/fifo/nv04.c b/drm/nouveau/nvkm/engine/fifo/nv04.c
index 6f51ae0da..6f51ae0da 100644
--- a/nvkm/engine/fifo/nv04.c
+++ b/drm/nouveau/nvkm/engine/fifo/nv04.c
diff --git a/nvkm/engine/fifo/nv04.h b/drm/nouveau/nvkm/engine/fifo/nv04.h
index 496a4b4fd..496a4b4fd 100644
--- a/nvkm/engine/fifo/nv04.h
+++ b/drm/nouveau/nvkm/engine/fifo/nv04.h
diff --git a/nvkm/engine/fifo/nv10.c b/drm/nouveau/nvkm/engine/fifo/nv10.c
index 2a32add51..2a32add51 100644
--- a/nvkm/engine/fifo/nv10.c
+++ b/drm/nouveau/nvkm/engine/fifo/nv10.c
diff --git a/nvkm/engine/fifo/nv108.c b/drm/nouveau/nvkm/engine/fifo/nv108.c
index 09362a51b..09362a51b 100644
--- a/nvkm/engine/fifo/nv108.c
+++ b/drm/nouveau/nvkm/engine/fifo/nv108.c
diff --git a/nvkm/engine/fifo/nv17.c b/drm/nouveau/nvkm/engine/fifo/nv17.c
index 01fbb11af..01fbb11af 100644
--- a/nvkm/engine/fifo/nv17.c
+++ b/drm/nouveau/nvkm/engine/fifo/nv17.c
diff --git a/nvkm/engine/fifo/nv40.c b/drm/nouveau/nvkm/engine/fifo/nv40.c
index 604cb5286..604cb5286 100644
--- a/nvkm/engine/fifo/nv40.c
+++ b/drm/nouveau/nvkm/engine/fifo/nv40.c
diff --git a/nvkm/engine/fifo/nv50.c b/drm/nouveau/nvkm/engine/fifo/nv50.c
index 403fafc05..403fafc05 100644
--- a/nvkm/engine/fifo/nv50.c
+++ b/drm/nouveau/nvkm/engine/fifo/nv50.c
diff --git a/nvkm/engine/fifo/nv50.h b/drm/nouveau/nvkm/engine/fifo/nv50.h
index 3a9ceb315..3a9ceb315 100644
--- a/nvkm/engine/fifo/nv50.h
+++ b/drm/nouveau/nvkm/engine/fifo/nv50.h
diff --git a/nvkm/engine/fifo/nv84.c b/drm/nouveau/nvkm/engine/fifo/nv84.c
index b18386b8a..b18386b8a 100644
--- a/nvkm/engine/fifo/nv84.c
+++ b/drm/nouveau/nvkm/engine/fifo/nv84.c
diff --git a/nvkm/engine/fifo/nvc0.c b/drm/nouveau/nvkm/engine/fifo/nvc0.c
index e8ef8cb05..e8ef8cb05 100644
--- a/nvkm/engine/fifo/nvc0.c
+++ b/drm/nouveau/nvkm/engine/fifo/nvc0.c
diff --git a/nvkm/engine/fifo/nve0.c b/drm/nouveau/nvkm/engine/fifo/nve0.c
index c9c168035..c9c168035 100644
--- a/nvkm/engine/fifo/nve0.c
+++ b/drm/nouveau/nvkm/engine/fifo/nve0.c
diff --git a/nvkm/engine/fifo/nve0.h b/drm/nouveau/nvkm/engine/fifo/nve0.h
index e96b32bb1..e96b32bb1 100644
--- a/nvkm/engine/fifo/nve0.h
+++ b/drm/nouveau/nvkm/engine/fifo/nve0.h
diff --git a/drm/nouveau/nvkm/engine/graph/Kbuild b/drm/nouveau/nvkm/engine/graph/Kbuild
new file mode 100644
index 000000000..fd56e9793
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/graph/Kbuild
@@ -0,0 +1,36 @@
+nvkm-y += nvkm/engine/graph/ctxnv40.o
+nvkm-y += nvkm/engine/graph/ctxnv50.o
+nvkm-y += nvkm/engine/graph/ctxnvc0.o
+nvkm-y += nvkm/engine/graph/ctxnvc1.o
+nvkm-y += nvkm/engine/graph/ctxnvc4.o
+nvkm-y += nvkm/engine/graph/ctxnvc8.o
+nvkm-y += nvkm/engine/graph/ctxnvd7.o
+nvkm-y += nvkm/engine/graph/ctxnvd9.o
+nvkm-y += nvkm/engine/graph/ctxnve4.o
+nvkm-y += nvkm/engine/graph/ctxgk20a.o
+nvkm-y += nvkm/engine/graph/ctxnvf0.o
+nvkm-y += nvkm/engine/graph/ctxgk110b.o
+nvkm-y += nvkm/engine/graph/ctxnv108.o
+nvkm-y += nvkm/engine/graph/ctxgm107.o
+nvkm-y += nvkm/engine/graph/nv04.o
+nvkm-y += nvkm/engine/graph/nv10.o
+nvkm-y += nvkm/engine/graph/nv20.o
+nvkm-y += nvkm/engine/graph/nv25.o
+nvkm-y += nvkm/engine/graph/nv2a.o
+nvkm-y += nvkm/engine/graph/nv30.o
+nvkm-y += nvkm/engine/graph/nv34.o
+nvkm-y += nvkm/engine/graph/nv35.o
+nvkm-y += nvkm/engine/graph/nv40.o
+nvkm-y += nvkm/engine/graph/nv50.o
+nvkm-y += nvkm/engine/graph/nvc0.o
+nvkm-y += nvkm/engine/graph/nvc1.o
+nvkm-y += nvkm/engine/graph/nvc4.o
+nvkm-y += nvkm/engine/graph/nvc8.o
+nvkm-y += nvkm/engine/graph/nvd7.o
+nvkm-y += nvkm/engine/graph/nvd9.o
+nvkm-y += nvkm/engine/graph/nve4.o
+nvkm-y += nvkm/engine/graph/gk20a.o
+nvkm-y += nvkm/engine/graph/nvf0.o
+nvkm-y += nvkm/engine/graph/gk110b.o
+nvkm-y += nvkm/engine/graph/nv108.o
+nvkm-y += nvkm/engine/graph/gm107.o
diff --git a/nvkm/engine/graph/ctx.h b/drm/nouveau/nvkm/engine/graph/ctx.h
index e1947013d..e1947013d 100644
--- a/nvkm/engine/graph/ctx.h
+++ b/drm/nouveau/nvkm/engine/graph/ctx.h
diff --git a/nvkm/engine/graph/ctxgk110b.c b/drm/nouveau/nvkm/engine/graph/ctxgk110b.c
index 3adb7fe91..3adb7fe91 100644
--- a/nvkm/engine/graph/ctxgk110b.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxgk110b.c
diff --git a/nvkm/engine/graph/ctxgk20a.c b/drm/nouveau/nvkm/engine/graph/ctxgk20a.c
index 36fc9831c..36fc9831c 100644
--- a/nvkm/engine/graph/ctxgk20a.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxgk20a.c
diff --git a/nvkm/engine/graph/ctxgm107.c b/drm/nouveau/nvkm/engine/graph/ctxgm107.c
index 62e918b9f..62e918b9f 100644
--- a/nvkm/engine/graph/ctxgm107.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxgm107.c
diff --git a/nvkm/engine/graph/ctxnv108.c b/drm/nouveau/nvkm/engine/graph/ctxnv108.c
index ce252adbe..ce252adbe 100644
--- a/nvkm/engine/graph/ctxnv108.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnv108.c
diff --git a/nvkm/engine/graph/ctxnv40.c b/drm/nouveau/nvkm/engine/graph/ctxnv40.c
index 7bbb1e1b7..7bbb1e1b7 100644
--- a/nvkm/engine/graph/ctxnv40.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnv40.c
diff --git a/nvkm/engine/graph/ctxnv50.c b/drm/nouveau/nvkm/engine/graph/ctxnv50.c
index 1d0e33fb5..1d0e33fb5 100644
--- a/nvkm/engine/graph/ctxnv50.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnv50.c
diff --git a/nvkm/engine/graph/ctxnvc0.c b/drm/nouveau/nvkm/engine/graph/ctxnvc0.c
index b8e5fe60a..b8e5fe60a 100644
--- a/nvkm/engine/graph/ctxnvc0.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvc0.c
diff --git a/nvkm/engine/graph/ctxnvc0.h b/drm/nouveau/nvkm/engine/graph/ctxnvc0.h
index c776cd715..c776cd715 100644
--- a/nvkm/engine/graph/ctxnvc0.h
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvc0.h
diff --git a/nvkm/engine/graph/ctxnvc1.c b/drm/nouveau/nvkm/engine/graph/ctxnvc1.c
index c6ba8fed1..c6ba8fed1 100644
--- a/nvkm/engine/graph/ctxnvc1.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvc1.c
diff --git a/nvkm/engine/graph/ctxnvc4.c b/drm/nouveau/nvkm/engine/graph/ctxnvc4.c
index 41705c60c..41705c60c 100644
--- a/nvkm/engine/graph/ctxnvc4.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvc4.c
diff --git a/nvkm/engine/graph/ctxnvc8.c b/drm/nouveau/nvkm/engine/graph/ctxnvc8.c
index 8f804cd8f..8f804cd8f 100644
--- a/nvkm/engine/graph/ctxnvc8.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvc8.c
diff --git a/nvkm/engine/graph/ctxnvd7.c b/drm/nouveau/nvkm/engine/graph/ctxnvd7.c
index fcf534fd9..fcf534fd9 100644
--- a/nvkm/engine/graph/ctxnvd7.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvd7.c
diff --git a/nvkm/engine/graph/ctxnvd9.c b/drm/nouveau/nvkm/engine/graph/ctxnvd9.c
index b9a301b6f..b9a301b6f 100644
--- a/nvkm/engine/graph/ctxnvd9.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvd9.c
diff --git a/nvkm/engine/graph/ctxnve4.c b/drm/nouveau/nvkm/engine/graph/ctxnve4.c
index ccac2ee1a..ccac2ee1a 100644
--- a/nvkm/engine/graph/ctxnve4.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnve4.c
diff --git a/nvkm/engine/graph/ctxnvf0.c b/drm/nouveau/nvkm/engine/graph/ctxnvf0.c
index e9b0dcf95..e9b0dcf95 100644
--- a/nvkm/engine/graph/ctxnvf0.c
+++ b/drm/nouveau/nvkm/engine/graph/ctxnvf0.c
diff --git a/nvkm/engine/graph/fuc/com.fuc b/drm/nouveau/nvkm/engine/graph/fuc/com.fuc
index e37d8106a..e37d8106a 100644
--- a/nvkm/engine/graph/fuc/com.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/com.fuc
diff --git a/nvkm/engine/graph/fuc/gpc.fuc b/drm/nouveau/nvkm/engine/graph/fuc/gpc.fuc
index 7445f12b1..7445f12b1 100644
--- a/nvkm/engine/graph/fuc/gpc.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpc.fuc
diff --git a/nvkm/engine/graph/fuc/gpcgm107.fuc5 b/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5
index e73060389..e73060389 100644
--- a/nvkm/engine/graph/fuc/gpcgm107.fuc5
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5
diff --git a/nvkm/engine/graph/fuc/gpcgm107.fuc5.h b/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5.h
index 6d53b67dd..6d53b67dd 100644
--- a/nvkm/engine/graph/fuc/gpcgm107.fuc5.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5.h
diff --git a/nvkm/engine/graph/fuc/gpcnv108.fuc5 b/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5
index bd30262d6..bd30262d6 100644
--- a/nvkm/engine/graph/fuc/gpcnv108.fuc5
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5
diff --git a/nvkm/engine/graph/fuc/gpcnv108.fuc5.h b/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5.h
index 319227077..319227077 100644
--- a/nvkm/engine/graph/fuc/gpcnv108.fuc5.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5.h
diff --git a/nvkm/engine/graph/fuc/gpcnvc0.fuc b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3
index 5ae06a2d6..5ae06a2d6 100644
--- a/nvkm/engine/graph/fuc/gpcnvc0.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3
diff --git a/nvkm/engine/graph/fuc/gpcnvc0.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3.h
index 325cc7b7b..325cc7b7b 100644
--- a/nvkm/engine/graph/fuc/gpcnvc0.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3.h
diff --git a/nvkm/engine/graph/fuc/gpcnvd7.fuc b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3
index c2f754edb..c2f754edb 100644
--- a/nvkm/engine/graph/fuc/gpcnvd7.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3
diff --git a/nvkm/engine/graph/fuc/gpcnvd7.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3.h
index d1504a405..d1504a405 100644
--- a/nvkm/engine/graph/fuc/gpcnvd7.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3.h
diff --git a/nvkm/engine/graph/fuc/gpcnve0.fuc b/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3
index 6b906cd2a..6b906cd2a 100644
--- a/nvkm/engine/graph/fuc/gpcnve0.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3
diff --git a/nvkm/engine/graph/fuc/gpcnve0.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3.h
index 855b22037..855b22037 100644
--- a/nvkm/engine/graph/fuc/gpcnve0.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3.h
diff --git a/nvkm/engine/graph/fuc/gpcnvf0.fuc b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3
index 90bbe525b..90bbe525b 100644
--- a/nvkm/engine/graph/fuc/gpcnvf0.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3
diff --git a/nvkm/engine/graph/fuc/gpcnvf0.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3.h
index 1b803197d..1b803197d 100644
--- a/nvkm/engine/graph/fuc/gpcnvf0.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3.h
diff --git a/nvkm/engine/graph/fuc/hub.fuc b/drm/nouveau/nvkm/engine/graph/fuc/hub.fuc
index b4ad18bf5..b4ad18bf5 100644
--- a/nvkm/engine/graph/fuc/hub.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hub.fuc
diff --git a/nvkm/engine/graph/fuc/hubgm107.fuc5 b/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5
index 27591b308..27591b308 100644
--- a/nvkm/engine/graph/fuc/hubgm107.fuc5
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5
diff --git a/nvkm/engine/graph/fuc/hubgm107.fuc5.h b/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5.h
index 5f953c5c2..5f953c5c2 100644
--- a/nvkm/engine/graph/fuc/hubgm107.fuc5.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5.h
diff --git a/nvkm/engine/graph/fuc/hubnv108.fuc5 b/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5
index 7c5d25630..7c5d25630 100644
--- a/nvkm/engine/graph/fuc/hubnv108.fuc5
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5
diff --git a/nvkm/engine/graph/fuc/hubnv108.fuc5.h b/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5.h
index e49b5a877..e49b5a877 100644
--- a/nvkm/engine/graph/fuc/hubnv108.fuc5.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5.h
diff --git a/nvkm/engine/graph/fuc/hubnvc0.fuc b/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3
index 3ff52badf..3ff52badf 100644
--- a/nvkm/engine/graph/fuc/hubnvc0.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3
diff --git a/nvkm/engine/graph/fuc/hubnvc0.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3.h
index 92dfe6a4a..92dfe6a4a 100644
--- a/nvkm/engine/graph/fuc/hubnvc0.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3.h
diff --git a/nvkm/engine/graph/fuc/hubnvd7.fuc b/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3
index afbe03ac9..afbe03ac9 100644
--- a/nvkm/engine/graph/fuc/hubnvd7.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3
diff --git a/nvkm/engine/graph/fuc/hubnvd7.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3.h
index 62b0c7601..62b0c7601 100644
--- a/nvkm/engine/graph/fuc/hubnvd7.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3.h
diff --git a/nvkm/engine/graph/fuc/hubnve0.fuc b/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3
index d4840f187..d4840f187 100644
--- a/nvkm/engine/graph/fuc/hubnve0.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3
diff --git a/nvkm/engine/graph/fuc/hubnve0.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3.h
index 51c3797d8..51c3797d8 100644
--- a/nvkm/engine/graph/fuc/hubnve0.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3.h
diff --git a/nvkm/engine/graph/fuc/hubnvf0.fuc b/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3
index ec42ed29b..ec42ed29b 100644
--- a/nvkm/engine/graph/fuc/hubnvf0.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3
diff --git a/nvkm/engine/graph/fuc/hubnvf0.fuc.h b/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3.h
index a0af4b703..a0af4b703 100644
--- a/nvkm/engine/graph/fuc/hubnvf0.fuc.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3.h
diff --git a/nvkm/engine/graph/fuc/macros.fuc b/drm/nouveau/nvkm/engine/graph/fuc/macros.fuc
index 2a0b0f844..2a0b0f844 100644
--- a/nvkm/engine/graph/fuc/macros.fuc
+++ b/drm/nouveau/nvkm/engine/graph/fuc/macros.fuc
diff --git a/nvkm/engine/graph/fuc/os.h b/drm/nouveau/nvkm/engine/graph/fuc/os.h
index 1718ae4e8..1718ae4e8 100644
--- a/nvkm/engine/graph/fuc/os.h
+++ b/drm/nouveau/nvkm/engine/graph/fuc/os.h
diff --git a/nvkm/engine/graph/gk110b.c b/drm/nouveau/nvkm/engine/graph/gk110b.c
index d07b19dc1..d07b19dc1 100644
--- a/nvkm/engine/graph/gk110b.c
+++ b/drm/nouveau/nvkm/engine/graph/gk110b.c
diff --git a/nvkm/engine/graph/gk20a.c b/drm/nouveau/nvkm/engine/graph/gk20a.c
index 7d0abe9f3..7d0abe9f3 100644
--- a/nvkm/engine/graph/gk20a.c
+++ b/drm/nouveau/nvkm/engine/graph/gk20a.c
diff --git a/nvkm/engine/graph/gm107.c b/drm/nouveau/nvkm/engine/graph/gm107.c
index 4bdbdab2f..4bdbdab2f 100644
--- a/nvkm/engine/graph/gm107.c
+++ b/drm/nouveau/nvkm/engine/graph/gm107.c
diff --git a/nvkm/engine/graph/nv04.c b/drm/nouveau/nvkm/engine/graph/nv04.c
index f70e2f67a..f70e2f67a 100644
--- a/nvkm/engine/graph/nv04.c
+++ b/drm/nouveau/nvkm/engine/graph/nv04.c
diff --git a/nvkm/engine/graph/nv10.c b/drm/nouveau/nvkm/engine/graph/nv10.c
index 2b12b0968..2b12b0968 100644
--- a/nvkm/engine/graph/nv10.c
+++ b/drm/nouveau/nvkm/engine/graph/nv10.c
diff --git a/nvkm/engine/graph/nv108.c b/drm/nouveau/nvkm/engine/graph/nv108.c
index 2b0e8f48c..2b0e8f48c 100644
--- a/nvkm/engine/graph/nv108.c
+++ b/drm/nouveau/nvkm/engine/graph/nv108.c
diff --git a/nvkm/engine/graph/nv20.c b/drm/nouveau/nvkm/engine/graph/nv20.c
index ceb9c746d..ceb9c746d 100644
--- a/nvkm/engine/graph/nv20.c
+++ b/drm/nouveau/nvkm/engine/graph/nv20.c
diff --git a/nvkm/engine/graph/nv20.h b/drm/nouveau/nvkm/engine/graph/nv20.h
index 2bea7313e..2bea7313e 100644
--- a/nvkm/engine/graph/nv20.h
+++ b/drm/nouveau/nvkm/engine/graph/nv20.h
diff --git a/nvkm/engine/graph/nv25.c b/drm/nouveau/nvkm/engine/graph/nv25.c
index f8a6fdd7d..f8a6fdd7d 100644
--- a/nvkm/engine/graph/nv25.c
+++ b/drm/nouveau/nvkm/engine/graph/nv25.c
diff --git a/nvkm/engine/graph/nv2a.c b/drm/nouveau/nvkm/engine/graph/nv2a.c
index 5de9caa2e..5de9caa2e 100644
--- a/nvkm/engine/graph/nv2a.c
+++ b/drm/nouveau/nvkm/engine/graph/nv2a.c
diff --git a/nvkm/engine/graph/nv30.c b/drm/nouveau/nvkm/engine/graph/nv30.c
index 2f9dbc709..2f9dbc709 100644
--- a/nvkm/engine/graph/nv30.c
+++ b/drm/nouveau/nvkm/engine/graph/nv30.c
diff --git a/nvkm/engine/graph/nv34.c b/drm/nouveau/nvkm/engine/graph/nv34.c
index 34dd26c70..34dd26c70 100644
--- a/nvkm/engine/graph/nv34.c
+++ b/drm/nouveau/nvkm/engine/graph/nv34.c
diff --git a/nvkm/engine/graph/nv35.c b/drm/nouveau/nvkm/engine/graph/nv35.c
index 2fb5756d9..2fb5756d9 100644
--- a/nvkm/engine/graph/nv35.c
+++ b/drm/nouveau/nvkm/engine/graph/nv35.c
diff --git a/nvkm/engine/graph/nv40.c b/drm/nouveau/nvkm/engine/graph/nv40.c
index 4f4011748..4f4011748 100644
--- a/nvkm/engine/graph/nv40.c
+++ b/drm/nouveau/nvkm/engine/graph/nv40.c
diff --git a/nvkm/engine/graph/nv40.h b/drm/nouveau/nvkm/engine/graph/nv40.h
index ad8209377..ad8209377 100644
--- a/nvkm/engine/graph/nv40.h
+++ b/drm/nouveau/nvkm/engine/graph/nv40.h
diff --git a/nvkm/engine/graph/nv50.c b/drm/nouveau/nvkm/engine/graph/nv50.c
index 38e0aa26f..38e0aa26f 100644
--- a/nvkm/engine/graph/nv50.c
+++ b/drm/nouveau/nvkm/engine/graph/nv50.c
diff --git a/nvkm/engine/graph/nv50.h b/drm/nouveau/nvkm/engine/graph/nv50.h
index 0505fb419..0505fb419 100644
--- a/nvkm/engine/graph/nv50.h
+++ b/drm/nouveau/nvkm/engine/graph/nv50.h
diff --git a/nvkm/engine/graph/nvc0.c b/drm/nouveau/nvkm/engine/graph/nvc0.c
index 17251e4b9..3e90e437d 100644
--- a/nvkm/engine/graph/nvc0.c
+++ b/drm/nouveau/nvkm/engine/graph/nvc0.c
@@ -1630,7 +1630,7 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return 0;
}
-#include "fuc/hubnvc0.fuc.h"
+#include "fuc/hubnvc0.fuc3.h"
struct nvc0_graph_ucode
nvc0_graph_fecs_ucode = {
@@ -1640,7 +1640,7 @@ nvc0_graph_fecs_ucode = {
.data.size = sizeof(nvc0_grhub_data),
};
-#include "fuc/gpcnvc0.fuc.h"
+#include "fuc/gpcnvc0.fuc3.h"
struct nvc0_graph_ucode
nvc0_graph_gpccs_ucode = {
diff --git a/nvkm/engine/graph/nvc0.h b/drm/nouveau/nvkm/engine/graph/nvc0.h
index 7ed9e89c3..7ed9e89c3 100644
--- a/nvkm/engine/graph/nvc0.h
+++ b/drm/nouveau/nvkm/engine/graph/nvc0.h
diff --git a/nvkm/engine/graph/nvc1.c b/drm/nouveau/nvkm/engine/graph/nvc1.c
index 93d58e5b8..93d58e5b8 100644
--- a/nvkm/engine/graph/nvc1.c
+++ b/drm/nouveau/nvkm/engine/graph/nvc1.c
diff --git a/nvkm/engine/graph/nvc4.c b/drm/nouveau/nvkm/engine/graph/nvc4.c
index e82e70c53..e82e70c53 100644
--- a/nvkm/engine/graph/nvc4.c
+++ b/drm/nouveau/nvkm/engine/graph/nvc4.c
diff --git a/nvkm/engine/graph/nvc8.c b/drm/nouveau/nvkm/engine/graph/nvc8.c
index 692e1eda0..692e1eda0 100644
--- a/nvkm/engine/graph/nvc8.c
+++ b/drm/nouveau/nvkm/engine/graph/nvc8.c
diff --git a/nvkm/engine/graph/nvd7.c b/drm/nouveau/nvkm/engine/graph/nvd7.c
index 41e8445c7..6f9f5ede5 100644
--- a/nvkm/engine/graph/nvd7.c
+++ b/drm/nouveau/nvkm/engine/graph/nvd7.c
@@ -99,7 +99,7 @@ nvd7_graph_pack_mmio[] = {
* PGRAPH engine/subdev functions
******************************************************************************/
-#include "fuc/hubnvd7.fuc.h"
+#include "fuc/hubnvd7.fuc3.h"
struct nvc0_graph_ucode
nvd7_graph_fecs_ucode = {
@@ -109,7 +109,7 @@ nvd7_graph_fecs_ucode = {
.data.size = sizeof(nvd7_grhub_data),
};
-#include "fuc/gpcnvd7.fuc.h"
+#include "fuc/gpcnvd7.fuc3.h"
struct nvc0_graph_ucode
nvd7_graph_gpccs_ucode = {
diff --git a/nvkm/engine/graph/nvd9.c b/drm/nouveau/nvkm/engine/graph/nvd9.c
index 00fdf202f..00fdf202f 100644
--- a/nvkm/engine/graph/nvd9.c
+++ b/drm/nouveau/nvkm/engine/graph/nvd9.c
diff --git a/nvkm/engine/graph/nve4.c b/drm/nouveau/nvkm/engine/graph/nve4.c
index 0c71f5c67..83a966fc5 100644
--- a/nvkm/engine/graph/nve4.c
+++ b/drm/nouveau/nvkm/engine/graph/nve4.c
@@ -309,7 +309,7 @@ nve4_graph_init(struct nouveau_object *object)
return nvc0_graph_init_ctxctl(priv);
}
-#include "fuc/hubnve0.fuc.h"
+#include "fuc/hubnve0.fuc3.h"
static struct nvc0_graph_ucode
nve4_graph_fecs_ucode = {
@@ -319,7 +319,7 @@ nve4_graph_fecs_ucode = {
.data.size = sizeof(nve0_grhub_data),
};
-#include "fuc/gpcnve0.fuc.h"
+#include "fuc/gpcnve0.fuc3.h"
static struct nvc0_graph_ucode
nve4_graph_gpccs_ucode = {
diff --git a/nvkm/engine/graph/nvf0.c b/drm/nouveau/nvkm/engine/graph/nvf0.c
index c306c0f2f..73f77fa04 100644
--- a/nvkm/engine/graph/nvf0.c
+++ b/drm/nouveau/nvkm/engine/graph/nvf0.c
@@ -207,7 +207,7 @@ nvf0_graph_fini(struct nouveau_object *object, bool suspend)
return nouveau_graph_fini(&priv->base, suspend);
}
-#include "fuc/hubnvf0.fuc.h"
+#include "fuc/hubnvf0.fuc3.h"
struct nvc0_graph_ucode
nvf0_graph_fecs_ucode = {
@@ -217,7 +217,7 @@ nvf0_graph_fecs_ucode = {
.data.size = sizeof(nvf0_grhub_data),
};
-#include "fuc/gpcnvf0.fuc.h"
+#include "fuc/gpcnvf0.fuc3.h"
struct nvc0_graph_ucode
nvf0_graph_gpccs_ucode = {
diff --git a/nvkm/engine/graph/regs.h b/drm/nouveau/nvkm/engine/graph/regs.h
index fde8e2441..fde8e2441 100644
--- a/nvkm/engine/graph/regs.h
+++ b/drm/nouveau/nvkm/engine/graph/regs.h
diff --git a/drm/nouveau/nvkm/engine/mpeg/Kbuild b/drm/nouveau/nvkm/engine/mpeg/Kbuild
new file mode 100644
index 000000000..39a045bca
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/mpeg/Kbuild
@@ -0,0 +1,5 @@
+nvkm-y += nvkm/engine/mpeg/nv31.o
+nvkm-y += nvkm/engine/mpeg/nv40.o
+nvkm-y += nvkm/engine/mpeg/nv44.o
+nvkm-y += nvkm/engine/mpeg/nv50.o
+nvkm-y += nvkm/engine/mpeg/nv84.o
diff --git a/nvkm/engine/mpeg/nv31.c b/drm/nouveau/nvkm/engine/mpeg/nv31.c
index d88c700b2..d88c700b2 100644
--- a/nvkm/engine/mpeg/nv31.c
+++ b/drm/nouveau/nvkm/engine/mpeg/nv31.c
diff --git a/nvkm/engine/mpeg/nv31.h b/drm/nouveau/nvkm/engine/mpeg/nv31.h
index d08629d0b..d08629d0b 100644
--- a/nvkm/engine/mpeg/nv31.h
+++ b/drm/nouveau/nvkm/engine/mpeg/nv31.h
diff --git a/nvkm/engine/mpeg/nv40.c b/drm/nouveau/nvkm/engine/mpeg/nv40.c
index bdb2f20ff..bdb2f20ff 100644
--- a/nvkm/engine/mpeg/nv40.c
+++ b/drm/nouveau/nvkm/engine/mpeg/nv40.c
diff --git a/nvkm/engine/mpeg/nv44.c b/drm/nouveau/nvkm/engine/mpeg/nv44.c
index 72c7f33fd..72c7f33fd 100644
--- a/nvkm/engine/mpeg/nv44.c
+++ b/drm/nouveau/nvkm/engine/mpeg/nv44.c
diff --git a/nvkm/engine/mpeg/nv50.c b/drm/nouveau/nvkm/engine/mpeg/nv50.c
index cae33f86b..cae33f86b 100644
--- a/nvkm/engine/mpeg/nv50.c
+++ b/drm/nouveau/nvkm/engine/mpeg/nv50.c
diff --git a/nvkm/engine/mpeg/nv84.c b/drm/nouveau/nvkm/engine/mpeg/nv84.c
index e9cc8b116..e9cc8b116 100644
--- a/nvkm/engine/mpeg/nv84.c
+++ b/drm/nouveau/nvkm/engine/mpeg/nv84.c
diff --git a/drm/nouveau/nvkm/engine/perfmon/Kbuild b/drm/nouveau/nvkm/engine/perfmon/Kbuild
new file mode 100644
index 000000000..d5f574c4e
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/perfmon/Kbuild
@@ -0,0 +1,9 @@
+nvkm-y += nvkm/engine/perfmon/base.o
+nvkm-y += nvkm/engine/perfmon/daemon.o
+nvkm-y += nvkm/engine/perfmon/nv40.o
+nvkm-y += nvkm/engine/perfmon/nv50.o
+nvkm-y += nvkm/engine/perfmon/nv84.o
+nvkm-y += nvkm/engine/perfmon/nva3.o
+nvkm-y += nvkm/engine/perfmon/nvc0.o
+nvkm-y += nvkm/engine/perfmon/nve0.o
+nvkm-y += nvkm/engine/perfmon/nvf0.o
diff --git a/nvkm/engine/perfmon/base.c b/drm/nouveau/nvkm/engine/perfmon/base.c
index 63013812f..63013812f 100644
--- a/nvkm/engine/perfmon/base.c
+++ b/drm/nouveau/nvkm/engine/perfmon/base.c
diff --git a/nvkm/engine/perfmon/daemon.c b/drm/nouveau/nvkm/engine/perfmon/daemon.c
index 50696cc7b..50696cc7b 100644
--- a/nvkm/engine/perfmon/daemon.c
+++ b/drm/nouveau/nvkm/engine/perfmon/daemon.c
diff --git a/nvkm/engine/perfmon/nv40.c b/drm/nouveau/nvkm/engine/perfmon/nv40.c
index b2a10785a..b2a10785a 100644
--- a/nvkm/engine/perfmon/nv40.c
+++ b/drm/nouveau/nvkm/engine/perfmon/nv40.c
diff --git a/nvkm/engine/perfmon/nv40.h b/drm/nouveau/nvkm/engine/perfmon/nv40.h
index 1b5792d1d..1b5792d1d 100644
--- a/nvkm/engine/perfmon/nv40.h
+++ b/drm/nouveau/nvkm/engine/perfmon/nv40.h
diff --git a/nvkm/engine/perfmon/nv50.c b/drm/nouveau/nvkm/engine/perfmon/nv50.c
index 94217691f..94217691f 100644
--- a/nvkm/engine/perfmon/nv50.c
+++ b/drm/nouveau/nvkm/engine/perfmon/nv50.c
diff --git a/nvkm/engine/perfmon/nv84.c b/drm/nouveau/nvkm/engine/perfmon/nv84.c
index 9232c7fc6..9232c7fc6 100644
--- a/nvkm/engine/perfmon/nv84.c
+++ b/drm/nouveau/nvkm/engine/perfmon/nv84.c
diff --git a/nvkm/engine/perfmon/nva3.c b/drm/nouveau/nvkm/engine/perfmon/nva3.c
index 6197ebdeb..6197ebdeb 100644
--- a/nvkm/engine/perfmon/nva3.c
+++ b/drm/nouveau/nvkm/engine/perfmon/nva3.c
diff --git a/nvkm/engine/perfmon/nvc0.c b/drm/nouveau/nvkm/engine/perfmon/nvc0.c
index 74b241042..74b241042 100644
--- a/nvkm/engine/perfmon/nvc0.c
+++ b/drm/nouveau/nvkm/engine/perfmon/nvc0.c
diff --git a/nvkm/engine/perfmon/nvc0.h b/drm/nouveau/nvkm/engine/perfmon/nvc0.h
index f66bca484..f66bca484 100644
--- a/nvkm/engine/perfmon/nvc0.h
+++ b/drm/nouveau/nvkm/engine/perfmon/nvc0.h
diff --git a/nvkm/engine/perfmon/nve0.c b/drm/nouveau/nvkm/engine/perfmon/nve0.c
index 71d718c12..71d718c12 100644
--- a/nvkm/engine/perfmon/nve0.c
+++ b/drm/nouveau/nvkm/engine/perfmon/nve0.c
diff --git a/nvkm/engine/perfmon/nvf0.c b/drm/nouveau/nvkm/engine/perfmon/nvf0.c
index 47256f78a..47256f78a 100644
--- a/nvkm/engine/perfmon/nvf0.c
+++ b/drm/nouveau/nvkm/engine/perfmon/nvf0.c
diff --git a/nvkm/engine/perfmon/priv.h b/drm/nouveau/nvkm/engine/perfmon/priv.h
index 0ac8714fe..0ac8714fe 100644
--- a/nvkm/engine/perfmon/priv.h
+++ b/drm/nouveau/nvkm/engine/perfmon/priv.h
diff --git a/drm/nouveau/nvkm/engine/ppp/Kbuild b/drm/nouveau/nvkm/engine/ppp/Kbuild
new file mode 100644
index 000000000..0c1de976f
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/ppp/Kbuild
@@ -0,0 +1,2 @@
+nvkm-y += nvkm/engine/ppp/nv98.o
+nvkm-y += nvkm/engine/ppp/nvc0.o
diff --git a/nvkm/engine/ppp/nv98.c b/drm/nouveau/nvkm/engine/ppp/nv98.c
index 13bf31c40..13bf31c40 100644
--- a/nvkm/engine/ppp/nv98.c
+++ b/drm/nouveau/nvkm/engine/ppp/nv98.c
diff --git a/nvkm/engine/ppp/nvc0.c b/drm/nouveau/nvkm/engine/ppp/nvc0.c
index 73719aaa6..73719aaa6 100644
--- a/nvkm/engine/ppp/nvc0.c
+++ b/drm/nouveau/nvkm/engine/ppp/nvc0.c
diff --git a/drm/nouveau/nvkm/engine/software/Kbuild b/drm/nouveau/nvkm/engine/software/Kbuild
new file mode 100644
index 000000000..e1332a15d
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/software/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/engine/software/nv04.o
+nvkm-y += nvkm/engine/software/nv10.o
+nvkm-y += nvkm/engine/software/nv50.o
+nvkm-y += nvkm/engine/software/nvc0.o
diff --git a/nvkm/engine/software/nv04.c b/drm/nouveau/nvkm/engine/software/nv04.c
index 64df15c7f..64df15c7f 100644
--- a/nvkm/engine/software/nv04.c
+++ b/drm/nouveau/nvkm/engine/software/nv04.c
diff --git a/nvkm/engine/software/nv10.c b/drm/nouveau/nvkm/engine/software/nv10.c
index f54a2253d..f54a2253d 100644
--- a/nvkm/engine/software/nv10.c
+++ b/drm/nouveau/nvkm/engine/software/nv10.c
diff --git a/nvkm/engine/software/nv50.c b/drm/nouveau/nvkm/engine/software/nv50.c
index a0fec205f..a0fec205f 100644
--- a/nvkm/engine/software/nv50.c
+++ b/drm/nouveau/nvkm/engine/software/nv50.c
diff --git a/nvkm/engine/software/nv50.h b/drm/nouveau/nvkm/engine/software/nv50.h
index 41542e725..41542e725 100644
--- a/nvkm/engine/software/nv50.h
+++ b/drm/nouveau/nvkm/engine/software/nv50.h
diff --git a/nvkm/engine/software/nvc0.c b/drm/nouveau/nvkm/engine/software/nvc0.c
index 6af370d3a..6af370d3a 100644
--- a/nvkm/engine/software/nvc0.c
+++ b/drm/nouveau/nvkm/engine/software/nvc0.c
diff --git a/drm/nouveau/nvkm/engine/vp/Kbuild b/drm/nouveau/nvkm/engine/vp/Kbuild
new file mode 100644
index 000000000..6c1d9d1ed
--- /dev/null
+++ b/drm/nouveau/nvkm/engine/vp/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/engine/vp/nv84.o
+nvkm-y += nvkm/engine/vp/nv98.o
+nvkm-y += nvkm/engine/vp/nvc0.o
+nvkm-y += nvkm/engine/vp/nve0.o
diff --git a/nvkm/engine/vp/nv84.c b/drm/nouveau/nvkm/engine/vp/nv84.c
index fd6272b8c..fd6272b8c 100644
--- a/nvkm/engine/vp/nv84.c
+++ b/drm/nouveau/nvkm/engine/vp/nv84.c
diff --git a/nvkm/engine/vp/nv98.c b/drm/nouveau/nvkm/engine/vp/nv98.c
index fc9ae0ff1..fc9ae0ff1 100644
--- a/nvkm/engine/vp/nv98.c
+++ b/drm/nouveau/nvkm/engine/vp/nv98.c
diff --git a/nvkm/engine/vp/nvc0.c b/drm/nouveau/nvkm/engine/vp/nvc0.c
index ac1f62aac..ac1f62aac 100644
--- a/nvkm/engine/vp/nvc0.c
+++ b/drm/nouveau/nvkm/engine/vp/nvc0.c
diff --git a/nvkm/engine/vp/nve0.c b/drm/nouveau/nvkm/engine/vp/nve0.c
index d4c310847..d4c310847 100644
--- a/nvkm/engine/vp/nve0.c
+++ b/drm/nouveau/nvkm/engine/vp/nve0.c
diff --git a/nvkm/engine/xtensa.c b/drm/nouveau/nvkm/engine/xtensa.c
index 92384759d..92384759d 100644
--- a/nvkm/engine/xtensa.c
+++ b/drm/nouveau/nvkm/engine/xtensa.c
diff --git a/drm/nouveau/nvkm/subdev/Kbuild b/drm/nouveau/nvkm/subdev/Kbuild
new file mode 100644
index 000000000..10ef07cf3
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/Kbuild
@@ -0,0 +1,19 @@
+include $(src)/nvkm/subdev/bar/Kbuild
+include $(src)/nvkm/subdev/bios/Kbuild
+include $(src)/nvkm/subdev/bus/Kbuild
+include $(src)/nvkm/subdev/clock/Kbuild
+include $(src)/nvkm/subdev/devinit/Kbuild
+include $(src)/nvkm/subdev/fb/Kbuild
+include $(src)/nvkm/subdev/fuse/Kbuild
+include $(src)/nvkm/subdev/gpio/Kbuild
+include $(src)/nvkm/subdev/i2c/Kbuild
+include $(src)/nvkm/subdev/ibus/Kbuild
+include $(src)/nvkm/subdev/instmem/Kbuild
+include $(src)/nvkm/subdev/ltc/Kbuild
+include $(src)/nvkm/subdev/mc/Kbuild
+include $(src)/nvkm/subdev/mxm/Kbuild
+include $(src)/nvkm/subdev/pwr/Kbuild
+include $(src)/nvkm/subdev/therm/Kbuild
+include $(src)/nvkm/subdev/timer/Kbuild
+include $(src)/nvkm/subdev/vm/Kbuild
+include $(src)/nvkm/subdev/volt/Kbuild
diff --git a/drm/nouveau/nvkm/subdev/bar/Kbuild b/drm/nouveau/nvkm/subdev/bar/Kbuild
new file mode 100644
index 000000000..922454f97
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/bar/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/subdev/bar/base.o
+nvkm-y += nvkm/subdev/bar/nv50.o
+nvkm-y += nvkm/subdev/bar/nvc0.o
+nvkm-y += nvkm/subdev/bar/gk20a.o
diff --git a/nvkm/subdev/bar/base.c b/drm/nouveau/nvkm/subdev/bar/base.c
index 188c63841..188c63841 100644
--- a/nvkm/subdev/bar/base.c
+++ b/drm/nouveau/nvkm/subdev/bar/base.c
diff --git a/nvkm/subdev/bar/gk20a.c b/drm/nouveau/nvkm/subdev/bar/gk20a.c
index bf877af9d..bf877af9d 100644
--- a/nvkm/subdev/bar/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/bar/gk20a.c
diff --git a/nvkm/subdev/bar/nv50.c b/drm/nouveau/nvkm/subdev/bar/nv50.c
index f748ba49d..f748ba49d 100644
--- a/nvkm/subdev/bar/nv50.c
+++ b/drm/nouveau/nvkm/subdev/bar/nv50.c
diff --git a/nvkm/subdev/bar/nvc0.c b/drm/nouveau/nvkm/subdev/bar/nvc0.c
index 8320ee050..8320ee050 100644
--- a/nvkm/subdev/bar/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/bar/nvc0.c
diff --git a/nvkm/subdev/bar/priv.h b/drm/nouveau/nvkm/subdev/bar/priv.h
index 3ee8b1476..3ee8b1476 100644
--- a/nvkm/subdev/bar/priv.h
+++ b/drm/nouveau/nvkm/subdev/bar/priv.h
diff --git a/drm/nouveau/nvkm/subdev/bios/Kbuild b/drm/nouveau/nvkm/subdev/bios/Kbuild
new file mode 100644
index 000000000..64730d5e9
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/bios/Kbuild
@@ -0,0 +1,37 @@
+nvkm-y += nvkm/subdev/bios/base.o
+nvkm-y += nvkm/subdev/bios/bit.o
+nvkm-y += nvkm/subdev/bios/boost.o
+nvkm-y += nvkm/subdev/bios/conn.o
+nvkm-y += nvkm/subdev/bios/cstep.o
+nvkm-y += nvkm/subdev/bios/dcb.o
+nvkm-y += nvkm/subdev/bios/disp.o
+nvkm-y += nvkm/subdev/bios/dp.o
+nvkm-y += nvkm/subdev/bios/extdev.o
+nvkm-y += nvkm/subdev/bios/fan.o
+nvkm-y += nvkm/subdev/bios/gpio.o
+nvkm-y += nvkm/subdev/bios/i2c.o
+nvkm-y += nvkm/subdev/bios/image.o
+nvkm-y += nvkm/subdev/bios/init.o
+nvkm-y += nvkm/subdev/bios/mxm.o
+nvkm-y += nvkm/subdev/bios/npde.o
+nvkm-y += nvkm/subdev/bios/pcir.o
+nvkm-y += nvkm/subdev/bios/perf.o
+nvkm-y += nvkm/subdev/bios/pll.o
+nvkm-y += nvkm/subdev/bios/pmu.o
+nvkm-y += nvkm/subdev/bios/ramcfg.o
+nvkm-y += nvkm/subdev/bios/rammap.o
+nvkm-y += nvkm/subdev/bios/shadow.o
+nvkm-y += nvkm/subdev/bios/shadowacpi.o
+nvkm-y += nvkm/subdev/bios/shadowof.o
+nvkm-y += nvkm/subdev/bios/shadowpci.o
+nvkm-y += nvkm/subdev/bios/shadowramin.o
+nvkm-y += nvkm/subdev/bios/shadowrom.o
+nvkm-y += nvkm/subdev/bios/timing.o
+nvkm-y += nvkm/subdev/bios/therm.o
+nvkm-y += nvkm/subdev/bios/vmap.o
+nvkm-y += nvkm/subdev/bios/volt.o
+nvkm-y += nvkm/subdev/bios/xpio.o
+nvkm-y += nvkm/subdev/bios/M0203.o
+nvkm-y += nvkm/subdev/bios/M0205.o
+nvkm-y += nvkm/subdev/bios/M0209.o
+nvkm-y += nvkm/subdev/bios/P0260.o
diff --git a/nvkm/subdev/bios/M0203.c b/drm/nouveau/nvkm/subdev/bios/M0203.c
index 28906b16d..28906b16d 100644
--- a/nvkm/subdev/bios/M0203.c
+++ b/drm/nouveau/nvkm/subdev/bios/M0203.c
diff --git a/nvkm/subdev/bios/M0205.c b/drm/nouveau/nvkm/subdev/bios/M0205.c
index ac9617c5f..ac9617c5f 100644
--- a/nvkm/subdev/bios/M0205.c
+++ b/drm/nouveau/nvkm/subdev/bios/M0205.c
diff --git a/nvkm/subdev/bios/M0209.c b/drm/nouveau/nvkm/subdev/bios/M0209.c
index b142a510e..b142a510e 100644
--- a/nvkm/subdev/bios/M0209.c
+++ b/drm/nouveau/nvkm/subdev/bios/M0209.c
diff --git a/nvkm/subdev/bios/P0260.c b/drm/nouveau/nvkm/subdev/bios/P0260.c
index 199f4e5f7..199f4e5f7 100644
--- a/nvkm/subdev/bios/P0260.c
+++ b/drm/nouveau/nvkm/subdev/bios/P0260.c
diff --git a/nvkm/subdev/bios/base.c b/drm/nouveau/nvkm/subdev/bios/base.c
index 7df3a2735..7df3a2735 100644
--- a/nvkm/subdev/bios/base.c
+++ b/drm/nouveau/nvkm/subdev/bios/base.c
diff --git a/nvkm/subdev/bios/bit.c b/drm/nouveau/nvkm/subdev/bios/bit.c
index 1d03a3f2b..1d03a3f2b 100644
--- a/nvkm/subdev/bios/bit.c
+++ b/drm/nouveau/nvkm/subdev/bios/bit.c
diff --git a/nvkm/subdev/bios/boost.c b/drm/nouveau/nvkm/subdev/bios/boost.c
index c1835e591..c1835e591 100644
--- a/nvkm/subdev/bios/boost.c
+++ b/drm/nouveau/nvkm/subdev/bios/boost.c
diff --git a/nvkm/subdev/bios/conn.c b/drm/nouveau/nvkm/subdev/bios/conn.c
index 2ede3bcd9..2ede3bcd9 100644
--- a/nvkm/subdev/bios/conn.c
+++ b/drm/nouveau/nvkm/subdev/bios/conn.c
diff --git a/nvkm/subdev/bios/cstep.c b/drm/nouveau/nvkm/subdev/bios/cstep.c
index d3b15327f..d3b15327f 100644
--- a/nvkm/subdev/bios/cstep.c
+++ b/drm/nouveau/nvkm/subdev/bios/cstep.c
diff --git a/nvkm/subdev/bios/dcb.c b/drm/nouveau/nvkm/subdev/bios/dcb.c
index 96099aff8..96099aff8 100644
--- a/nvkm/subdev/bios/dcb.c
+++ b/drm/nouveau/nvkm/subdev/bios/dcb.c
diff --git a/nvkm/subdev/bios/disp.c b/drm/nouveau/nvkm/subdev/bios/disp.c
index 51f355599..51f355599 100644
--- a/nvkm/subdev/bios/disp.c
+++ b/drm/nouveau/nvkm/subdev/bios/disp.c
diff --git a/nvkm/subdev/bios/dp.c b/drm/nouveau/nvkm/subdev/bios/dp.c
index cef53f81f..cef53f81f 100644
--- a/nvkm/subdev/bios/dp.c
+++ b/drm/nouveau/nvkm/subdev/bios/dp.c
diff --git a/nvkm/subdev/bios/extdev.c b/drm/nouveau/nvkm/subdev/bios/extdev.c
index 49285d4f7..49285d4f7 100644
--- a/nvkm/subdev/bios/extdev.c
+++ b/drm/nouveau/nvkm/subdev/bios/extdev.c
diff --git a/nvkm/subdev/bios/fan.c b/drm/nouveau/nvkm/subdev/bios/fan.c
index e41989224..e41989224 100644
--- a/nvkm/subdev/bios/fan.c
+++ b/drm/nouveau/nvkm/subdev/bios/fan.c
diff --git a/nvkm/subdev/bios/gpio.c b/drm/nouveau/nvkm/subdev/bios/gpio.c
index 172a4f999..172a4f999 100644
--- a/nvkm/subdev/bios/gpio.c
+++ b/drm/nouveau/nvkm/subdev/bios/gpio.c
diff --git a/nvkm/subdev/bios/i2c.c b/drm/nouveau/nvkm/subdev/bios/i2c.c
index 282320ba9..282320ba9 100644
--- a/nvkm/subdev/bios/i2c.c
+++ b/drm/nouveau/nvkm/subdev/bios/i2c.c
diff --git a/nvkm/subdev/bios/image.c b/drm/nouveau/nvkm/subdev/bios/image.c
index 373f9a564..373f9a564 100644
--- a/nvkm/subdev/bios/image.c
+++ b/drm/nouveau/nvkm/subdev/bios/image.c
diff --git a/nvkm/subdev/bios/init.c b/drm/nouveau/nvkm/subdev/bios/init.c
index c6579ef32..c6579ef32 100644
--- a/nvkm/subdev/bios/init.c
+++ b/drm/nouveau/nvkm/subdev/bios/init.c
diff --git a/nvkm/subdev/bios/mxm.c b/drm/nouveau/nvkm/subdev/bios/mxm.c
index 2610b11a9..2610b11a9 100644
--- a/nvkm/subdev/bios/mxm.c
+++ b/drm/nouveau/nvkm/subdev/bios/mxm.c
diff --git a/nvkm/subdev/bios/npde.c b/drm/nouveau/nvkm/subdev/bios/npde.c
index d694716a1..d694716a1 100644
--- a/nvkm/subdev/bios/npde.c
+++ b/drm/nouveau/nvkm/subdev/bios/npde.c
diff --git a/nvkm/subdev/bios/pcir.c b/drm/nouveau/nvkm/subdev/bios/pcir.c
index 91dae26bc..91dae26bc 100644
--- a/nvkm/subdev/bios/pcir.c
+++ b/drm/nouveau/nvkm/subdev/bios/pcir.c
diff --git a/nvkm/subdev/bios/perf.c b/drm/nouveau/nvkm/subdev/bios/perf.c
index 675e22168..675e22168 100644
--- a/nvkm/subdev/bios/perf.c
+++ b/drm/nouveau/nvkm/subdev/bios/perf.c
diff --git a/nvkm/subdev/bios/pll.c b/drm/nouveau/nvkm/subdev/bios/pll.c
index 1f76de597..1f76de597 100644
--- a/nvkm/subdev/bios/pll.c
+++ b/drm/nouveau/nvkm/subdev/bios/pll.c
diff --git a/nvkm/subdev/bios/pmu.c b/drm/nouveau/nvkm/subdev/bios/pmu.c
index 66c56ba07..66c56ba07 100644
--- a/nvkm/subdev/bios/pmu.c
+++ b/drm/nouveau/nvkm/subdev/bios/pmu.c
diff --git a/nvkm/subdev/bios/priv.h b/drm/nouveau/nvkm/subdev/bios/priv.h
index 187d225bd..187d225bd 100644
--- a/nvkm/subdev/bios/priv.h
+++ b/drm/nouveau/nvkm/subdev/bios/priv.h
diff --git a/nvkm/subdev/bios/ramcfg.c b/drm/nouveau/nvkm/subdev/bios/ramcfg.c
index 1623c8dfe..1623c8dfe 100644
--- a/nvkm/subdev/bios/ramcfg.c
+++ b/drm/nouveau/nvkm/subdev/bios/ramcfg.c
diff --git a/nvkm/subdev/bios/rammap.c b/drm/nouveau/nvkm/subdev/bios/rammap.c
index c5685228c..c5685228c 100644
--- a/nvkm/subdev/bios/rammap.c
+++ b/drm/nouveau/nvkm/subdev/bios/rammap.c
diff --git a/nvkm/subdev/bios/shadow.c b/drm/nouveau/nvkm/subdev/bios/shadow.c
index bb9e0018d..bb9e0018d 100644
--- a/nvkm/subdev/bios/shadow.c
+++ b/drm/nouveau/nvkm/subdev/bios/shadow.c
diff --git a/nvkm/subdev/bios/shadowacpi.c b/drm/nouveau/nvkm/subdev/bios/shadowacpi.c
index bc130c12e..bc130c12e 100644
--- a/nvkm/subdev/bios/shadowacpi.c
+++ b/drm/nouveau/nvkm/subdev/bios/shadowacpi.c
diff --git a/nvkm/subdev/bios/shadowof.c b/drm/nouveau/nvkm/subdev/bios/shadowof.c
index 3abe487a6..3abe487a6 100644
--- a/nvkm/subdev/bios/shadowof.c
+++ b/drm/nouveau/nvkm/subdev/bios/shadowof.c
diff --git a/nvkm/subdev/bios/shadowpci.c b/drm/nouveau/nvkm/subdev/bios/shadowpci.c
index 1d0389c0a..1d0389c0a 100644
--- a/nvkm/subdev/bios/shadowpci.c
+++ b/drm/nouveau/nvkm/subdev/bios/shadowpci.c
diff --git a/nvkm/subdev/bios/shadowramin.c b/drm/nouveau/nvkm/subdev/bios/shadowramin.c
index a7a890fad..a7a890fad 100644
--- a/nvkm/subdev/bios/shadowramin.c
+++ b/drm/nouveau/nvkm/subdev/bios/shadowramin.c
diff --git a/nvkm/subdev/bios/shadowrom.c b/drm/nouveau/nvkm/subdev/bios/shadowrom.c
index b7992bc3f..b7992bc3f 100644
--- a/nvkm/subdev/bios/shadowrom.c
+++ b/drm/nouveau/nvkm/subdev/bios/shadowrom.c
diff --git a/nvkm/subdev/bios/therm.c b/drm/nouveau/nvkm/subdev/bios/therm.c
index d15854094..d15854094 100644
--- a/nvkm/subdev/bios/therm.c
+++ b/drm/nouveau/nvkm/subdev/bios/therm.c
diff --git a/nvkm/subdev/bios/timing.c b/drm/nouveau/nvkm/subdev/bios/timing.c
index 8521eca1e..8521eca1e 100644
--- a/nvkm/subdev/bios/timing.c
+++ b/drm/nouveau/nvkm/subdev/bios/timing.c
diff --git a/nvkm/subdev/bios/vmap.c b/drm/nouveau/nvkm/subdev/bios/vmap.c
index f343a1b06..f343a1b06 100644
--- a/nvkm/subdev/bios/vmap.c
+++ b/drm/nouveau/nvkm/subdev/bios/vmap.c
diff --git a/nvkm/subdev/bios/volt.c b/drm/nouveau/nvkm/subdev/bios/volt.c
index bb590de4e..bb590de4e 100644
--- a/nvkm/subdev/bios/volt.c
+++ b/drm/nouveau/nvkm/subdev/bios/volt.c
diff --git a/nvkm/subdev/bios/xpio.c b/drm/nouveau/nvkm/subdev/bios/xpio.c
index e9b8e5d30..e9b8e5d30 100644
--- a/nvkm/subdev/bios/xpio.c
+++ b/drm/nouveau/nvkm/subdev/bios/xpio.c
diff --git a/drm/nouveau/nvkm/subdev/bus/Kbuild b/drm/nouveau/nvkm/subdev/bus/Kbuild
new file mode 100644
index 000000000..633e9b4b6
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/bus/Kbuild
@@ -0,0 +1,6 @@
+nvkm-y += nvkm/subdev/bus/hwsq.o
+nvkm-y += nvkm/subdev/bus/nv04.o
+nvkm-y += nvkm/subdev/bus/nv31.o
+nvkm-y += nvkm/subdev/bus/nv50.o
+nvkm-y += nvkm/subdev/bus/nv94.o
+nvkm-y += nvkm/subdev/bus/nvc0.o
diff --git a/nvkm/subdev/bus/hwsq.c b/drm/nouveau/nvkm/subdev/bus/hwsq.c
index f757470e2..f757470e2 100644
--- a/nvkm/subdev/bus/hwsq.c
+++ b/drm/nouveau/nvkm/subdev/bus/hwsq.c
diff --git a/nvkm/subdev/bus/hwsq.h b/drm/nouveau/nvkm/subdev/bus/hwsq.h
index 12176f9c1..12176f9c1 100644
--- a/nvkm/subdev/bus/hwsq.h
+++ b/drm/nouveau/nvkm/subdev/bus/hwsq.h
diff --git a/nvkm/subdev/bus/nv04.c b/drm/nouveau/nvkm/subdev/bus/nv04.c
index 23921b535..23921b535 100644
--- a/nvkm/subdev/bus/nv04.c
+++ b/drm/nouveau/nvkm/subdev/bus/nv04.c
diff --git a/nvkm/subdev/bus/nv04.h b/drm/nouveau/nvkm/subdev/bus/nv04.h
index 4d7602450..4d7602450 100644
--- a/nvkm/subdev/bus/nv04.h
+++ b/drm/nouveau/nvkm/subdev/bus/nv04.h
diff --git a/nvkm/subdev/bus/nv31.c b/drm/nouveau/nvkm/subdev/bus/nv31.c
index 94da46f61..94da46f61 100644
--- a/nvkm/subdev/bus/nv31.c
+++ b/drm/nouveau/nvkm/subdev/bus/nv31.c
diff --git a/nvkm/subdev/bus/nv50.c b/drm/nouveau/nvkm/subdev/bus/nv50.c
index 11918f7e2..11918f7e2 100644
--- a/nvkm/subdev/bus/nv50.c
+++ b/drm/nouveau/nvkm/subdev/bus/nv50.c
diff --git a/nvkm/subdev/bus/nv94.c b/drm/nouveau/nvkm/subdev/bus/nv94.c
index d3659055f..d3659055f 100644
--- a/nvkm/subdev/bus/nv94.c
+++ b/drm/nouveau/nvkm/subdev/bus/nv94.c
diff --git a/nvkm/subdev/bus/nvc0.c b/drm/nouveau/nvkm/subdev/bus/nvc0.c
index 73839d715..73839d715 100644
--- a/nvkm/subdev/bus/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/bus/nvc0.c
diff --git a/drm/nouveau/nvkm/subdev/clock/Kbuild b/drm/nouveau/nvkm/subdev/clock/Kbuild
new file mode 100644
index 000000000..f0a86021f
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/clock/Kbuild
@@ -0,0 +1,12 @@
+nvkm-y += nvkm/subdev/clock/base.o
+nvkm-y += nvkm/subdev/clock/nv04.o
+nvkm-y += nvkm/subdev/clock/nv40.o
+nvkm-y += nvkm/subdev/clock/nv50.o
+nvkm-y += nvkm/subdev/clock/nv84.o
+nvkm-y += nvkm/subdev/clock/nva3.o
+nvkm-y += nvkm/subdev/clock/nvaa.o
+nvkm-y += nvkm/subdev/clock/nvc0.o
+nvkm-y += nvkm/subdev/clock/nve0.o
+nvkm-y += nvkm/subdev/clock/gk20a.o
+nvkm-y += nvkm/subdev/clock/pllnv04.o
+nvkm-y += nvkm/subdev/clock/pllnva3.o
diff --git a/nvkm/subdev/clock/base.c b/drm/nouveau/nvkm/subdev/clock/base.c
index bc095b470..bc095b470 100644
--- a/nvkm/subdev/clock/base.c
+++ b/drm/nouveau/nvkm/subdev/clock/base.c
diff --git a/nvkm/subdev/clock/gk20a.c b/drm/nouveau/nvkm/subdev/clock/gk20a.c
index fb4fad374..fb4fad374 100644
--- a/nvkm/subdev/clock/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/clock/gk20a.c
diff --git a/nvkm/subdev/clock/nv04.c b/drm/nouveau/nvkm/subdev/clock/nv04.c
index 4c4823268..4c4823268 100644
--- a/nvkm/subdev/clock/nv04.c
+++ b/drm/nouveau/nvkm/subdev/clock/nv04.c
diff --git a/nvkm/subdev/clock/nv40.c b/drm/nouveau/nvkm/subdev/clock/nv40.c
index 08368fe97..08368fe97 100644
--- a/nvkm/subdev/clock/nv40.c
+++ b/drm/nouveau/nvkm/subdev/clock/nv40.c
diff --git a/nvkm/subdev/clock/nv50.c b/drm/nouveau/nvkm/subdev/clock/nv50.c
index 5070ebc26..5070ebc26 100644
--- a/nvkm/subdev/clock/nv50.c
+++ b/drm/nouveau/nvkm/subdev/clock/nv50.c
diff --git a/nvkm/subdev/clock/nv50.h b/drm/nouveau/nvkm/subdev/clock/nv50.h
index f10917d78..f10917d78 100644
--- a/nvkm/subdev/clock/nv50.h
+++ b/drm/nouveau/nvkm/subdev/clock/nv50.h
diff --git a/nvkm/subdev/clock/nv84.c b/drm/nouveau/nvkm/subdev/clock/nv84.c
index b0b7c1437..b0b7c1437 100644
--- a/nvkm/subdev/clock/nv84.c
+++ b/drm/nouveau/nvkm/subdev/clock/nv84.c
diff --git a/nvkm/subdev/clock/nva3.c b/drm/nouveau/nvkm/subdev/clock/nva3.c
index 07ad01247..07ad01247 100644
--- a/nvkm/subdev/clock/nva3.c
+++ b/drm/nouveau/nvkm/subdev/clock/nva3.c
diff --git a/nvkm/subdev/clock/nva3.h b/drm/nouveau/nvkm/subdev/clock/nva3.h
index a45a1038b..a45a1038b 100644
--- a/nvkm/subdev/clock/nva3.h
+++ b/drm/nouveau/nvkm/subdev/clock/nva3.h
diff --git a/nvkm/subdev/clock/nvaa.c b/drm/nouveau/nvkm/subdev/clock/nvaa.c
index 54aeab800..54aeab800 100644
--- a/nvkm/subdev/clock/nvaa.c
+++ b/drm/nouveau/nvkm/subdev/clock/nvaa.c
diff --git a/nvkm/subdev/clock/nvc0.c b/drm/nouveau/nvkm/subdev/clock/nvc0.c
index 1234abaab..1234abaab 100644
--- a/nvkm/subdev/clock/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/clock/nvc0.c
diff --git a/nvkm/subdev/clock/nve0.c b/drm/nouveau/nvkm/subdev/clock/nve0.c
index 7eccad575..7eccad575 100644
--- a/nvkm/subdev/clock/nve0.c
+++ b/drm/nouveau/nvkm/subdev/clock/nve0.c
diff --git a/nvkm/subdev/clock/pll.h b/drm/nouveau/nvkm/subdev/clock/pll.h
index 445b14c33..445b14c33 100644
--- a/nvkm/subdev/clock/pll.h
+++ b/drm/nouveau/nvkm/subdev/clock/pll.h
diff --git a/nvkm/subdev/clock/pllnv04.c b/drm/nouveau/nvkm/subdev/clock/pllnv04.c
index b47d543ab..b47d543ab 100644
--- a/nvkm/subdev/clock/pllnv04.c
+++ b/drm/nouveau/nvkm/subdev/clock/pllnv04.c
diff --git a/nvkm/subdev/clock/pllnva3.c b/drm/nouveau/nvkm/subdev/clock/pllnva3.c
index 8eca457c2..8eca457c2 100644
--- a/nvkm/subdev/clock/pllnva3.c
+++ b/drm/nouveau/nvkm/subdev/clock/pllnva3.c
diff --git a/nvkm/subdev/clock/seq.h b/drm/nouveau/nvkm/subdev/clock/seq.h
index fb33f06eb..fb33f06eb 100644
--- a/nvkm/subdev/clock/seq.h
+++ b/drm/nouveau/nvkm/subdev/clock/seq.h
diff --git a/drm/nouveau/nvkm/subdev/devinit/Kbuild b/drm/nouveau/nvkm/subdev/devinit/Kbuild
new file mode 100644
index 000000000..4321e285c
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/devinit/Kbuild
@@ -0,0 +1,14 @@
+nvkm-y += nvkm/subdev/devinit/base.o
+nvkm-y += nvkm/subdev/devinit/nv04.o
+nvkm-y += nvkm/subdev/devinit/nv05.o
+nvkm-y += nvkm/subdev/devinit/nv10.o
+nvkm-y += nvkm/subdev/devinit/nv1a.o
+nvkm-y += nvkm/subdev/devinit/nv20.o
+nvkm-y += nvkm/subdev/devinit/nv50.o
+nvkm-y += nvkm/subdev/devinit/nv84.o
+nvkm-y += nvkm/subdev/devinit/nv98.o
+nvkm-y += nvkm/subdev/devinit/nva3.o
+nvkm-y += nvkm/subdev/devinit/nvaf.o
+nvkm-y += nvkm/subdev/devinit/nvc0.o
+nvkm-y += nvkm/subdev/devinit/gm107.o
+nvkm-y += nvkm/subdev/devinit/gm204.o
diff --git a/nvkm/subdev/devinit/base.c b/drm/nouveau/nvkm/subdev/devinit/base.c
index 0e45cee82..0e45cee82 100644
--- a/nvkm/subdev/devinit/base.c
+++ b/drm/nouveau/nvkm/subdev/devinit/base.c
diff --git a/nvkm/subdev/devinit/fbmem.h b/drm/nouveau/nvkm/subdev/devinit/fbmem.h
index 6103484fe..6103484fe 100644
--- a/nvkm/subdev/devinit/fbmem.h
+++ b/drm/nouveau/nvkm/subdev/devinit/fbmem.h
diff --git a/nvkm/subdev/devinit/gm107.c b/drm/nouveau/nvkm/subdev/devinit/gm107.c
index 4ba43d6a1..4ba43d6a1 100644
--- a/nvkm/subdev/devinit/gm107.c
+++ b/drm/nouveau/nvkm/subdev/devinit/gm107.c
diff --git a/nvkm/subdev/devinit/gm204.c b/drm/nouveau/nvkm/subdev/devinit/gm204.c
index e44a86662..e44a86662 100644
--- a/nvkm/subdev/devinit/gm204.c
+++ b/drm/nouveau/nvkm/subdev/devinit/gm204.c
diff --git a/nvkm/subdev/devinit/nv04.c b/drm/nouveau/nvkm/subdev/devinit/nv04.c
index 65651c50f..65651c50f 100644
--- a/nvkm/subdev/devinit/nv04.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv04.c
diff --git a/nvkm/subdev/devinit/nv04.h b/drm/nouveau/nvkm/subdev/devinit/nv04.h
index 23470a575..23470a575 100644
--- a/nvkm/subdev/devinit/nv04.h
+++ b/drm/nouveau/nvkm/subdev/devinit/nv04.h
diff --git a/nvkm/subdev/devinit/nv05.c b/drm/nouveau/nvkm/subdev/devinit/nv05.c
index a2007a3ef..a2007a3ef 100644
--- a/nvkm/subdev/devinit/nv05.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv05.c
diff --git a/nvkm/subdev/devinit/nv10.c b/drm/nouveau/nvkm/subdev/devinit/nv10.c
index 178b46f79..178b46f79 100644
--- a/nvkm/subdev/devinit/nv10.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv10.c
diff --git a/nvkm/subdev/devinit/nv1a.c b/drm/nouveau/nvkm/subdev/devinit/nv1a.c
index 995dd97af..995dd97af 100644
--- a/nvkm/subdev/devinit/nv1a.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv1a.c
diff --git a/nvkm/subdev/devinit/nv20.c b/drm/nouveau/nvkm/subdev/devinit/nv20.c
index 915089fb4..915089fb4 100644
--- a/nvkm/subdev/devinit/nv20.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv20.c
diff --git a/nvkm/subdev/devinit/nv50.c b/drm/nouveau/nvkm/subdev/devinit/nv50.c
index 968334d1d..968334d1d 100644
--- a/nvkm/subdev/devinit/nv50.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv50.c
diff --git a/nvkm/subdev/devinit/nv50.h b/drm/nouveau/nvkm/subdev/devinit/nv50.h
index f412bb7f7..f412bb7f7 100644
--- a/nvkm/subdev/devinit/nv50.h
+++ b/drm/nouveau/nvkm/subdev/devinit/nv50.h
diff --git a/nvkm/subdev/devinit/nv84.c b/drm/nouveau/nvkm/subdev/devinit/nv84.c
index a7c80ded7..a7c80ded7 100644
--- a/nvkm/subdev/devinit/nv84.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv84.c
diff --git a/nvkm/subdev/devinit/nv98.c b/drm/nouveau/nvkm/subdev/devinit/nv98.c
index a773253a1..a773253a1 100644
--- a/nvkm/subdev/devinit/nv98.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nv98.c
diff --git a/nvkm/subdev/devinit/nva3.c b/drm/nouveau/nvkm/subdev/devinit/nva3.c
index b9cd9e53f..b9cd9e53f 100644
--- a/nvkm/subdev/devinit/nva3.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nva3.c
diff --git a/nvkm/subdev/devinit/nvaf.c b/drm/nouveau/nvkm/subdev/devinit/nvaf.c
index 3729846a8..3729846a8 100644
--- a/nvkm/subdev/devinit/nvaf.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nvaf.c
diff --git a/nvkm/subdev/devinit/nvc0.c b/drm/nouveau/nvkm/subdev/devinit/nvc0.c
index 80bd7f5ed..80bd7f5ed 100644
--- a/nvkm/subdev/devinit/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/devinit/nvc0.c
diff --git a/nvkm/subdev/devinit/priv.h b/drm/nouveau/nvkm/subdev/devinit/priv.h
index cbcd51852..cbcd51852 100644
--- a/nvkm/subdev/devinit/priv.h
+++ b/drm/nouveau/nvkm/subdev/devinit/priv.h
diff --git a/drm/nouveau/nvkm/subdev/fb/Kbuild b/drm/nouveau/nvkm/subdev/fb/Kbuild
new file mode 100644
index 000000000..bfd0166d3
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/fb/Kbuild
@@ -0,0 +1,45 @@
+nvkm-y += nvkm/subdev/fb/base.o
+nvkm-y += nvkm/subdev/fb/nv04.o
+nvkm-y += nvkm/subdev/fb/nv10.o
+nvkm-y += nvkm/subdev/fb/nv1a.o
+nvkm-y += nvkm/subdev/fb/nv20.o
+nvkm-y += nvkm/subdev/fb/nv25.o
+nvkm-y += nvkm/subdev/fb/nv30.o
+nvkm-y += nvkm/subdev/fb/nv35.o
+nvkm-y += nvkm/subdev/fb/nv36.o
+nvkm-y += nvkm/subdev/fb/nv40.o
+nvkm-y += nvkm/subdev/fb/nv41.o
+nvkm-y += nvkm/subdev/fb/nv44.o
+nvkm-y += nvkm/subdev/fb/nv46.o
+nvkm-y += nvkm/subdev/fb/nv47.o
+nvkm-y += nvkm/subdev/fb/nv49.o
+nvkm-y += nvkm/subdev/fb/nv4e.o
+nvkm-y += nvkm/subdev/fb/nv50.o
+nvkm-y += nvkm/subdev/fb/nv84.o
+nvkm-y += nvkm/subdev/fb/nva3.o
+nvkm-y += nvkm/subdev/fb/nvaa.o
+nvkm-y += nvkm/subdev/fb/nvaf.o
+nvkm-y += nvkm/subdev/fb/nvc0.o
+nvkm-y += nvkm/subdev/fb/nve0.o
+nvkm-y += nvkm/subdev/fb/gk20a.o
+nvkm-y += nvkm/subdev/fb/gm107.o
+nvkm-y += nvkm/subdev/fb/ramnv04.o
+nvkm-y += nvkm/subdev/fb/ramnv10.o
+nvkm-y += nvkm/subdev/fb/ramnv1a.o
+nvkm-y += nvkm/subdev/fb/ramnv20.o
+nvkm-y += nvkm/subdev/fb/ramnv40.o
+nvkm-y += nvkm/subdev/fb/ramnv41.o
+nvkm-y += nvkm/subdev/fb/ramnv44.o
+nvkm-y += nvkm/subdev/fb/ramnv49.o
+nvkm-y += nvkm/subdev/fb/ramnv4e.o
+nvkm-y += nvkm/subdev/fb/ramnv50.o
+nvkm-y += nvkm/subdev/fb/ramnva3.o
+nvkm-y += nvkm/subdev/fb/ramnvaa.o
+nvkm-y += nvkm/subdev/fb/ramnvc0.o
+nvkm-y += nvkm/subdev/fb/ramnve0.o
+nvkm-y += nvkm/subdev/fb/ramgk20a.o
+nvkm-y += nvkm/subdev/fb/ramgm107.o
+nvkm-y += nvkm/subdev/fb/sddr2.o
+nvkm-y += nvkm/subdev/fb/sddr3.o
+nvkm-y += nvkm/subdev/fb/gddr3.o
+nvkm-y += nvkm/subdev/fb/gddr5.o
diff --git a/nvkm/subdev/fb/base.c b/drm/nouveau/nvkm/subdev/fb/base.c
index 090a7f2ac..090a7f2ac 100644
--- a/nvkm/subdev/fb/base.c
+++ b/drm/nouveau/nvkm/subdev/fb/base.c
diff --git a/nvkm/subdev/fb/gddr3.c b/drm/nouveau/nvkm/subdev/fb/gddr3.c
index d85a25d02..d85a25d02 100644
--- a/nvkm/subdev/fb/gddr3.c
+++ b/drm/nouveau/nvkm/subdev/fb/gddr3.c
diff --git a/nvkm/subdev/fb/gddr5.c b/drm/nouveau/nvkm/subdev/fb/gddr5.c
index 7fbbe05d5..7fbbe05d5 100644
--- a/nvkm/subdev/fb/gddr5.c
+++ b/drm/nouveau/nvkm/subdev/fb/gddr5.c
diff --git a/nvkm/subdev/fb/gk20a.c b/drm/nouveau/nvkm/subdev/fb/gk20a.c
index fde42e4d1..fde42e4d1 100644
--- a/nvkm/subdev/fb/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/fb/gk20a.c
diff --git a/nvkm/subdev/fb/gm107.c b/drm/nouveau/nvkm/subdev/fb/gm107.c
index c4840aedc..c4840aedc 100644
--- a/nvkm/subdev/fb/gm107.c
+++ b/drm/nouveau/nvkm/subdev/fb/gm107.c
diff --git a/nvkm/subdev/fb/nv04.c b/drm/nouveau/nvkm/subdev/fb/nv04.c
index 8309fe33f..8309fe33f 100644
--- a/nvkm/subdev/fb/nv04.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv04.c
diff --git a/nvkm/subdev/fb/nv04.h b/drm/nouveau/nvkm/subdev/fb/nv04.h
index 06ce71f87..06ce71f87 100644
--- a/nvkm/subdev/fb/nv04.h
+++ b/drm/nouveau/nvkm/subdev/fb/nv04.h
diff --git a/nvkm/subdev/fb/nv10.c b/drm/nouveau/nvkm/subdev/fb/nv10.c
index ffb7ec6d9..ffb7ec6d9 100644
--- a/nvkm/subdev/fb/nv10.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv10.c
diff --git a/nvkm/subdev/fb/nv1a.c b/drm/nouveau/nvkm/subdev/fb/nv1a.c
index 265d12536..265d12536 100644
--- a/nvkm/subdev/fb/nv1a.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv1a.c
diff --git a/nvkm/subdev/fb/nv20.c b/drm/nouveau/nvkm/subdev/fb/nv20.c
index 2209ade63..2209ade63 100644
--- a/nvkm/subdev/fb/nv20.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv20.c
diff --git a/nvkm/subdev/fb/nv25.c b/drm/nouveau/nvkm/subdev/fb/nv25.c
index e2a66c355..e2a66c355 100644
--- a/nvkm/subdev/fb/nv25.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv25.c
diff --git a/nvkm/subdev/fb/nv30.c b/drm/nouveau/nvkm/subdev/fb/nv30.c
index cbec402ba..cbec402ba 100644
--- a/nvkm/subdev/fb/nv30.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv30.c
diff --git a/nvkm/subdev/fb/nv35.c b/drm/nouveau/nvkm/subdev/fb/nv35.c
index b2cf8c69f..b2cf8c69f 100644
--- a/nvkm/subdev/fb/nv35.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv35.c
diff --git a/nvkm/subdev/fb/nv36.c b/drm/nouveau/nvkm/subdev/fb/nv36.c
index b4cdae2a3..b4cdae2a3 100644
--- a/nvkm/subdev/fb/nv36.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv36.c
diff --git a/nvkm/subdev/fb/nv40.c b/drm/nouveau/nvkm/subdev/fb/nv40.c
index 52814258c..52814258c 100644
--- a/nvkm/subdev/fb/nv40.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv40.c
diff --git a/nvkm/subdev/fb/nv40.h b/drm/nouveau/nvkm/subdev/fb/nv40.h
index 581f80852..581f80852 100644
--- a/nvkm/subdev/fb/nv40.h
+++ b/drm/nouveau/nvkm/subdev/fb/nv40.h
diff --git a/nvkm/subdev/fb/nv41.c b/drm/nouveau/nvkm/subdev/fb/nv41.c
index b239a8615..b239a8615 100644
--- a/nvkm/subdev/fb/nv41.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv41.c
diff --git a/nvkm/subdev/fb/nv44.c b/drm/nouveau/nvkm/subdev/fb/nv44.c
index d8478208a..d8478208a 100644
--- a/nvkm/subdev/fb/nv44.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv44.c
diff --git a/nvkm/subdev/fb/nv46.c b/drm/nouveau/nvkm/subdev/fb/nv46.c
index a5b77514d..a5b77514d 100644
--- a/nvkm/subdev/fb/nv46.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv46.c
diff --git a/nvkm/subdev/fb/nv47.c b/drm/nouveau/nvkm/subdev/fb/nv47.c
index 3bea14237..3bea14237 100644
--- a/nvkm/subdev/fb/nv47.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv47.c
diff --git a/nvkm/subdev/fb/nv49.c b/drm/nouveau/nvkm/subdev/fb/nv49.c
index 666cbd5d4..666cbd5d4 100644
--- a/nvkm/subdev/fb/nv49.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv49.c
diff --git a/nvkm/subdev/fb/nv4e.c b/drm/nouveau/nvkm/subdev/fb/nv4e.c
index 42e64f364..42e64f364 100644
--- a/nvkm/subdev/fb/nv4e.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv4e.c
diff --git a/nvkm/subdev/fb/nv50.c b/drm/nouveau/nvkm/subdev/fb/nv50.c
index 4150b0d10..4150b0d10 100644
--- a/nvkm/subdev/fb/nv50.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv50.c
diff --git a/nvkm/subdev/fb/nv50.h b/drm/nouveau/nvkm/subdev/fb/nv50.h
index c5e5a888c..c5e5a888c 100644
--- a/nvkm/subdev/fb/nv50.h
+++ b/drm/nouveau/nvkm/subdev/fb/nv50.h
diff --git a/nvkm/subdev/fb/nv84.c b/drm/nouveau/nvkm/subdev/fb/nv84.c
index cf0e767d3..cf0e767d3 100644
--- a/nvkm/subdev/fb/nv84.c
+++ b/drm/nouveau/nvkm/subdev/fb/nv84.c
diff --git a/nvkm/subdev/fb/nva3.c b/drm/nouveau/nvkm/subdev/fb/nva3.c
index dab6e1c63..dab6e1c63 100644
--- a/nvkm/subdev/fb/nva3.c
+++ b/drm/nouveau/nvkm/subdev/fb/nva3.c
diff --git a/nvkm/subdev/fb/nvaa.c b/drm/nouveau/nvkm/subdev/fb/nvaa.c
index cba8e6818..cba8e6818 100644
--- a/nvkm/subdev/fb/nvaa.c
+++ b/drm/nouveau/nvkm/subdev/fb/nvaa.c
diff --git a/nvkm/subdev/fb/nvaf.c b/drm/nouveau/nvkm/subdev/fb/nvaf.c
index 5423faa2c..5423faa2c 100644
--- a/nvkm/subdev/fb/nvaf.c
+++ b/drm/nouveau/nvkm/subdev/fb/nvaf.c
diff --git a/nvkm/subdev/fb/nvc0.c b/drm/nouveau/nvkm/subdev/fb/nvc0.c
index 32f28dc73..32f28dc73 100644
--- a/nvkm/subdev/fb/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/fb/nvc0.c
diff --git a/nvkm/subdev/fb/nvc0.h b/drm/nouveau/nvkm/subdev/fb/nvc0.h
index 705a06d75..705a06d75 100644
--- a/nvkm/subdev/fb/nvc0.h
+++ b/drm/nouveau/nvkm/subdev/fb/nvc0.h
diff --git a/nvkm/subdev/fb/nve0.c b/drm/nouveau/nvkm/subdev/fb/nve0.c
index 595db50cf..595db50cf 100644
--- a/nvkm/subdev/fb/nve0.c
+++ b/drm/nouveau/nvkm/subdev/fb/nve0.c
diff --git a/nvkm/subdev/fb/priv.h b/drm/nouveau/nvkm/subdev/fb/priv.h
index 283863f7a..283863f7a 100644
--- a/nvkm/subdev/fb/priv.h
+++ b/drm/nouveau/nvkm/subdev/fb/priv.h
diff --git a/nvkm/subdev/fb/ramfuc.h b/drm/nouveau/nvkm/subdev/fb/ramfuc.h
index 0ac725644..0ac725644 100644
--- a/nvkm/subdev/fb/ramfuc.h
+++ b/drm/nouveau/nvkm/subdev/fb/ramfuc.h
diff --git a/nvkm/subdev/fb/ramgk20a.c b/drm/nouveau/nvkm/subdev/fb/ramgk20a.c
index 4d77d75e4..4d77d75e4 100644
--- a/nvkm/subdev/fb/ramgk20a.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramgk20a.c
diff --git a/nvkm/subdev/fb/ramgm107.c b/drm/nouveau/nvkm/subdev/fb/ramgm107.c
index 4c6363595..4c6363595 100644
--- a/nvkm/subdev/fb/ramgm107.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramgm107.c
diff --git a/nvkm/subdev/fb/ramnv04.c b/drm/nouveau/nvkm/subdev/fb/ramnv04.c
index 1972268d1..1972268d1 100644
--- a/nvkm/subdev/fb/ramnv04.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv04.c
diff --git a/nvkm/subdev/fb/ramnv10.c b/drm/nouveau/nvkm/subdev/fb/ramnv10.c
index 8311f3774..8311f3774 100644
--- a/nvkm/subdev/fb/ramnv10.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv10.c
diff --git a/nvkm/subdev/fb/ramnv1a.c b/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
index d0caddfb9..d0caddfb9 100644
--- a/nvkm/subdev/fb/ramnv1a.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv1a.c
diff --git a/nvkm/subdev/fb/ramnv20.c b/drm/nouveau/nvkm/subdev/fb/ramnv20.c
index fdc11bba2..fdc11bba2 100644
--- a/nvkm/subdev/fb/ramnv20.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv20.c
diff --git a/nvkm/subdev/fb/ramnv40.c b/drm/nouveau/nvkm/subdev/fb/ramnv40.c
index 7648beb11..7648beb11 100644
--- a/nvkm/subdev/fb/ramnv40.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv40.c
diff --git a/nvkm/subdev/fb/ramnv41.c b/drm/nouveau/nvkm/subdev/fb/ramnv41.c
index d64498a4d..d64498a4d 100644
--- a/nvkm/subdev/fb/ramnv41.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv41.c
diff --git a/nvkm/subdev/fb/ramnv44.c b/drm/nouveau/nvkm/subdev/fb/ramnv44.c
index 089acac81..089acac81 100644
--- a/nvkm/subdev/fb/ramnv44.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv44.c
diff --git a/nvkm/subdev/fb/ramnv49.c b/drm/nouveau/nvkm/subdev/fb/ramnv49.c
index baa013afa..baa013afa 100644
--- a/nvkm/subdev/fb/ramnv49.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv49.c
diff --git a/nvkm/subdev/fb/ramnv4e.c b/drm/nouveau/nvkm/subdev/fb/ramnv4e.c
index 63a6aab86..63a6aab86 100644
--- a/nvkm/subdev/fb/ramnv4e.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv4e.c
diff --git a/nvkm/subdev/fb/ramnv50.c b/drm/nouveau/nvkm/subdev/fb/ramnv50.c
index 64a983c96..64a983c96 100644
--- a/nvkm/subdev/fb/ramnv50.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnv50.c
diff --git a/nvkm/subdev/fb/ramnva3.c b/drm/nouveau/nvkm/subdev/fb/ramnva3.c
index 3b38a5388..3b38a5388 100644
--- a/nvkm/subdev/fb/ramnva3.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnva3.c
diff --git a/nvkm/subdev/fb/ramnvaa.c b/drm/nouveau/nvkm/subdev/fb/ramnvaa.c
index 033a8e999..033a8e999 100644
--- a/nvkm/subdev/fb/ramnvaa.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnvaa.c
diff --git a/nvkm/subdev/fb/ramnvc0.c b/drm/nouveau/nvkm/subdev/fb/ramnvc0.c
index 735cb9580..735cb9580 100644
--- a/nvkm/subdev/fb/ramnvc0.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnvc0.c
diff --git a/nvkm/subdev/fb/ramnve0.c b/drm/nouveau/nvkm/subdev/fb/ramnve0.c
index 6bae474ab..6bae474ab 100644
--- a/nvkm/subdev/fb/ramnve0.c
+++ b/drm/nouveau/nvkm/subdev/fb/ramnve0.c
diff --git a/nvkm/subdev/fb/ramseq.h b/drm/nouveau/nvkm/subdev/fb/ramseq.h
index 571077e39..571077e39 100644
--- a/nvkm/subdev/fb/ramseq.h
+++ b/drm/nouveau/nvkm/subdev/fb/ramseq.h
diff --git a/nvkm/include/subdev/fb/regsnv04.h b/drm/nouveau/nvkm/subdev/fb/regsnv04.h
index 0f7fc0c52..0f7fc0c52 100644
--- a/nvkm/include/subdev/fb/regsnv04.h
+++ b/drm/nouveau/nvkm/subdev/fb/regsnv04.h
diff --git a/nvkm/subdev/fb/sddr2.c b/drm/nouveau/nvkm/subdev/fb/sddr2.c
index 252575f3a..252575f3a 100644
--- a/nvkm/subdev/fb/sddr2.c
+++ b/drm/nouveau/nvkm/subdev/fb/sddr2.c
diff --git a/nvkm/subdev/fb/sddr3.c b/drm/nouveau/nvkm/subdev/fb/sddr3.c
index a2dca4869..a2dca4869 100644
--- a/nvkm/subdev/fb/sddr3.c
+++ b/drm/nouveau/nvkm/subdev/fb/sddr3.c
diff --git a/drm/nouveau/nvkm/subdev/fuse/Kbuild b/drm/nouveau/nvkm/subdev/fuse/Kbuild
new file mode 100644
index 000000000..0458bce2c
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/fuse/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/subdev/fuse/base.o
+nvkm-y += nvkm/subdev/fuse/g80.o
+nvkm-y += nvkm/subdev/fuse/gf100.o
+nvkm-y += nvkm/subdev/fuse/gm107.o
diff --git a/nvkm/subdev/fuse/base.c b/drm/nouveau/nvkm/subdev/fuse/base.c
index 9e8e92127..9e8e92127 100644
--- a/nvkm/subdev/fuse/base.c
+++ b/drm/nouveau/nvkm/subdev/fuse/base.c
diff --git a/nvkm/subdev/fuse/g80.c b/drm/nouveau/nvkm/subdev/fuse/g80.c
index a374ade48..a374ade48 100644
--- a/nvkm/subdev/fuse/g80.c
+++ b/drm/nouveau/nvkm/subdev/fuse/g80.c
diff --git a/nvkm/subdev/fuse/gf100.c b/drm/nouveau/nvkm/subdev/fuse/gf100.c
index 5ed03f54b..5ed03f54b 100644
--- a/nvkm/subdev/fuse/gf100.c
+++ b/drm/nouveau/nvkm/subdev/fuse/gf100.c
diff --git a/nvkm/subdev/fuse/gm107.c b/drm/nouveau/nvkm/subdev/fuse/gm107.c
index 4f1a636c6..4f1a636c6 100644
--- a/nvkm/subdev/fuse/gm107.c
+++ b/drm/nouveau/nvkm/subdev/fuse/gm107.c
diff --git a/nvkm/subdev/fuse/priv.h b/drm/nouveau/nvkm/subdev/fuse/priv.h
index d2085411a..d2085411a 100644
--- a/nvkm/subdev/fuse/priv.h
+++ b/drm/nouveau/nvkm/subdev/fuse/priv.h
diff --git a/drm/nouveau/nvkm/subdev/gpio/Kbuild b/drm/nouveau/nvkm/subdev/gpio/Kbuild
new file mode 100644
index 000000000..77bc88672
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/gpio/Kbuild
@@ -0,0 +1,6 @@
+nvkm-y += nvkm/subdev/gpio/base.o
+nvkm-y += nvkm/subdev/gpio/nv10.o
+nvkm-y += nvkm/subdev/gpio/nv50.o
+nvkm-y += nvkm/subdev/gpio/nv94.o
+nvkm-y += nvkm/subdev/gpio/nvd0.o
+nvkm-y += nvkm/subdev/gpio/nve0.o
diff --git a/nvkm/subdev/gpio/base.c b/drm/nouveau/nvkm/subdev/gpio/base.c
index 7ad99b763..7ad99b763 100644
--- a/nvkm/subdev/gpio/base.c
+++ b/drm/nouveau/nvkm/subdev/gpio/base.c
diff --git a/nvkm/subdev/gpio/nv10.c b/drm/nouveau/nvkm/subdev/gpio/nv10.c
index 27ad23eaf..27ad23eaf 100644
--- a/nvkm/subdev/gpio/nv10.c
+++ b/drm/nouveau/nvkm/subdev/gpio/nv10.c
diff --git a/nvkm/subdev/gpio/nv50.c b/drm/nouveau/nvkm/subdev/gpio/nv50.c
index 2e30d5a62..2e30d5a62 100644
--- a/nvkm/subdev/gpio/nv50.c
+++ b/drm/nouveau/nvkm/subdev/gpio/nv50.c
diff --git a/nvkm/subdev/gpio/nv94.c b/drm/nouveau/nvkm/subdev/gpio/nv94.c
index cae404cca..cae404cca 100644
--- a/nvkm/subdev/gpio/nv94.c
+++ b/drm/nouveau/nvkm/subdev/gpio/nv94.c
diff --git a/nvkm/subdev/gpio/nvd0.c b/drm/nouveau/nvkm/subdev/gpio/nvd0.c
index 480d6d2af..480d6d2af 100644
--- a/nvkm/subdev/gpio/nvd0.c
+++ b/drm/nouveau/nvkm/subdev/gpio/nvd0.c
diff --git a/nvkm/subdev/gpio/nve0.c b/drm/nouveau/nvkm/subdev/gpio/nve0.c
index e1145b48c..e1145b48c 100644
--- a/nvkm/subdev/gpio/nve0.c
+++ b/drm/nouveau/nvkm/subdev/gpio/nve0.c
diff --git a/nvkm/subdev/gpio/priv.h b/drm/nouveau/nvkm/subdev/gpio/priv.h
index bff98b86e..bff98b86e 100644
--- a/nvkm/subdev/gpio/priv.h
+++ b/drm/nouveau/nvkm/subdev/gpio/priv.h
diff --git a/drm/nouveau/nvkm/subdev/i2c/Kbuild b/drm/nouveau/nvkm/subdev/i2c/Kbuild
new file mode 100644
index 000000000..cc8bd8368
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/i2c/Kbuild
@@ -0,0 +1,16 @@
+nvkm-y += nvkm/subdev/i2c/base.o
+nvkm-y += nvkm/subdev/i2c/anx9805.o
+nvkm-y += nvkm/subdev/i2c/aux.o
+nvkm-y += nvkm/subdev/i2c/bit.o
+nvkm-y += nvkm/subdev/i2c/pad.o
+nvkm-y += nvkm/subdev/i2c/padnv04.o
+nvkm-y += nvkm/subdev/i2c/padnv94.o
+nvkm-y += nvkm/subdev/i2c/padgm204.o
+nvkm-y += nvkm/subdev/i2c/nv04.o
+nvkm-y += nvkm/subdev/i2c/nv4e.o
+nvkm-y += nvkm/subdev/i2c/nv50.o
+nvkm-y += nvkm/subdev/i2c/nv94.o
+nvkm-y += nvkm/subdev/i2c/nvd0.o
+nvkm-y += nvkm/subdev/i2c/gf117.o
+nvkm-y += nvkm/subdev/i2c/nve0.o
+nvkm-y += nvkm/subdev/i2c/gm204.o
diff --git a/nvkm/subdev/i2c/anx9805.c b/drm/nouveau/nvkm/subdev/i2c/anx9805.c
index 2c2731a6c..2c2731a6c 100644
--- a/nvkm/subdev/i2c/anx9805.c
+++ b/drm/nouveau/nvkm/subdev/i2c/anx9805.c
diff --git a/nvkm/subdev/i2c/aux.c b/drm/nouveau/nvkm/subdev/i2c/aux.c
index 02eb42be2..02eb42be2 100644
--- a/nvkm/subdev/i2c/aux.c
+++ b/drm/nouveau/nvkm/subdev/i2c/aux.c
diff --git a/nvkm/subdev/i2c/base.c b/drm/nouveau/nvkm/subdev/i2c/base.c
index d1f06e9aa..d1f06e9aa 100644
--- a/nvkm/subdev/i2c/base.c
+++ b/drm/nouveau/nvkm/subdev/i2c/base.c
diff --git a/nvkm/subdev/i2c/bit.c b/drm/nouveau/nvkm/subdev/i2c/bit.c
index 813ffc96e..813ffc96e 100644
--- a/nvkm/subdev/i2c/bit.c
+++ b/drm/nouveau/nvkm/subdev/i2c/bit.c
diff --git a/nvkm/subdev/i2c/gf117.c b/drm/nouveau/nvkm/subdev/i2c/gf117.c
index fa891c398..fa891c398 100644
--- a/nvkm/subdev/i2c/gf117.c
+++ b/drm/nouveau/nvkm/subdev/i2c/gf117.c
diff --git a/nvkm/subdev/i2c/gm204.c b/drm/nouveau/nvkm/subdev/i2c/gm204.c
index 06a2b87cc..06a2b87cc 100644
--- a/nvkm/subdev/i2c/gm204.c
+++ b/drm/nouveau/nvkm/subdev/i2c/gm204.c
diff --git a/nvkm/subdev/i2c/nv04.c b/drm/nouveau/nvkm/subdev/i2c/nv04.c
index 0db5de6a2..0db5de6a2 100644
--- a/nvkm/subdev/i2c/nv04.c
+++ b/drm/nouveau/nvkm/subdev/i2c/nv04.c
diff --git a/nvkm/subdev/i2c/nv4e.c b/drm/nouveau/nvkm/subdev/i2c/nv4e.c
index 0d783890f..0d783890f 100644
--- a/nvkm/subdev/i2c/nv4e.c
+++ b/drm/nouveau/nvkm/subdev/i2c/nv4e.c
diff --git a/nvkm/subdev/i2c/nv50.c b/drm/nouveau/nvkm/subdev/i2c/nv50.c
index 33dd89f5c..33dd89f5c 100644
--- a/nvkm/subdev/i2c/nv50.c
+++ b/drm/nouveau/nvkm/subdev/i2c/nv50.c
diff --git a/nvkm/subdev/i2c/nv50.h b/drm/nouveau/nvkm/subdev/i2c/nv50.h
index 9ef965692..9ef965692 100644
--- a/nvkm/subdev/i2c/nv50.h
+++ b/drm/nouveau/nvkm/subdev/i2c/nv50.h
diff --git a/nvkm/subdev/i2c/nv94.c b/drm/nouveau/nvkm/subdev/i2c/nv94.c
index e383ee81f..e383ee81f 100644
--- a/nvkm/subdev/i2c/nv94.c
+++ b/drm/nouveau/nvkm/subdev/i2c/nv94.c
diff --git a/nvkm/subdev/i2c/nvd0.c b/drm/nouveau/nvkm/subdev/i2c/nvd0.c
index 62dde9b09..62dde9b09 100644
--- a/nvkm/subdev/i2c/nvd0.c
+++ b/drm/nouveau/nvkm/subdev/i2c/nvd0.c
diff --git a/nvkm/subdev/i2c/nve0.c b/drm/nouveau/nvkm/subdev/i2c/nve0.c
index 25fe5c2d1..25fe5c2d1 100644
--- a/nvkm/subdev/i2c/nve0.c
+++ b/drm/nouveau/nvkm/subdev/i2c/nve0.c
diff --git a/nvkm/subdev/i2c/pad.c b/drm/nouveau/nvkm/subdev/i2c/pad.c
index a3d0d82ff..a3d0d82ff 100644
--- a/nvkm/subdev/i2c/pad.c
+++ b/drm/nouveau/nvkm/subdev/i2c/pad.c
diff --git a/nvkm/subdev/i2c/pad.h b/drm/nouveau/nvkm/subdev/i2c/pad.h
index f03138b2e..f03138b2e 100644
--- a/nvkm/subdev/i2c/pad.h
+++ b/drm/nouveau/nvkm/subdev/i2c/pad.h
diff --git a/nvkm/subdev/i2c/padgm204.c b/drm/nouveau/nvkm/subdev/i2c/padgm204.c
index 1630a934b..1630a934b 100644
--- a/nvkm/subdev/i2c/padgm204.c
+++ b/drm/nouveau/nvkm/subdev/i2c/padgm204.c
diff --git a/nvkm/subdev/i2c/padnv04.c b/drm/nouveau/nvkm/subdev/i2c/padnv04.c
index 2c4b61296..2c4b61296 100644
--- a/nvkm/subdev/i2c/padnv04.c
+++ b/drm/nouveau/nvkm/subdev/i2c/padnv04.c
diff --git a/nvkm/subdev/i2c/padnv94.c b/drm/nouveau/nvkm/subdev/i2c/padnv94.c
index afe79892f..afe79892f 100644
--- a/nvkm/subdev/i2c/padnv94.c
+++ b/drm/nouveau/nvkm/subdev/i2c/padnv94.c
diff --git a/nvkm/subdev/i2c/port.h b/drm/nouveau/nvkm/subdev/i2c/port.h
index b9acf788e..b9acf788e 100644
--- a/nvkm/subdev/i2c/port.h
+++ b/drm/nouveau/nvkm/subdev/i2c/port.h
diff --git a/nvkm/subdev/i2c/priv.h b/drm/nouveau/nvkm/subdev/i2c/priv.h
index 4fe7ae3fd..4fe7ae3fd 100644
--- a/nvkm/subdev/i2c/priv.h
+++ b/drm/nouveau/nvkm/subdev/i2c/priv.h
diff --git a/drm/nouveau/nvkm/subdev/ibus/Kbuild b/drm/nouveau/nvkm/subdev/ibus/Kbuild
new file mode 100644
index 000000000..a006e535e
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/ibus/Kbuild
@@ -0,0 +1,3 @@
+nvkm-y += nvkm/subdev/ibus/nvc0.o
+nvkm-y += nvkm/subdev/ibus/nve0.o
+nvkm-y += nvkm/subdev/ibus/gk20a.o
diff --git a/nvkm/subdev/ibus/gk20a.c b/drm/nouveau/nvkm/subdev/ibus/gk20a.c
index 245f0ebaa..245f0ebaa 100644
--- a/nvkm/subdev/ibus/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/ibus/gk20a.c
diff --git a/nvkm/subdev/ibus/nvc0.c b/drm/nouveau/nvkm/subdev/ibus/nvc0.c
index 4e977ff27..4e977ff27 100644
--- a/nvkm/subdev/ibus/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/ibus/nvc0.c
diff --git a/nvkm/subdev/ibus/nve0.c b/drm/nouveau/nvkm/subdev/ibus/nve0.c
index ebef970a0..ebef970a0 100644
--- a/nvkm/subdev/ibus/nve0.c
+++ b/drm/nouveau/nvkm/subdev/ibus/nve0.c
diff --git a/drm/nouveau/nvkm/subdev/instmem/Kbuild b/drm/nouveau/nvkm/subdev/instmem/Kbuild
new file mode 100644
index 000000000..e6f35abe7
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/instmem/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/subdev/instmem/base.o
+nvkm-y += nvkm/subdev/instmem/nv04.o
+nvkm-y += nvkm/subdev/instmem/nv40.o
+nvkm-y += nvkm/subdev/instmem/nv50.o
diff --git a/nvkm/subdev/instmem/base.c b/drm/nouveau/nvkm/subdev/instmem/base.c
index 767fcf70f..767fcf70f 100644
--- a/nvkm/subdev/instmem/base.c
+++ b/drm/nouveau/nvkm/subdev/instmem/base.c
diff --git a/nvkm/subdev/instmem/nv04.c b/drm/nouveau/nvkm/subdev/instmem/nv04.c
index 9ffd2d8d7..9ffd2d8d7 100644
--- a/nvkm/subdev/instmem/nv04.c
+++ b/drm/nouveau/nvkm/subdev/instmem/nv04.c
diff --git a/nvkm/subdev/instmem/nv04.h b/drm/nouveau/nvkm/subdev/instmem/nv04.h
index 095fbc6fc..095fbc6fc 100644
--- a/nvkm/subdev/instmem/nv04.h
+++ b/drm/nouveau/nvkm/subdev/instmem/nv04.h
diff --git a/nvkm/subdev/instmem/nv40.c b/drm/nouveau/nvkm/subdev/instmem/nv40.c
index 8803809f9..8803809f9 100644
--- a/nvkm/subdev/instmem/nv40.c
+++ b/drm/nouveau/nvkm/subdev/instmem/nv40.c
diff --git a/nvkm/subdev/instmem/nv50.c b/drm/nouveau/nvkm/subdev/instmem/nv50.c
index 64ee68023..64ee68023 100644
--- a/nvkm/subdev/instmem/nv50.c
+++ b/drm/nouveau/nvkm/subdev/instmem/nv50.c
diff --git a/nvkm/subdev/instmem/priv.h b/drm/nouveau/nvkm/subdev/instmem/priv.h
index 8d67dedc5..8d67dedc5 100644
--- a/nvkm/subdev/instmem/priv.h
+++ b/drm/nouveau/nvkm/subdev/instmem/priv.h
diff --git a/drm/nouveau/nvkm/subdev/ltc/Kbuild b/drm/nouveau/nvkm/subdev/ltc/Kbuild
new file mode 100644
index 000000000..e5df3d865
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/ltc/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/subdev/ltc/base.o
+nvkm-y += nvkm/subdev/ltc/gf100.o
+nvkm-y += nvkm/subdev/ltc/gk104.o
+nvkm-y += nvkm/subdev/ltc/gm107.o
diff --git a/nvkm/subdev/ltc/base.c b/drm/nouveau/nvkm/subdev/ltc/base.c
index 7fa331516..7fa331516 100644
--- a/nvkm/subdev/ltc/base.c
+++ b/drm/nouveau/nvkm/subdev/ltc/base.c
diff --git a/nvkm/subdev/ltc/gf100.c b/drm/nouveau/nvkm/subdev/ltc/gf100.c
index 2db097728..2db097728 100644
--- a/nvkm/subdev/ltc/gf100.c
+++ b/drm/nouveau/nvkm/subdev/ltc/gf100.c
diff --git a/nvkm/subdev/ltc/gk104.c b/drm/nouveau/nvkm/subdev/ltc/gk104.c
index b39b5d0eb..b39b5d0eb 100644
--- a/nvkm/subdev/ltc/gk104.c
+++ b/drm/nouveau/nvkm/subdev/ltc/gk104.c
diff --git a/nvkm/subdev/ltc/gm107.c b/drm/nouveau/nvkm/subdev/ltc/gm107.c
index 89fc4238f..89fc4238f 100644
--- a/nvkm/subdev/ltc/gm107.c
+++ b/drm/nouveau/nvkm/subdev/ltc/gm107.c
diff --git a/nvkm/subdev/ltc/priv.h b/drm/nouveau/nvkm/subdev/ltc/priv.h
index 41f179d93..41f179d93 100644
--- a/nvkm/subdev/ltc/priv.h
+++ b/drm/nouveau/nvkm/subdev/ltc/priv.h
diff --git a/drm/nouveau/nvkm/subdev/mc/Kbuild b/drm/nouveau/nvkm/subdev/mc/Kbuild
new file mode 100644
index 000000000..24b589b50
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/mc/Kbuild
@@ -0,0 +1,11 @@
+nvkm-y += nvkm/subdev/mc/base.o
+nvkm-y += nvkm/subdev/mc/nv04.o
+nvkm-y += nvkm/subdev/mc/nv40.o
+nvkm-y += nvkm/subdev/mc/nv44.o
+nvkm-y += nvkm/subdev/mc/nv4c.o
+nvkm-y += nvkm/subdev/mc/nv50.o
+nvkm-y += nvkm/subdev/mc/nv94.o
+nvkm-y += nvkm/subdev/mc/nv98.o
+nvkm-y += nvkm/subdev/mc/nvc0.o
+nvkm-y += nvkm/subdev/mc/nvc3.o
+nvkm-y += nvkm/subdev/mc/gk20a.o
diff --git a/nvkm/subdev/mc/base.c b/drm/nouveau/nvkm/subdev/mc/base.c
index 25e3b9644..25e3b9644 100644
--- a/nvkm/subdev/mc/base.c
+++ b/drm/nouveau/nvkm/subdev/mc/base.c
diff --git a/nvkm/subdev/mc/gk20a.c b/drm/nouveau/nvkm/subdev/mc/gk20a.c
index b8d6cb435..b8d6cb435 100644
--- a/nvkm/subdev/mc/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/mc/gk20a.c
diff --git a/nvkm/subdev/mc/nv04.c b/drm/nouveau/nvkm/subdev/mc/nv04.c
index 2d787e4df..2d787e4df 100644
--- a/nvkm/subdev/mc/nv04.c
+++ b/drm/nouveau/nvkm/subdev/mc/nv04.c
diff --git a/nvkm/subdev/mc/nv04.h b/drm/nouveau/nvkm/subdev/mc/nv04.h
index 4d9ea46c4..4d9ea46c4 100644
--- a/nvkm/subdev/mc/nv04.h
+++ b/drm/nouveau/nvkm/subdev/mc/nv04.h
diff --git a/nvkm/subdev/mc/nv40.c b/drm/nouveau/nvkm/subdev/mc/nv40.c
index 5b1faecfe..5b1faecfe 100644
--- a/nvkm/subdev/mc/nv40.c
+++ b/drm/nouveau/nvkm/subdev/mc/nv40.c
diff --git a/nvkm/subdev/mc/nv44.c b/drm/nouveau/nvkm/subdev/mc/nv44.c
index cc4d0d2d8..cc4d0d2d8 100644
--- a/nvkm/subdev/mc/nv44.c
+++ b/drm/nouveau/nvkm/subdev/mc/nv44.c
diff --git a/nvkm/subdev/mc/nv4c.c b/drm/nouveau/nvkm/subdev/mc/nv4c.c
index 165401c40..165401c40 100644
--- a/nvkm/subdev/mc/nv4c.c
+++ b/drm/nouveau/nvkm/subdev/mc/nv4c.c
diff --git a/nvkm/subdev/mc/nv50.c b/drm/nouveau/nvkm/subdev/mc/nv50.c
index 9ca93e271..9ca93e271 100644
--- a/nvkm/subdev/mc/nv50.c
+++ b/drm/nouveau/nvkm/subdev/mc/nv50.c
diff --git a/nvkm/subdev/mc/nv94.c b/drm/nouveau/nvkm/subdev/mc/nv94.c
index 5f4541105..5f4541105 100644
--- a/nvkm/subdev/mc/nv94.c
+++ b/drm/nouveau/nvkm/subdev/mc/nv94.c
diff --git a/nvkm/subdev/mc/nv98.c b/drm/nouveau/nvkm/subdev/mc/nv98.c
index 3c76d9038..3c76d9038 100644
--- a/nvkm/subdev/mc/nv98.c
+++ b/drm/nouveau/nvkm/subdev/mc/nv98.c
diff --git a/nvkm/subdev/mc/nvc0.c b/drm/nouveau/nvkm/subdev/mc/nvc0.c
index 15d41dc17..15d41dc17 100644
--- a/nvkm/subdev/mc/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/mc/nvc0.c
diff --git a/nvkm/subdev/mc/nvc3.c b/drm/nouveau/nvkm/subdev/mc/nvc3.c
index 68b5f61aa..68b5f61aa 100644
--- a/nvkm/subdev/mc/nvc3.c
+++ b/drm/nouveau/nvkm/subdev/mc/nvc3.c
diff --git a/nvkm/subdev/mc/priv.h b/drm/nouveau/nvkm/subdev/mc/priv.h
index 911e66392..911e66392 100644
--- a/nvkm/subdev/mc/priv.h
+++ b/drm/nouveau/nvkm/subdev/mc/priv.h
diff --git a/drm/nouveau/nvkm/subdev/mxm/Kbuild b/drm/nouveau/nvkm/subdev/mxm/Kbuild
new file mode 100644
index 000000000..1a479e050
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/mxm/Kbuild
@@ -0,0 +1,3 @@
+nvkm-y += nvkm/subdev/mxm/base.o
+nvkm-y += nvkm/subdev/mxm/mxms.o
+nvkm-y += nvkm/subdev/mxm/nv50.o
diff --git a/nvkm/subdev/mxm/base.c b/drm/nouveau/nvkm/subdev/mxm/base.c
index 51fcf7960..51fcf7960 100644
--- a/nvkm/subdev/mxm/base.c
+++ b/drm/nouveau/nvkm/subdev/mxm/base.c
diff --git a/nvkm/subdev/mxm/mxms.c b/drm/nouveau/nvkm/subdev/mxm/mxms.c
index 4bde7f7f7..4bde7f7f7 100644
--- a/nvkm/subdev/mxm/mxms.c
+++ b/drm/nouveau/nvkm/subdev/mxm/mxms.c
diff --git a/nvkm/subdev/mxm/mxms.h b/drm/nouveau/nvkm/subdev/mxm/mxms.h
index 5e0be0c59..5e0be0c59 100644
--- a/nvkm/subdev/mxm/mxms.h
+++ b/drm/nouveau/nvkm/subdev/mxm/mxms.h
diff --git a/nvkm/subdev/mxm/nv50.c b/drm/nouveau/nvkm/subdev/mxm/nv50.c
index fcaabe845..fcaabe845 100644
--- a/nvkm/subdev/mxm/nv50.c
+++ b/drm/nouveau/nvkm/subdev/mxm/nv50.c
diff --git a/drm/nouveau/nvkm/subdev/pwr/Kbuild b/drm/nouveau/nvkm/subdev/pwr/Kbuild
new file mode 100644
index 000000000..a66488604
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/pwr/Kbuild
@@ -0,0 +1,8 @@
+nvkm-y += nvkm/subdev/pwr/base.o
+nvkm-y += nvkm/subdev/pwr/memx.o
+nvkm-y += nvkm/subdev/pwr/nva3.o
+nvkm-y += nvkm/subdev/pwr/nvc0.o
+nvkm-y += nvkm/subdev/pwr/nvd0.o
+nvkm-y += nvkm/subdev/pwr/gk104.o
+nvkm-y += nvkm/subdev/pwr/nv108.o
+nvkm-y += nvkm/subdev/pwr/gk20a.o
diff --git a/nvkm/subdev/pwr/base.c b/drm/nouveau/nvkm/subdev/pwr/base.c
index 1ea433a5e..1ea433a5e 100644
--- a/nvkm/subdev/pwr/base.c
+++ b/drm/nouveau/nvkm/subdev/pwr/base.c
diff --git a/nvkm/subdev/pwr/fuc/arith.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/arith.fuc
index 214a6d9e0..214a6d9e0 100644
--- a/nvkm/subdev/pwr/fuc/arith.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/arith.fuc
diff --git a/nvkm/subdev/pwr/fuc/host.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/host.fuc
index c2bb616a8..c2bb616a8 100644
--- a/nvkm/subdev/pwr/fuc/host.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/host.fuc
diff --git a/nvkm/subdev/pwr/fuc/i2c_.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/i2c_.fuc
index 757dda700..757dda700 100644
--- a/nvkm/subdev/pwr/fuc/i2c_.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/i2c_.fuc
diff --git a/nvkm/subdev/pwr/fuc/idle.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/idle.fuc
index 98f1c3738..98f1c3738 100644
--- a/nvkm/subdev/pwr/fuc/idle.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/idle.fuc
diff --git a/nvkm/subdev/pwr/fuc/kernel.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/kernel.fuc
index 5cf5be63c..5cf5be63c 100644
--- a/nvkm/subdev/pwr/fuc/kernel.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/kernel.fuc
diff --git a/nvkm/subdev/pwr/fuc/macros.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/macros.fuc
index 96fc984da..96fc984da 100644
--- a/nvkm/subdev/pwr/fuc/macros.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/macros.fuc
diff --git a/nvkm/subdev/pwr/fuc/memx.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/memx.fuc
index ec03f9a42..ec03f9a42 100644
--- a/nvkm/subdev/pwr/fuc/memx.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/memx.fuc
diff --git a/nvkm/subdev/pwr/fuc/nv108.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/nv108.fuc5
index b439519ec..b439519ec 100644
--- a/nvkm/subdev/pwr/fuc/nv108.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nv108.fuc5
diff --git a/nvkm/subdev/pwr/fuc/nv108.fuc.h b/drm/nouveau/nvkm/subdev/pwr/fuc/nv108.fuc5.h
index 713e11e29..713e11e29 100644
--- a/nvkm/subdev/pwr/fuc/nv108.fuc.h
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nv108.fuc5.h
diff --git a/nvkm/subdev/pwr/fuc/nva3.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/nva3.fuc3
index daa06c1c6..daa06c1c6 100644
--- a/nvkm/subdev/pwr/fuc/nva3.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nva3.fuc3
diff --git a/nvkm/subdev/pwr/fuc/nva3.fuc.h b/drm/nouveau/nvkm/subdev/pwr/fuc/nva3.fuc3.h
index d1f9b6cb6..d1f9b6cb6 100644
--- a/nvkm/subdev/pwr/fuc/nva3.fuc.h
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nva3.fuc3.h
diff --git a/nvkm/subdev/pwr/fuc/nvc0.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/nvc0.fuc3
index 21bf8cc76..21bf8cc76 100644
--- a/nvkm/subdev/pwr/fuc/nvc0.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nvc0.fuc3
diff --git a/nvkm/subdev/pwr/fuc/nvc0.fuc.h b/drm/nouveau/nvkm/subdev/pwr/fuc/nvc0.fuc3.h
index 90221d973..90221d973 100644
--- a/nvkm/subdev/pwr/fuc/nvc0.fuc.h
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nvc0.fuc3.h
diff --git a/nvkm/subdev/pwr/fuc/nvd0.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/nvd0.fuc4
index b85443261..b85443261 100644
--- a/nvkm/subdev/pwr/fuc/nvd0.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nvd0.fuc4
diff --git a/nvkm/subdev/pwr/fuc/nvd0.fuc.h b/drm/nouveau/nvkm/subdev/pwr/fuc/nvd0.fuc4.h
index 7e16aab44..7e16aab44 100644
--- a/nvkm/subdev/pwr/fuc/nvd0.fuc.h
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/nvd0.fuc4.h
diff --git a/nvkm/subdev/pwr/fuc/os.h b/drm/nouveau/nvkm/subdev/pwr/fuc/os.h
index c8b06cb77..c8b06cb77 100644
--- a/nvkm/subdev/pwr/fuc/os.h
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/os.h
diff --git a/nvkm/subdev/pwr/fuc/perf.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/perf.fuc
index 38eadf705..38eadf705 100644
--- a/nvkm/subdev/pwr/fuc/perf.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/perf.fuc
diff --git a/nvkm/subdev/pwr/fuc/test.fuc b/drm/nouveau/nvkm/subdev/pwr/fuc/test.fuc
index 0c3a71bf5..0c3a71bf5 100644
--- a/nvkm/subdev/pwr/fuc/test.fuc
+++ b/drm/nouveau/nvkm/subdev/pwr/fuc/test.fuc
diff --git a/nvkm/subdev/pwr/gk104.c b/drm/nouveau/nvkm/subdev/pwr/gk104.c
index d76612999..9bb419c90 100644
--- a/nvkm/subdev/pwr/gk104.c
+++ b/drm/nouveau/nvkm/subdev/pwr/gk104.c
@@ -26,7 +26,7 @@
#define nvd0_pwr_code gk104_pwr_code
#define nvd0_pwr_data gk104_pwr_data
-#include "fuc/nvd0.fuc.h"
+#include "fuc/nvd0.fuc4.h"
static void
gk104_pwr_pgob(struct nouveau_pwr *ppwr, bool enable)
diff --git a/nvkm/subdev/pwr/gk20a.c b/drm/nouveau/nvkm/subdev/pwr/gk20a.c
index f6b7df1b1..f6b7df1b1 100644
--- a/nvkm/subdev/pwr/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/pwr/gk20a.c
diff --git a/nvkm/subdev/pwr/memx.c b/drm/nouveau/nvkm/subdev/pwr/memx.c
index 7a9299d71..7a9299d71 100644
--- a/nvkm/subdev/pwr/memx.c
+++ b/drm/nouveau/nvkm/subdev/pwr/memx.c
diff --git a/nvkm/subdev/pwr/nv108.c b/drm/nouveau/nvkm/subdev/pwr/nv108.c
index 04ff7c3c3..dacee084a 100644
--- a/nvkm/subdev/pwr/nv108.c
+++ b/drm/nouveau/nvkm/subdev/pwr/nv108.c
@@ -23,7 +23,7 @@
*/
#include "priv.h"
-#include "fuc/nv108.fuc.h"
+#include "fuc/nv108.fuc5.h"
struct nouveau_oclass *
nv108_pwr_oclass = &(struct nvkm_pwr_impl) {
diff --git a/nvkm/subdev/pwr/nva3.c b/drm/nouveau/nvkm/subdev/pwr/nva3.c
index 998d53076..f8325a697 100644
--- a/nvkm/subdev/pwr/nva3.c
+++ b/drm/nouveau/nvkm/subdev/pwr/nva3.c
@@ -23,7 +23,7 @@
*/
#include "priv.h"
-#include "fuc/nva3.fuc.h"
+#include "fuc/nva3.fuc3.h"
static int
nva3_pwr_init(struct nouveau_object *object)
diff --git a/nvkm/subdev/pwr/nvc0.c b/drm/nouveau/nvkm/subdev/pwr/nvc0.c
index 9a773e66e..669417c23 100644
--- a/nvkm/subdev/pwr/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/pwr/nvc0.c
@@ -23,7 +23,7 @@
*/
#include "priv.h"
-#include "fuc/nvc0.fuc.h"
+#include "fuc/nvc0.fuc3.h"
struct nouveau_oclass *
nvc0_pwr_oclass = &(struct nvkm_pwr_impl) {
diff --git a/nvkm/subdev/pwr/nvd0.c b/drm/nouveau/nvkm/subdev/pwr/nvd0.c
index 2b29be5d0..d6e33d0a0 100644
--- a/nvkm/subdev/pwr/nvd0.c
+++ b/drm/nouveau/nvkm/subdev/pwr/nvd0.c
@@ -23,7 +23,7 @@
*/
#include "priv.h"
-#include "fuc/nvd0.fuc.h"
+#include "fuc/nvd0.fuc4.h"
struct nouveau_oclass *
nvd0_pwr_oclass = &(struct nvkm_pwr_impl) {
diff --git a/nvkm/subdev/pwr/priv.h b/drm/nouveau/nvkm/subdev/pwr/priv.h
index 86149d9a4..86149d9a4 100644
--- a/nvkm/subdev/pwr/priv.h
+++ b/drm/nouveau/nvkm/subdev/pwr/priv.h
diff --git a/drm/nouveau/nvkm/subdev/therm/Kbuild b/drm/nouveau/nvkm/subdev/therm/Kbuild
new file mode 100644
index 000000000..9ac820709
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/therm/Kbuild
@@ -0,0 +1,13 @@
+nvkm-y += nvkm/subdev/therm/base.o
+nvkm-y += nvkm/subdev/therm/fan.o
+nvkm-y += nvkm/subdev/therm/fannil.o
+nvkm-y += nvkm/subdev/therm/fanpwm.o
+nvkm-y += nvkm/subdev/therm/fantog.o
+nvkm-y += nvkm/subdev/therm/ic.o
+nvkm-y += nvkm/subdev/therm/temp.o
+nvkm-y += nvkm/subdev/therm/nv40.o
+nvkm-y += nvkm/subdev/therm/nv50.o
+nvkm-y += nvkm/subdev/therm/nv84.o
+nvkm-y += nvkm/subdev/therm/nva3.o
+nvkm-y += nvkm/subdev/therm/nvd0.o
+nvkm-y += nvkm/subdev/therm/gm107.o
diff --git a/nvkm/subdev/therm/base.c b/drm/nouveau/nvkm/subdev/therm/base.c
index 9ad01da6e..9ad01da6e 100644
--- a/nvkm/subdev/therm/base.c
+++ b/drm/nouveau/nvkm/subdev/therm/base.c
diff --git a/nvkm/subdev/therm/fan.c b/drm/nouveau/nvkm/subdev/therm/fan.c
index 3656d6051..3656d6051 100644
--- a/nvkm/subdev/therm/fan.c
+++ b/drm/nouveau/nvkm/subdev/therm/fan.c
diff --git a/nvkm/subdev/therm/fannil.c b/drm/nouveau/nvkm/subdev/therm/fannil.c
index b78c182e1..b78c182e1 100644
--- a/nvkm/subdev/therm/fannil.c
+++ b/drm/nouveau/nvkm/subdev/therm/fannil.c
diff --git a/nvkm/subdev/therm/fanpwm.c b/drm/nouveau/nvkm/subdev/therm/fanpwm.c
index c629d7f2a..c629d7f2a 100644
--- a/nvkm/subdev/therm/fanpwm.c
+++ b/drm/nouveau/nvkm/subdev/therm/fanpwm.c
diff --git a/nvkm/subdev/therm/fantog.c b/drm/nouveau/nvkm/subdev/therm/fantog.c
index f69dab11f..f69dab11f 100644
--- a/nvkm/subdev/therm/fantog.c
+++ b/drm/nouveau/nvkm/subdev/therm/fantog.c
diff --git a/nvkm/subdev/therm/gm107.c b/drm/nouveau/nvkm/subdev/therm/gm107.c
index 668cf3322..668cf3322 100644
--- a/nvkm/subdev/therm/gm107.c
+++ b/drm/nouveau/nvkm/subdev/therm/gm107.c
diff --git a/nvkm/subdev/therm/ic.c b/drm/nouveau/nvkm/subdev/therm/ic.c
index ca9ad9fd4..ca9ad9fd4 100644
--- a/nvkm/subdev/therm/ic.c
+++ b/drm/nouveau/nvkm/subdev/therm/ic.c
diff --git a/nvkm/subdev/therm/nv40.c b/drm/nouveau/nvkm/subdev/therm/nv40.c
index 002e51b3a..002e51b3a 100644
--- a/nvkm/subdev/therm/nv40.c
+++ b/drm/nouveau/nvkm/subdev/therm/nv40.c
diff --git a/nvkm/subdev/therm/nv50.c b/drm/nouveau/nvkm/subdev/therm/nv50.c
index 321db927d..321db927d 100644
--- a/nvkm/subdev/therm/nv50.c
+++ b/drm/nouveau/nvkm/subdev/therm/nv50.c
diff --git a/nvkm/subdev/therm/nv84.c b/drm/nouveau/nvkm/subdev/therm/nv84.c
index 14e2e09bf..14e2e09bf 100644
--- a/nvkm/subdev/therm/nv84.c
+++ b/drm/nouveau/nvkm/subdev/therm/nv84.c
diff --git a/nvkm/subdev/therm/nva3.c b/drm/nouveau/nvkm/subdev/therm/nva3.c
index 7893357a7..7893357a7 100644
--- a/nvkm/subdev/therm/nva3.c
+++ b/drm/nouveau/nvkm/subdev/therm/nva3.c
diff --git a/nvkm/subdev/therm/nvd0.c b/drm/nouveau/nvkm/subdev/therm/nvd0.c
index b70f7cc64..b70f7cc64 100644
--- a/nvkm/subdev/therm/nvd0.c
+++ b/drm/nouveau/nvkm/subdev/therm/nvd0.c
diff --git a/nvkm/subdev/therm/priv.h b/drm/nouveau/nvkm/subdev/therm/priv.h
index 7dba8c281..7dba8c281 100644
--- a/nvkm/subdev/therm/priv.h
+++ b/drm/nouveau/nvkm/subdev/therm/priv.h
diff --git a/nvkm/subdev/therm/temp.c b/drm/nouveau/nvkm/subdev/therm/temp.c
index 6212537b9..6212537b9 100644
--- a/nvkm/subdev/therm/temp.c
+++ b/drm/nouveau/nvkm/subdev/therm/temp.c
diff --git a/drm/nouveau/nvkm/subdev/timer/Kbuild b/drm/nouveau/nvkm/subdev/timer/Kbuild
new file mode 100644
index 000000000..d1d38b4ba
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/timer/Kbuild
@@ -0,0 +1,3 @@
+nvkm-y += nvkm/subdev/timer/base.o
+nvkm-y += nvkm/subdev/timer/nv04.o
+nvkm-y += nvkm/subdev/timer/gk20a.o
diff --git a/nvkm/subdev/timer/base.c b/drm/nouveau/nvkm/subdev/timer/base.c
index cf8a0e0f8..cf8a0e0f8 100644
--- a/nvkm/subdev/timer/base.c
+++ b/drm/nouveau/nvkm/subdev/timer/base.c
diff --git a/nvkm/subdev/timer/gk20a.c b/drm/nouveau/nvkm/subdev/timer/gk20a.c
index 37484db1f..37484db1f 100644
--- a/nvkm/subdev/timer/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/timer/gk20a.c
diff --git a/nvkm/subdev/timer/nv04.c b/drm/nouveau/nvkm/subdev/timer/nv04.c
index 240ed0b98..240ed0b98 100644
--- a/nvkm/subdev/timer/nv04.c
+++ b/drm/nouveau/nvkm/subdev/timer/nv04.c
diff --git a/nvkm/subdev/timer/nv04.h b/drm/nouveau/nvkm/subdev/timer/nv04.h
index 4bc152697..4bc152697 100644
--- a/nvkm/subdev/timer/nv04.h
+++ b/drm/nouveau/nvkm/subdev/timer/nv04.h
diff --git a/nvkm/subdev/timer/priv.h b/drm/nouveau/nvkm/subdev/timer/priv.h
index 799dae3f2..799dae3f2 100644
--- a/nvkm/subdev/timer/priv.h
+++ b/drm/nouveau/nvkm/subdev/timer/priv.h
diff --git a/drm/nouveau/nvkm/subdev/vm/Kbuild b/drm/nouveau/nvkm/subdev/vm/Kbuild
new file mode 100644
index 000000000..b0290c056
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/vm/Kbuild
@@ -0,0 +1,6 @@
+nvkm-y += nvkm/subdev/vm/base.o
+nvkm-y += nvkm/subdev/vm/nv04.o
+nvkm-y += nvkm/subdev/vm/nv41.o
+nvkm-y += nvkm/subdev/vm/nv44.o
+nvkm-y += nvkm/subdev/vm/nv50.o
+nvkm-y += nvkm/subdev/vm/nvc0.o
diff --git a/nvkm/subdev/vm/base.c b/drm/nouveau/nvkm/subdev/vm/base.c
index f75a683bd..f75a683bd 100644
--- a/nvkm/subdev/vm/base.c
+++ b/drm/nouveau/nvkm/subdev/vm/base.c
diff --git a/nvkm/subdev/vm/nv04.c b/drm/nouveau/nvkm/subdev/vm/nv04.c
index ed4543716..ed4543716 100644
--- a/nvkm/subdev/vm/nv04.c
+++ b/drm/nouveau/nvkm/subdev/vm/nv04.c
diff --git a/nvkm/subdev/vm/nv04.h b/drm/nouveau/nvkm/subdev/vm/nv04.h
index ec42d4bc8..ec42d4bc8 100644
--- a/nvkm/subdev/vm/nv04.h
+++ b/drm/nouveau/nvkm/subdev/vm/nv04.h
diff --git a/nvkm/subdev/vm/nv41.c b/drm/nouveau/nvkm/subdev/vm/nv41.c
index 064c76262..064c76262 100644
--- a/nvkm/subdev/vm/nv41.c
+++ b/drm/nouveau/nvkm/subdev/vm/nv41.c
diff --git a/nvkm/subdev/vm/nv44.c b/drm/nouveau/nvkm/subdev/vm/nv44.c
index fae1f67d5..fae1f67d5 100644
--- a/nvkm/subdev/vm/nv44.c
+++ b/drm/nouveau/nvkm/subdev/vm/nv44.c
diff --git a/nvkm/subdev/vm/nv50.c b/drm/nouveau/nvkm/subdev/vm/nv50.c
index a4aa81a21..a4aa81a21 100644
--- a/nvkm/subdev/vm/nv50.c
+++ b/drm/nouveau/nvkm/subdev/vm/nv50.c
diff --git a/nvkm/subdev/vm/nvc0.c b/drm/nouveau/nvkm/subdev/vm/nvc0.c
index c0a338920..c0a338920 100644
--- a/nvkm/subdev/vm/nvc0.c
+++ b/drm/nouveau/nvkm/subdev/vm/nvc0.c
diff --git a/drm/nouveau/nvkm/subdev/volt/Kbuild b/drm/nouveau/nvkm/subdev/volt/Kbuild
new file mode 100644
index 000000000..6b46ff421
--- /dev/null
+++ b/drm/nouveau/nvkm/subdev/volt/Kbuild
@@ -0,0 +1,4 @@
+nvkm-y += nvkm/subdev/volt/base.o
+nvkm-y += nvkm/subdev/volt/gpio.o
+nvkm-y += nvkm/subdev/volt/nv40.o
+nvkm-y += nvkm/subdev/volt/gk20a.o
diff --git a/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c
index 26ccd8df1..26ccd8df1 100644
--- a/nvkm/subdev/volt/base.c
+++ b/drm/nouveau/nvkm/subdev/volt/base.c
diff --git a/nvkm/subdev/volt/gk20a.c b/drm/nouveau/nvkm/subdev/volt/gk20a.c
index 717368ef3..717368ef3 100644
--- a/nvkm/subdev/volt/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/volt/gk20a.c
diff --git a/nvkm/subdev/volt/gpio.c b/drm/nouveau/nvkm/subdev/volt/gpio.c
index 755fa91bc..755fa91bc 100644
--- a/nvkm/subdev/volt/gpio.c
+++ b/drm/nouveau/nvkm/subdev/volt/gpio.c
diff --git a/nvkm/subdev/volt/nv40.c b/drm/nouveau/nvkm/subdev/volt/nv40.c
index 87d535837..87d535837 100644
--- a/nvkm/subdev/volt/nv40.c
+++ b/drm/nouveau/nvkm/subdev/volt/nv40.c
diff --git a/include b/include
new file mode 120000
index 000000000..b0632e292
--- /dev/null
+++ b/include
@@ -0,0 +1 @@
+drm/nouveau/include/ \ No newline at end of file
diff --git a/lib/.gitignore b/lib/.gitignore
new file mode 100644
index 000000000..17c42a78a
--- /dev/null
+++ b/lib/.gitignore
@@ -0,0 +1,3 @@
+*.d
+*.o
+libnvif.so
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 000000000..d41530355
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,75 @@
+LIBNVIF_CC := $(CFLAGS) -fPIC
+LIBNVIF_LD := $(LDFLAGS) -shared -lpciaccess -lpthread -ldrm
+
+src := $(drm)
+include $(src)/nvif/Kbuild
+include $(src)/nvkm/Kbuild
+
+fucs := $(drm)/nvkm/engine/copy/fuc/nva3.fuc3.h \
+ $(drm)/nvkm/engine/copy/fuc/nvc0.fuc3.h \
+ $(drm)/nvkm/engine/crypt/fuc/nv98.fuc0s.h \
+ $(drm)/nvkm/engine/graph/fuc/hubnvc0.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/hubnvd7.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/hubnve0.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/hubnvf0.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/hubnv108.fuc5.h \
+ $(drm)/nvkm/engine/graph/fuc/hubgm107.fuc5.h \
+ $(drm)/nvkm/engine/graph/fuc/gpcnvc0.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/gpcnvd7.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/gpcnve0.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/gpcnvf0.fuc3.h \
+ $(drm)/nvkm/engine/graph/fuc/gpcnv108.fuc5.h \
+ $(drm)/nvkm/engine/graph/fuc/gpcgm107.fuc5.h \
+ $(drm)/nvkm/subdev/pwr/fuc/nva3.fuc3.h \
+ $(drm)/nvkm/subdev/pwr/fuc/nvc0.fuc3.h \
+ $(drm)/nvkm/subdev/pwr/fuc/nvd0.fuc4.h \
+ $(drm)/nvkm/subdev/pwr/fuc/nv108.fuc5.h
+drms := $(addprefix $(lib)/, $(nvif-y)) \
+ $(addprefix $(lib)/, $(nvkm-y))
+srcs := $(lib)/drm.o \
+ $(lib)/intr.o \
+ $(lib)/main.o \
+ $(lib)/null.o
+outp := $(lib)/libnvif.so
+
+deps-fuc := $(fucs:$(drm)/%.h=$(lib)/%.d)
+deps-drm := $(drms:%.o=%.d)
+deps-src := $(srcs:%.o=%.d)
+
+$(deps-fuc): $(lib)/%.d : $(drm)/%
+ @mkdir -p $(dir $@)
+ @$(CC) $(LIBNVIF_CC) -E -MM -MP -MT $<.h -MF $@ -xc $<
+$(deps-drm): $(lib)/%.d : $(drm)/%.c
+ @mkdir -p $(dir $@)
+ @$(CC) $(LIBNVIF_CC) -E -MM -MP -MT $(patsubst %.d,%.o,$@) -MF $@ $<
+$(deps-src): $(lib)/%.d : $(lib)/%.c
+ @mkdir -p $(dir $@)
+ @$(CC) $(LIBNVIF_CC) -E -MM -MP -MT $(patsubst %.d,%.o,$@) -MF $@ $<
+
+$(filter %.fuc0s.h,$(fucs)): %.fuc0s.h : %.fuc0s
+ @echo " FUC0S "$@
+ @$(call ENVYPP,$<) | $(ENVYAS) -a -w -mfuc -Vfuc0 -Fcrypt -o $@
+$(filter %.fuc3.h,$(fucs)): %.fuc3.h : %.fuc3
+ @echo " FUC3 "$@
+ @$(call ENVYPP,$<) | $(ENVYAS) -a -w -mfuc -Vfuc3 -o $@
+$(filter %.fuc4.h,$(fucs)): %.fuc4.h : %.fuc4
+ @echo " FUC4 "$@
+ @$(call ENVYPP,$<) | $(ENVYAS) -a -w -mfuc -Vfuc4 -o $@
+$(filter %.fuc5.h,$(fucs)): %.fuc5.h : %.fuc5
+ @echo " FUC5 "$@
+ @$(call ENVYPP,$<) | $(ENVYAS) -a -w -mfuc -Vfuc5 -o $@
+
+$(drms): $(lib)/%.o : $(drm)/%.c
+ @echo " CC "$@
+ @$(CC) $(LIBNVIF_CC) -o $@ -c $<
+$(srcs): $(lib)/%.o : $(lib)/%.c
+ @echo " CC "$@
+ @$(CC) $(LIBNVIF_CC) -o $@ -c $<
+$(outp): $(drms) $(srcs)
+ @echo " CCLD "$@
+ @$(CC) $(LIBNVIF_LD) -o $@ $^
+
+deps += $(deps-fuc) $(deps-drm) $(deps-src)
+objs += $(drms) $(srcs)
+libs += $(outp)
+fws += $(fucs)
diff --git a/lib/Makefile.am b/lib/Makefile.am
deleted file mode 100644
index babf4f243..000000000
--- a/lib/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-noinst_LTLIBRARIES = libpciaccessos.la
-
-libpciaccessos_la_CPPFLAGS = -I${top_srcdir}/nvkm/include \
- -I${top_srcdir}/nvkm \
- -I${top_srcdir} \
- -I/usr/include/libdrm
-libpciaccessos_la_CFLAGS = @PCIACCESS_CFLAGS@
-libpciaccessos_la_LIBADD = @PCIACCESS_LIBS@ -lpthread -ldrm \
- $(top_srcdir)/nvkm/libnvkm.la
-libpciaccessos_la_SOURCES = intr.c \
- main.c \
- null.c \
- kern.c
diff --git a/lib/kern.c b/lib/drm.c
index 47725862b..ac68e1f8d 100644
--- a/lib/kern.c
+++ b/lib/drm.c
@@ -34,7 +34,7 @@
#include <nvif/event.h>
#include <nvif/ioctl.h>
-#include <drm/uapi/drm/nouveau_drm.h>
+#include <uapi/drm/nouveau_drm.h>
struct drm_client_priv {
int fd;
diff --git a/lib/core/list.h b/lib/include/nvif/list.h
index f273376ec..f273376ec 100644
--- a/lib/core/list.h
+++ b/lib/include/nvif/list.h
diff --git a/lib/core/os.h b/lib/include/nvif/os.h
index f42c06df7..f6391a58f 100644
--- a/lib/core/os.h
+++ b/lib/include/nvif/os.h
@@ -958,11 +958,12 @@ flush_work(struct work_struct *work)
typedef struct __wait_queue_head {
} wait_queue_head_t;
-#define init_waitqueue_head(wq)
-#define wake_up(wq)
-#define wake_up_all(wq)
+#define init_waitqueue_head(wq) (void)(wq)
+#define wake_up(wq) (void)(wq)
+#define wake_up_all(wq) (void)(wq)
#define wait_event(wq,cond) do { \
+ (void)(wq); \
usleep(1); \
} while (!(cond))
@@ -972,6 +973,7 @@ typedef struct __wait_queue_head {
#define wait_event_timeout(wq,cond,jiffies) ({ \
unsigned long _t = (jiffies) / 10000; \
+ (void)(wq); \
do { \
if (cond) \
break; \
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index 464ba5caa..000000000
--- a/m4/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-libtool.m4
-lt~obsolete.m4
-ltoptions.m4
-ltsugar.m4
-ltversion.m4
diff --git a/nvif b/nvif
new file mode 120000
index 000000000..47de63195
--- /dev/null
+++ b/nvif
@@ -0,0 +1 @@
+drm/nouveau/nvif/ \ No newline at end of file
diff --git a/nvif/Makefile.am b/nvif/Makefile.am
deleted file mode 100644
index 23e331733..000000000
--- a/nvif/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-lib_LTLIBRARIES = libnvif.la
-
-# XXX: /lib shouldn't be here, but is needed while we include core headers
-libnvif_la_CPPFLAGS = -I${top_srcdir}/nvkm/include \
- -I${top_srcdir}/nvkm \
- -I${top_srcdir}/lib \
- -I${top_srcdir}
-libnvif_la_LIBADD = $(top_srcdir)/lib/libpciaccessos.la
-libnvif_la_SOURCES = object.c \
- client.c \
- device.c \
- notify.c
diff --git a/nvif/list.h b/nvif/list.h
deleted file mode 100644
index 8af5d144e..000000000
--- a/nvif/list.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright © 2010 Intel Corporation
- * Copyright © 2010 Francisco Jerez <currojerez@riseup.net>
- *
- * 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 (including the next
- * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
- *
- */
-
-/* Modified by Ben Skeggs <bskeggs@redhat.com> to match kernel list APIs */
-
-#ifndef _XORG_LIST_H_
-#define _XORG_LIST_H_
-
-/**
- * @file Classic doubly-link circular list implementation.
- * For real usage examples of the linked list, see the file test/list.c
- *
- * Example:
- * We need to keep a list of struct foo in the parent struct bar, i.e. what
- * we want is something like this.
- *
- * struct bar {
- * ...
- * struct foo *list_of_foos; -----> struct foo {}, struct foo {}, struct foo{}
- * ...
- * }
- *
- * We need one list head in bar and a list element in all list_of_foos (both are of
- * data type 'struct list_head').
- *
- * struct bar {
- * ...
- * struct list_head list_of_foos;
- * ...
- * }
- *
- * struct foo {
- * ...
- * struct list_head entry;
- * ...
- * }
- *
- * Now we initialize the list head:
- *
- * struct bar bar;
- * ...
- * INIT_LIST_HEAD(&bar.list_of_foos);
- *
- * Then we create the first element and add it to this list:
- *
- * struct foo *foo = malloc(...);
- * ....
- * list_add(&foo->entry, &bar.list_of_foos);
- *
- * Repeat the above for each element you want to add to the list. Deleting
- * works with the element itself.
- * list_del(&foo->entry);
- * free(foo);
- *
- * Note: calling list_del(&bar.list_of_foos) will set bar.list_of_foos to an empty
- * list again.
- *
- * Looping through the list requires a 'struct foo' as iterator and the
- * name of the field the subnodes use.
- *
- * struct foo *iterator;
- * list_for_each_entry(iterator, &bar.list_of_foos, entry) {
- * if (iterator->something == ...)
- * ...
- * }
- *
- * Note: You must not call list_del() on the iterator if you continue the
- * loop. You need to run the safe for-each loop instead:
- *
- * struct foo *iterator, *next;
- * list_for_each_entry_safe(iterator, next, &bar.list_of_foos, entry) {
- * if (...)
- * list_del(&iterator->entry);
- * }
- *
- */
-
-/**
- * The linkage struct for list nodes. This struct must be part of your
- * to-be-linked struct. struct list_head is required for both the head of the
- * list and for each list node.
- *
- * Position and name of the struct list_head field is irrelevant.
- * There are no requirements that elements of a list are of the same type.
- * There are no requirements for a list head, any struct list_head can be a list
- * head.
- */
-struct list_head {
- struct list_head *next, *prev;
-};
-
-/**
- * Initialize the list as an empty list.
- *
- * Example:
- * INIT_LIST_HEAD(&bar->list_of_foos);
- *
- * @param The list to initialized.
- */
-#define LIST_HEAD_INIT(name) { &(name), &(name) }
-
-#define LIST_HEAD(name) \
- struct list_head name = LIST_HEAD_INIT(name)
-
-static inline void
-INIT_LIST_HEAD(struct list_head *list)
-{
- list->next = list->prev = list;
-}
-
-static inline void
-__list_add(struct list_head *entry,
- struct list_head *prev, struct list_head *next)
-{
- next->prev = entry;
- entry->next = next;
- entry->prev = prev;
- prev->next = entry;
-}
-
-/**
- * Insert a new element after the given list head. The new element does not
- * need to be initialised as empty list.
- * The list changes from:
- * head → some element → ...
- * to
- * head → new element → older element → ...
- *
- * Example:
- * struct foo *newfoo = malloc(...);
- * list_add(&newfoo->entry, &bar->list_of_foos);
- *
- * @param entry The new element to prepend to the list.
- * @param head The existing list.
- */
-static inline void
-list_add(struct list_head *entry, struct list_head *head)
-{
- __list_add(entry, head, head->next);
-}
-
-/**
- * Append a new element to the end of the list given with this list head.
- *
- * The list changes from:
- * head → some element → ... → lastelement
- * to
- * head → some element → ... → lastelement → new element
- *
- * Example:
- * struct foo *newfoo = malloc(...);
- * list_add_tail(&newfoo->entry, &bar->list_of_foos);
- *
- * @param entry The new element to prepend to the list.
- * @param head The existing list.
- */
-static inline void
-list_add_tail(struct list_head *entry, struct list_head *head)
-{
- __list_add(entry, head->prev, head);
-}
-
-static inline void
-__list_del(struct list_head *prev, struct list_head *next)
-{
- next->prev = prev;
- prev->next = next;
-}
-
-/**
- * Remove the element from the list it is in. Using this function will reset
- * the pointers to/from this element so it is removed from the list. It does
- * NOT free the element itself or manipulate it otherwise.
- *
- * Using list_del on a pure list head (like in the example at the top of
- * this file) will NOT remove the first element from
- * the list but rather reset the list as empty list.
- *
- * Example:
- * list_del(&foo->entry);
- *
- * @param entry The element to remove.
- */
-static inline void
-list_del(struct list_head *entry)
-{
- __list_del(entry->prev, entry->next);
-}
-
-static inline void
-list_del_init(struct list_head *entry)
-{
- __list_del(entry->prev, entry->next);
- INIT_LIST_HEAD(entry);
-}
-
-static inline void list_move_tail(struct list_head *list,
- struct list_head *head)
-{
- __list_del(list->prev, list->next);
- list_add_tail(list, head);
-}
-
-/**
- * Check if the list is empty.
- *
- * Example:
- * list_empty(&bar->list_of_foos);
- *
- * @return True if the list contains one or more elements or False otherwise.
- */
-static inline bool
-list_empty(struct list_head *head)
-{
- return head->next == head;
-}
-
-/**
- * Returns a pointer to the container of this list element.
- *
- * Example:
- * struct foo* f;
- * f = container_of(&foo->entry, struct foo, entry);
- * assert(f == foo);
- *
- * @param ptr Pointer to the struct list_head.
- * @param type Data type of the list element.
- * @param member Member name of the struct list_head field in the list element.
- * @return A pointer to the data struct containing the list head.
- */
-#ifndef container_of
-#define container_of(ptr, type, member) \
- (type *)((char *)(ptr) - (char *) &((type *)0)->member)
-#endif
-
-/**
- * Alias of container_of
- */
-#define list_entry(ptr, type, member) \
- container_of(ptr, type, member)
-
-/**
- * Retrieve the first list entry for the given list pointer.
- *
- * Example:
- * struct foo *first;
- * first = list_first_entry(&bar->list_of_foos, struct foo, list_of_foos);
- *
- * @param ptr The list head
- * @param type Data type of the list element to retrieve
- * @param member Member name of the struct list_head field in the list element.
- * @return A pointer to the first list element.
- */
-#define list_first_entry(ptr, type, member) \
- list_entry((ptr)->next, type, member)
-
-/**
- * Retrieve the last list entry for the given listpointer.
- *
- * Example:
- * struct foo *first;
- * first = list_last_entry(&bar->list_of_foos, struct foo, list_of_foos);
- *
- * @param ptr The list head
- * @param type Data type of the list element to retrieve
- * @param member Member name of the struct list_head field in the list element.
- * @return A pointer to the last list element.
- */
-#define list_last_entry(ptr, type, member) \
- list_entry((ptr)->prev, type, member)
-
-#define __container_of(ptr, sample, member) \
- (void *)container_of((ptr), typeof(*(sample)), member)
-
-/**
- * Loop through the list given by head and set pos to struct in the list.
- *
- * Example:
- * struct foo *iterator;
- * list_for_each_entry(iterator, &bar->list_of_foos, entry) {
- * [modify iterator]
- * }
- *
- * This macro is not safe for node deletion. Use list_for_each_entry_safe
- * instead.
- *
- * @param pos Iterator variable of the type of the list elements.
- * @param head List head
- * @param member Member name of the struct list_head in the list elements.
- *
- */
-#define list_for_each_entry(pos, head, member) \
- for (pos = __container_of((head)->next, pos, member); \
- &pos->member != (head); \
- pos = __container_of(pos->member.next, pos, member))
-
-/**
- * Loop through the list, keeping a backup pointer to the element. This
- * macro allows for the deletion of a list element while looping through the
- * list.
- *
- * See list_for_each_entry for more details.
- */
-#define list_for_each_entry_safe(pos, tmp, head, member) \
- for (pos = __container_of((head)->next, pos, member), \
- tmp = __container_of(pos->member.next, pos, member); \
- &pos->member != (head); \
- pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
-
-
-#define list_for_each_entry_reverse(pos, head, member) \
- for (pos = __container_of((head)->prev, pos, member); \
- &pos->member != (head); \
- pos = __container_of(pos->member.prev, pos, member))
-
-#define list_for_each_entry_continue(pos, head, member) \
- for (pos = __container_of(pos->member.next, pos, member); \
- &pos->member != (head); \
- pos = __container_of(pos->member.next, pos, member))
-
-#define list_for_each_entry_continue_reverse(pos, head, member) \
- for (pos = __container_of(pos->member.prev, pos, member); \
- &pos->member != (head); \
- pos = __container_of(pos->member.prev, pos, member))
-
-#define list_for_each_entry_from(pos, head, member) \
- for (; \
- &pos->member != (head); \
- pos = __container_of(pos->member.next, pos, member))
-
-#endif
diff --git a/nvif/os.h b/nvif/os.h
deleted file mode 120000
index db919475b..000000000
--- a/nvif/os.h
+++ /dev/null
@@ -1 +0,0 @@
-../lib/core/os.h \ No newline at end of file
diff --git a/nvkm b/nvkm
new file mode 120000
index 000000000..e9f9995b6
--- /dev/null
+++ b/nvkm
@@ -0,0 +1 @@
+drm/nouveau/nvkm/ \ No newline at end of file
diff --git a/nvkm/Makefile.am b/nvkm/Makefile.am
deleted file mode 100644
index 64edaa775..000000000
--- a/nvkm/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-SUBDIRS = core subdev engine
-
-noinst_LTLIBRARIES = libnvkm.la
-
-libnvkm_la_SOURCES =
-libnvkm_la_LIBADD = core/libcore.la \
- subdev/libsubdev.la \
- engine/libengine.la
diff --git a/nvkm/core/Makefile.am b/nvkm/core/Makefile.am
deleted file mode 100644
index 36dc7ed71..000000000
--- a/nvkm/core/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-noinst_LTLIBRARIES = libcore.la
-
-libcore_la_CPPFLAGS = -I${top_srcdir}/nvkm \
- -I${top_srcdir}/nvkm/include \
- -I${top_srcdir}/lib
-
-libcore_la_SOURCES = client.c \
- engctx.c \
- engine.c \
- enum.c \
- event.c \
- gpuobj.c \
- handle.c \
- ioctl.c \
- mm.c \
- namedb.c \
- notify.c \
- object.c \
- option.c \
- parent.c \
- printk.c \
- ramht.c \
- subdev.c
diff --git a/nvkm/engine/Makefile.am b/nvkm/engine/Makefile.am
deleted file mode 100644
index a8df243e1..000000000
--- a/nvkm/engine/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-SUBDIRS = dmaobj bsp copy crypt device disp fifo graph mpeg perfmon ppp \
- software vp
-
-noinst_LTLIBRARIES = libengine.la
-
-libengine_la_SOURCES = falcon.c \
- xtensa.c
-
-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 \
- perfmon/libperfmon.la \
- ppp/libppp.la \
- software/libsoftware.la \
- vp/libvp.la
-
-include $(srcdir)/Makefile.engine
diff --git a/nvkm/engine/Makefile.engine b/nvkm/engine/Makefile.engine
deleted file mode 100644
index 2222873f6..000000000
--- a/nvkm/engine/Makefile.engine
+++ /dev/null
@@ -1,4 +0,0 @@
-AM_CPPFLAGS = -I${top_srcdir}/nvkm \
- -I${top_srcdir}/nvkm/include \
- -I${top_srcdir}/lib \
- -I${top_srcdir}
diff --git a/nvkm/engine/bsp/Makefile.am b/nvkm/engine/bsp/Makefile.am
deleted file mode 100644
index 49e989e70..000000000
--- a/nvkm/engine/bsp/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libbsp.la
-
-libbsp_la_SOURCES = nv84.c \
- nv98.c \
- nvc0.c \
- nve0.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/copy/Makefile.am b/nvkm/engine/copy/Makefile.am
deleted file mode 100644
index 63d5ac8ca..000000000
--- a/nvkm/engine/copy/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-noinst_LTLIBRARIES = libcopy.la
-
-BUILT_SOURCES = fuc/nva3.fuc.h \
- fuc/nvc0.fuc.h
-CLEANFILES = ${BUILT_SOURCES}
-
-libcopy_la_SOURCES = ${BUILT_SOURCES} \
- nva3.c \
- nvc0.c \
- nve0.c
-
-fuc/nva3.fuc.h: fuc/nva3.fuc
- m4 -DNVA3 fuc/nva3.fuc | envyas -a -w -m fuc -V fuc3 -o fuc/nva3.fuc.h
-fuc/nvc0.fuc.h: fuc/nva3.fuc
- m4 -DNVC0 fuc/nva3.fuc | envyas -a -w -m fuc -V fuc3 -o fuc/nvc0.fuc.h
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/crypt/Makefile.am b/nvkm/engine/crypt/Makefile.am
deleted file mode 100644
index 9d279a365..000000000
--- a/nvkm/engine/crypt/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-noinst_LTLIBRARIES = libcrypt.la
-
-BUILT_SOURCES = fuc/nv98.fuc.h
-CLEANFILES = ${BUILT_SOURCES}
-
-libcrypt_la_SOURCES = ${BUILT_SOURCES} \
- nv84.c \
- nv98.c
-
-fuc/nv98.fuc.h: fuc/nv98.fuc
- m4 fuc/nv98.fuc | envyas -a -w -m fuc -V fuc0 -F crypt -o fuc/nv98.fuc.h
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/device/Makefile.am b/nvkm/engine/device/Makefile.am
deleted file mode 100644
index 0458c2d9a..000000000
--- a/nvkm/engine/device/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-noinst_LTLIBRARIES = libdevice.la
-
-libdevice_la_SOURCES = acpi.c \
- base.c \
- ctrl.c \
- nv04.c \
- nv10.c \
- nv20.c \
- nv30.c \
- nv40.c \
- nv50.c \
- nvc0.c \
- nve0.c \
- gm100.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/disp/Makefile.am b/nvkm/engine/disp/Makefile.am
deleted file mode 100644
index 169a41488..000000000
--- a/nvkm/engine/disp/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-noinst_LTLIBRARIES = libdisp.la
-
-libdisp_la_SOURCES = base.c \
- conn.c \
- outp.c \
- outpdp.c \
- nv04.c \
- nv50.c \
- nv84.c \
- nv94.c \
- nva0.c \
- nva3.c \
- nvd0.c \
- nve0.c \
- nvf0.c \
- gm107.c \
- gm204.c \
- dacnv50.c \
- dport.c \
- hdanva3.c \
- hdanvd0.c \
- hdminv84.c \
- hdminva3.c \
- hdminvd0.c \
- hdminve0.c \
- piornv50.c \
- sornv50.c \
- sornv94.c \
- sornvd0.c \
- sorgm204.c \
- vga.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/dmaobj/Makefile.am b/nvkm/engine/dmaobj/Makefile.am
deleted file mode 100644
index d2633c46c..000000000
--- a/nvkm/engine/dmaobj/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-noinst_LTLIBRARIES = libdmaobj.la
-
-libdmaobj_la_SOURCES = base.c \
- nv04.c \
- nv50.c \
- nvc0.c \
- nvd0.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/fifo/Makefile.am b/nvkm/engine/fifo/Makefile.am
deleted file mode 100644
index 55d1f19b9..000000000
--- a/nvkm/engine/fifo/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-noinst_LTLIBRARIES = libfifo.la
-
-libfifo_la_SOURCES = base.c \
- nv04.c \
- nv10.c \
- nv17.c \
- nv40.c \
- nv50.c \
- nv84.c \
- nvc0.c \
- nve0.c \
- gk20a.c \
- nv108.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/graph/Makefile.am b/nvkm/engine/graph/Makefile.am
deleted file mode 100644
index edf88ce0a..000000000
--- a/nvkm/engine/graph/Makefile.am
+++ /dev/null
@@ -1,62 +0,0 @@
-noinst_LTLIBRARIES = libgraph.la
-
-BUILT_SOURCES = fuc/hubnvc0.fuc.h \
- fuc/gpcnvc0.fuc.h \
- fuc/hubnvd7.fuc.h \
- fuc/gpcnvd7.fuc.h \
- fuc/hubnve0.fuc.h \
- fuc/gpcnve0.fuc.h \
- fuc/hubnvf0.fuc.h \
- fuc/gpcnvf0.fuc.h \
- fuc/hubnv108.fuc5.h \
- fuc/gpcnv108.fuc5.h \
- fuc/hubgm107.fuc5.h \
- fuc/gpcgm107.fuc5.h
-CLEANFILES = ${BUILT_SOURCES}
-
-libgraph_la_SOURCES = ${BUILT_SOURCES} \
- ctxnv40.c \
- ctxnv50.c \
- ctxnvc0.c \
- ctxnvc1.c \
- ctxnvc4.c \
- ctxnvc8.c \
- ctxnvd7.c \
- ctxnvd9.c \
- ctxnve4.c \
- ctxgk20a.c \
- ctxnvf0.c \
- ctxgk110b.c \
- ctxnv108.c \
- ctxgm107.c \
- nv04.c \
- nv10.c \
- nv20.c \
- nv25.c \
- nv2a.c \
- nv30.c \
- nv34.c \
- nv35.c \
- nv40.c \
- nv50.c \
- nvc0.c \
- nvc1.c \
- nvc4.c \
- nvc8.c \
- nvd7.c \
- nvd9.c \
- nve4.c \
- gk20a.c \
- nvf0.c \
- gk110b.c \
- nv108.c \
- gm107.c
-
-$(filter %.fuc.h,$(BUILT_SOURCES)): %.fuc.h: %.fuc fuc/com.fuc fuc/hub.fuc fuc/gpc.fuc fuc/macros.fuc
- cpp -Ifuc -CC $< | cpp | sed -e '/^#/d' \
- | envyas -a -w -m fuc -V fuc3 -o $@
-$(filter %.fuc5.h,$(BUILT_SOURCES)): %.fuc5.h: %.fuc5 fuc/com.fuc fuc/hub.fuc fuc/gpc.fuc
- cpp -Ifuc -CC $< | cpp | sed -e '/^#/d' \
- | envyas -a -w -m fuc -V fuc5 -o $@
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/mpeg/Makefile.am b/nvkm/engine/mpeg/Makefile.am
deleted file mode 100644
index f17d9ad1a..000000000
--- a/nvkm/engine/mpeg/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-noinst_LTLIBRARIES = libmpeg.la
-
-libmpeg_la_SOURCES = nv31.c \
- nv40.c \
- nv44.c \
- nv50.c \
- nv84.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/perfmon/Makefile.am b/nvkm/engine/perfmon/Makefile.am
deleted file mode 100644
index f6e2279d8..000000000
--- a/nvkm/engine/perfmon/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-noinst_LTLIBRARIES = libperfmon.la
-
-libperfmon_la_SOURCES = base.c \
- daemon.c \
- nv40.c \
- nv50.c \
- nv84.c \
- nva3.c \
- nvc0.c \
- nve0.c \
- nvf0.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/ppp/Makefile.am b/nvkm/engine/ppp/Makefile.am
deleted file mode 100644
index f9a1d5a8d..000000000
--- a/nvkm/engine/ppp/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-noinst_LTLIBRARIES = libppp.la
-
-libppp_la_SOURCES = nv98.c \
- nvc0.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/software/Makefile.am b/nvkm/engine/software/Makefile.am
deleted file mode 100644
index e17df3a2a..000000000
--- a/nvkm/engine/software/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libsoftware.la
-
-libsoftware_la_SOURCES = nv04.c \
- nv10.c \
- nv50.c \
- nvc0.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/engine/vp/Makefile.am b/nvkm/engine/vp/Makefile.am
deleted file mode 100644
index 834a0e486..000000000
--- a/nvkm/engine/vp/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libvp.la
-
-libvp_la_SOURCES = nv84.c \
- nv98.c \
- nvc0.c \
- nve0.c
-
-include $(srcdir)/../Makefile.engine
diff --git a/nvkm/include/core/intr.h b/nvkm/include/core/intr.h
deleted file mode 100644
index d2599746e..000000000
--- a/nvkm/include/core/intr.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __NOUVEAU_INTR_H__
-#define __NOUVEAU_INTR_H__
-
-struct nouveau_device;
-
-void nouveau_intr(struct nouveau_device *);
-
-#endif
diff --git a/nvkm/include/nvif/class.h b/nvkm/include/nvif/class.h
deleted file mode 120000
index f1ac4859e..000000000
--- a/nvkm/include/nvif/class.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../nvif/class.h \ No newline at end of file
diff --git a/nvkm/include/nvif/event.h b/nvkm/include/nvif/event.h
deleted file mode 120000
index 1b798538a..000000000
--- a/nvkm/include/nvif/event.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../nvif/event.h \ No newline at end of file
diff --git a/nvkm/include/nvif/ioctl.h b/nvkm/include/nvif/ioctl.h
deleted file mode 120000
index 8569c8690..000000000
--- a/nvkm/include/nvif/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../nvif/ioctl.h \ No newline at end of file
diff --git a/nvkm/include/nvif/unpack.h b/nvkm/include/nvif/unpack.h
deleted file mode 120000
index 69d99292b..000000000
--- a/nvkm/include/nvif/unpack.h
+++ /dev/null
@@ -1 +0,0 @@
-../../../nvif/unpack.h \ No newline at end of file
diff --git a/nvkm/include/subdev/bios/dfp.h b/nvkm/include/subdev/bios/dfp.h
deleted file mode 100644
index 50cb52c11..000000000
--- a/nvkm/include/subdev/bios/dfp.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef __NVBIOS_DFP_H__
-#define __NVBIOS_DFP_H__
-
-#endif
diff --git a/nvkm/subdev/Makefile.am b/nvkm/subdev/Makefile.am
deleted file mode 100644
index 5a48ddb87..000000000
--- a/nvkm/subdev/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-SUBDIRS = bar bus bios clock devinit fb fuse gpio i2c ibus instmem \
- ltc mc mxm pwr therm timer vm volt
-
-noinst_LTLIBRARIES = libsubdev.la
-
-libsubdev_la_SOURCES =
-libsubdev_la_LIBADD = bar/libbar.la \
- bios/libbios.la \
- bus/libbus.la \
- clock/libclock.la \
- devinit/libdevinit.la \
- fb/libfb.la \
- fuse/libfuse.la \
- gpio/libgpio.la \
- i2c/libi2c.la \
- ibus/libibus.la \
- instmem/libinstmem.la \
- ltc/libltc.la \
- mc/libmc.la \
- mxm/libmxm.la \
- pwr/libpwr.la \
- therm/libtherm.la \
- timer/libtimer.la \
- vm/libvm.la \
- volt/libvolt.la
diff --git a/nvkm/subdev/Makefile.subdev b/nvkm/subdev/Makefile.subdev
deleted file mode 100644
index 513c6c87b..000000000
--- a/nvkm/subdev/Makefile.subdev
+++ /dev/null
@@ -1,3 +0,0 @@
-AM_CPPFLAGS = -I${top_srcdir}/nvkm \
- -I${top_srcdir}/nvkm/include \
- -I${top_srcdir}/lib
diff --git a/nvkm/subdev/bar/Makefile.am b/nvkm/subdev/bar/Makefile.am
deleted file mode 100644
index 2b2e44dd5..000000000
--- a/nvkm/subdev/bar/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libbar.la
-
-libbar_la_SOURCES = base.c \
- nv50.c \
- nvc0.c \
- gk20a.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/bios/Makefile.am b/nvkm/subdev/bios/Makefile.am
deleted file mode 100644
index 5c41b6d19..000000000
--- a/nvkm/subdev/bios/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-noinst_LTLIBRARIES = libbios.la
-
-libbios_la_SOURCES = base.c \
- bit.c \
- boost.c \
- conn.c \
- cstep.c \
- dcb.c \
- disp.c \
- dp.c \
- extdev.c \
- fan.c \
- gpio.c \
- i2c.c \
- image.c \
- init.c \
- mxm.c \
- npde.c \
- pcir.c \
- perf.c \
- pll.c \
- pmu.c \
- ramcfg.c \
- rammap.c \
- shadow.c \
- shadowacpi.c \
- shadowof.c \
- shadowpci.c \
- shadowramin.c \
- shadowrom.c \
- timing.c \
- therm.c \
- vmap.c \
- volt.c \
- xpio.c \
- M0203.c \
- M0205.c \
- M0209.c \
- P0260.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/bus/Makefile.am b/nvkm/subdev/bus/Makefile.am
deleted file mode 100644
index e1470f9c6..000000000
--- a/nvkm/subdev/bus/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-noinst_LTLIBRARIES = libbus.la
-
-libbus_la_SOURCES = hwsq.c \
- nv04.c \
- nv31.c \
- nv50.c \
- nv94.c \
- nvc0.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/clock/Makefile.am b/nvkm/subdev/clock/Makefile.am
deleted file mode 100644
index 4d2a1efe5..000000000
--- a/nvkm/subdev/clock/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-noinst_LTLIBRARIES = libclock.la
-
-libclock_la_SOURCES = base.c \
- nv04.c \
- nv40.c \
- nv50.c \
- nv84.c \
- nva3.c \
- nvaa.c \
- nvc0.c \
- nve0.c \
- gk20a.c \
- pllnv04.c \
- pllnva3.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/devinit/Makefile.am b/nvkm/subdev/devinit/Makefile.am
deleted file mode 100644
index e97ce52b9..000000000
--- a/nvkm/subdev/devinit/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-noinst_LTLIBRARIES = libdevinit.la
-
-libdevinit_la_SOURCES = base.c \
- nv04.c \
- nv05.c \
- nv10.c \
- nv1a.c \
- nv20.c \
- nv50.c \
- nv84.c \
- nv98.c \
- nva3.c \
- nvaf.c \
- nvc0.c \
- gm107.c \
- gm204.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/fb/Makefile.am b/nvkm/subdev/fb/Makefile.am
deleted file mode 100644
index 3869fac7c..000000000
--- a/nvkm/subdev/fb/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-noinst_LTLIBRARIES = libfb.la
-
-libfb_la_SOURCES = base.c \
- nv04.c \
- nv10.c nv1a.c \
- nv20.c nv25.c \
- nv30.c nv35.c nv36.c \
- nv40.c nv41.c nv44.c nv46.c nv47.c nv49.c nv4e.c \
- nv50.c nv84.c nva3.c nvaa.c nvaf.c \
- nvc0.c \
- nve0.c \
- gk20a.c \
- gm107.c \
- ramnv04.c \
- ramnv10.c \
- ramnv1a.c \
- ramnv20.c \
- ramnv40.c \
- ramnv41.c \
- ramnv44.c \
- ramnv49.c \
- ramnv4e.c \
- ramnv50.c \
- ramnva3.c \
- ramnvaa.c \
- ramnvc0.c \
- ramnve0.c \
- ramgk20a.c \
- ramgm107.c \
- sddr2.c \
- sddr3.c \
- gddr3.c \
- gddr5.c
-
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/fuse/Makefile.am b/nvkm/subdev/fuse/Makefile.am
deleted file mode 100644
index 5596d2c61..000000000
--- a/nvkm/subdev/fuse/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libfuse.la
-
-libfuse_la_SOURCES = base.c \
- g80.c \
- gf100.c \
- gm107.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/gpio/Makefile.am b/nvkm/subdev/gpio/Makefile.am
deleted file mode 100644
index 012eb0671..000000000
--- a/nvkm/subdev/gpio/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-noinst_LTLIBRARIES = libgpio.la
-
-libgpio_la_SOURCES = base.c \
- nv10.c \
- nv50.c \
- nv94.c \
- nvd0.c \
- nve0.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/i2c/Makefile.am b/nvkm/subdev/i2c/Makefile.am
deleted file mode 100644
index 7575d978a..000000000
--- a/nvkm/subdev/i2c/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-noinst_LTLIBRARIES = libi2c.la
-
-libi2c_la_SOURCES = base.c \
- anx9805.c \
- aux.c \
- bit.c \
- pad.c \
- padnv04.c \
- padnv94.c \
- padgm204.c \
- nv04.c \
- nv4e.c \
- nv50.c \
- nv94.c \
- nvd0.c \
- gf117.c \
- nve0.c \
- gm204.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/ibus/Makefile.am b/nvkm/subdev/ibus/Makefile.am
deleted file mode 100644
index b9d551134..000000000
--- a/nvkm/subdev/ibus/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-noinst_LTLIBRARIES = libibus.la
-
-libibus_la_SOURCES = nvc0.c \
- nve0.c \
- gk20a.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/instmem/Makefile.am b/nvkm/subdev/instmem/Makefile.am
deleted file mode 100644
index c014032c9..000000000
--- a/nvkm/subdev/instmem/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libinstmem.la
-
-libinstmem_la_SOURCES = base.c \
- nv04.c \
- nv40.c \
- nv50.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/ltc/Makefile.am b/nvkm/subdev/ltc/Makefile.am
deleted file mode 100644
index e287aef5d..000000000
--- a/nvkm/subdev/ltc/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libltc.la
-
-libltc_la_SOURCES = base.c \
- gf100.c \
- gk104.c \
- gm107.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/mc/Makefile.am b/nvkm/subdev/mc/Makefile.am
deleted file mode 100644
index 39487b835..000000000
--- a/nvkm/subdev/mc/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-noinst_LTLIBRARIES = libmc.la
-
-libmc_la_SOURCES = base.c \
- nv04.c \
- nv40.c \
- nv44.c \
- nv4c.c \
- nv50.c \
- nv94.c \
- nv98.c \
- nvc0.c \
- nvc3.c \
- gk20a.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/mxm/Makefile.am b/nvkm/subdev/mxm/Makefile.am
deleted file mode 100644
index 2ec56b33b..000000000
--- a/nvkm/subdev/mxm/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-noinst_LTLIBRARIES = libmxm.la
-
-libmxm_la_SOURCES = base.c \
- mxms.c \
- nv50.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/pwr/Makefile.am b/nvkm/subdev/pwr/Makefile.am
deleted file mode 100644
index f59eec052..000000000
--- a/nvkm/subdev/pwr/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-noinst_LTLIBRARIES = libpwr.la
-
-BUILT_SOURCES = fuc/nva3.fuc.h \
- fuc/nvc0.fuc.h \
- fuc/nvd0.fuc.h \
- fuc/nv108.fuc.h
-CLEANFILES = ${BUILT_SOURCES}
-
-libpwr_la_SOURCES = base.c \
- memx.c \
- nva3.c \
- nvc0.c \
- nvd0.c \
- gk104.c \
- nv108.c \
- gk20a.c
-
-FUC_COMMON = fuc/os.h \
- fuc/macros.fuc \
- fuc/kernel.fuc \
- fuc/idle.fuc \
- fuc/host.fuc \
- fuc/memx.fuc \
- fuc/perf.fuc \
- fuc/i2c_.fuc \
- fuc/test.fuc \
- fuc/arith.fuc
-
-fuc/nva3.fuc.h: fuc/nva3.fuc ${FUC_COMMON}
- cpp -Ifuc -CC fuc/nva3.fuc | cpp \
- | sed -e '/^#/d' \
- | envyas -a -w -m fuc -V fuc3 -o fuc/nva3.fuc.h
-fuc/nvc0.fuc.h: fuc/nvc0.fuc ${FUC_COMMON}
- cpp -Ifuc -CC fuc/nvc0.fuc | cpp \
- | sed -e '/^#/d' \
- | envyas -a -w -m fuc -V fuc3 -o fuc/nvc0.fuc.h
-fuc/nvd0.fuc.h: fuc/nvd0.fuc ${FUC_COMMON}
- cpp -Ifuc -CC fuc/nvd0.fuc | cpp \
- | sed -e '/^#/d' \
- | envyas -a -w -m fuc -V fuc4 -o fuc/nvd0.fuc.h
-fuc/nv108.fuc.h: fuc/nv108.fuc ${FUC_COMMON}
- cpp -Ifuc -CC fuc/nv108.fuc | cpp \
- | sed -e '/^#/d' \
- | envyas -a -w -m fuc -V fuc5 -o fuc/nv108.fuc.h
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/therm/Makefile.am b/nvkm/subdev/therm/Makefile.am
deleted file mode 100644
index b4f6da637..000000000
--- a/nvkm/subdev/therm/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-noinst_LTLIBRARIES = libtherm.la
-
-libtherm_la_SOURCES = base.c \
- fan.c \
- fannil.c \
- fanpwm.c \
- fantog.c \
- ic.c \
- temp.c \
- nv40.c \
- nv50.c \
- nv84.c \
- nva3.c \
- nvd0.c \
- gm107.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/timer/Makefile.am b/nvkm/subdev/timer/Makefile.am
deleted file mode 100644
index a16c5ee83..000000000
--- a/nvkm/subdev/timer/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-noinst_LTLIBRARIES = libtimer.la
-
-libtimer_la_SOURCES = base.c \
- nv04.c \
- gk20a.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/vm/Makefile.am b/nvkm/subdev/vm/Makefile.am
deleted file mode 100644
index 1f5b6fb76..000000000
--- a/nvkm/subdev/vm/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-noinst_LTLIBRARIES = libvm.la
-
-libvm_la_SOURCES = base.c \
- nv04.c \
- nv41.c \
- nv44.c \
- nv50.c \
- nvc0.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/nvkm/subdev/volt/Makefile.am b/nvkm/subdev/volt/Makefile.am
deleted file mode 100644
index f5bdc811a..000000000
--- a/nvkm/subdev/volt/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-noinst_LTLIBRARIES = libvolt.la
-
-libvolt_la_SOURCES = base.c \
- gpio.c \
- nv40.c \
- gk20a.c
-
-include $(srcdir)/../Makefile.subdev
diff --git a/scripts/nvkm-am b/scripts/nvkm-am
new file mode 100755
index 000000000..c61902c19
--- /dev/null
+++ b/scripts/nvkm-am
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+APPLY="-p3 --include=drm/nouveau/*"
+ LOG=(
+ "drm/nouveau/\(.*\)\:" "\2\:"
+ "drm/nouveau\:" "drm\:"
+ )
+ REPO=
+ TEMP=`mktemp -d`
+
+while getopts "Rc:" ARG; do
+ case ${ARG} in
+ R) APPLY="--directory=drivers/gpu --include=drivers/gpu/drm/nouveau/*"
+ LOG=(
+ "\(.*\)\:" "drm/nouveau/\2\:"
+ "drm/nouveau/drm\:" "drm/nouveau\:"
+ );;
+ c) REPO=${OPTARG};;
+ ?) exit 1;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+if [[ ${REPO} != "" ]]; then
+ pushd ${REPO}
+ git format-patch -o ${TEMP} $1
+ popd
+else
+ cp $@ ${TEMP}
+fi
+FILES=${TEMP}/*
+
+for FILE in ${FILES}; do
+ for (( i = 0; i < ${#LOG[@]}; i += 2)); do
+ OLD=${LOG[$i + 0]}
+ NEW=${LOG[$i + 1]}
+ sed -i -e "s:^Subject\(.*\)] ${OLD}:Subject\1] ${NEW}:" ${FILE}
+ done
+done
+git am -3 ${APPLY} ${FILES}
+
+rm -rf ${TEMP}