From 02a841d434513c7b3620250271c372fabce56de5 Mon Sep 17 00:00:00 2001 From: Ben Skeggs <bskeggs@redhat.com> Date: Wed, 4 Jul 2012 23:44:54 +1000 Subject: [PATCH] drm/nouveau: restructure source tree, split core from drm implementation Future work will be headed in the way of separating the policy supplied by the nouveau drm module from the mechanisms provided by the driver core. There will be a couple of major classes (subdev, engine) of driver modules that have clearly defined tasks, and the further directory structure change is to reflect this. No code changes here whatsoever, aside from fixing up a couple of include file pathnames. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> --- drivers/gpu/drm/nouveau/Makefile | 88 ++++++++++++++----- .../nouveau/{nouveau_mm.c => core/core/mm.c} | 2 +- .../{nouveau_ramht.c => core/core/ramht.c} | 2 +- .../{nv84_bsp.c => core/engine/bsp/nv84.c} | 4 +- .../engine/copy/fuc/nva3.fuc} | 0 .../engine/copy/fuc/nva3.fuc.h} | 0 .../engine/copy/fuc/nvc0.fuc.h} | 0 .../{nva3_copy.c => core/engine/copy/nva3.c} | 6 +- .../{nvc0_copy.c => core/engine/copy/nvc0.c} | 6 +- .../engine/crypt/fuc/nv98.fuc} | 0 .../engine/crypt/fuc/nv98.fuc.h} | 0 .../engine/crypt/nv84.c} | 4 +- .../engine/crypt/nv98.c} | 6 +- .../{nv04_fifo.c => core/engine/fifo/nv04.c} | 4 +- .../{nv10_fifo.c => core/engine/fifo/nv10.c} | 4 +- .../{nv17_fifo.c => core/engine/fifo/nv17.c} | 4 +- .../{nv40_fifo.c => core/engine/fifo/nv40.c} | 4 +- .../{nv50_fifo.c => core/engine/fifo/nv50.c} | 6 +- .../{nv84_fifo.c => core/engine/fifo/nv84.c} | 6 +- .../{nvc0_fifo.c => core/engine/fifo/nvc0.c} | 4 +- .../{nve0_fifo.c => core/engine/fifo/nve0.c} | 4 +- .../engine/graph/ctx.h} | 0 .../engine/graph/ctxnv40.c} | 2 +- .../engine/graph/ctxnv50.c} | 2 +- .../engine/graph/ctxnvc0.c} | 4 +- .../engine/graph/ctxnve0.c} | 4 +- .../engine/graph/fuc/gpcnvc0.fuc} | 0 .../engine/graph/fuc/gpcnvc0.fuc.h} | 0 .../engine/graph/fuc/hubnvc0.fuc} | 0 .../engine/graph/fuc/hubnvc0.fuc.h} | 0 .../engine/graph/fuc/nvc0.fuc} | 0 .../engine/graph/nv04.c} | 2 +- .../engine/graph/nv10.c} | 0 .../engine/graph/nv20.c} | 0 .../engine/graph/nv40.c} | 4 +- .../engine/graph/nv50.c} | 6 +- .../engine/graph/nvc0.c} | 10 +-- .../engine/graph/nvc0.h} | 0 .../engine/graph/nve0.c} | 6 +- .../engine/graph/nve0.h} | 0 .../{nv31_mpeg.c => core/engine/mpeg/nv31.c} | 4 +- .../{nv50_mpeg.c => core/engine/mpeg/nv50.c} | 2 +- .../{nv98_ppp.c => core/engine/ppp/nv98.c} | 4 +- .../{nv84_vp.c => core/engine/vp/nv84.c} | 4 +- .../{nouveau_mm.h => core/include/core/mm.h} | 12 --- .../include/core/ramht.h} | 0 .../include/engine/fifo.h} | 0 .../include/subdev/gpio.h} | 0 .../include/subdev/i2c.h} | 0 .../include/subdev/vm.h} | 2 +- .../{nv04_fb.c => core/subdev/fb/nv04.c} | 0 .../{nv10_fb.c => core/subdev/fb/nv10.c} | 0 .../{nv20_fb.c => core/subdev/fb/nv20.c} | 0 .../{nv30_fb.c => core/subdev/fb/nv30.c} | 0 .../{nv40_fb.c => core/subdev/fb/nv40.c} | 0 .../{nv50_fb.c => core/subdev/fb/nv50.c} | 2 +- .../nouveau/{ => core/subdev/fb}/nv50_vram.c | 2 +- .../{nvc0_fb.c => core/subdev/fb/nvc0.c} | 0 .../nouveau/{ => core/subdev/fb}/nvc0_vram.c | 2 +- .../subdev/gpio/base.c} | 4 +- .../{nv10_gpio.c => core/subdev/gpio/nv10.c} | 2 +- .../{nv50_gpio.c => core/subdev/gpio/nv50.c} | 2 +- .../{nouveau_i2c.c => core/subdev/i2c/base.c} | 2 +- .../subdev/instmem/nv04.c} | 4 +- .../subdev/instmem/nv50.c} | 3 +- .../subdev/instmem/nvc0.c} | 3 +- .../{nv04_mc.c => core/subdev/mc/nv04.c} | 0 .../{nv40_mc.c => core/subdev/mc/nv40.c} | 0 .../{nv50_mc.c => core/subdev/mc/nv50.c} | 0 .../subdev/timer/nv04.c} | 0 .../{nouveau_vm.c => core/subdev/vm/base.c} | 4 +- .../{nv50_vm.c => core/subdev/vm/nv50.c} | 2 +- .../{nvc0_vm.c => core/subdev/vm/nvc0.c} | 2 +- drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bios.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bios.h | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 +- drivers/gpu/drm/nouveau/nouveau_channel.c | 4 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +- drivers/gpu/drm/nouveau/nouveau_connector.h | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_dp.c | 4 +- drivers/gpu/drm/nouveau/nouveau_drv.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drv.h | 16 +++- drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +- drivers/gpu/drm/nouveau/nouveau_gpuobj.c | 6 +- drivers/gpu/drm/nouveau/nouveau_irq.c | 2 +- drivers/gpu/drm/nouveau/nouveau_mem.c | 6 +- drivers/gpu/drm/nouveau/nouveau_notifier.c | 2 +- drivers/gpu/drm/nouveau/nouveau_pm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_state.c | 6 +- drivers/gpu/drm/nouveau/nouveau_volt.c | 2 +- drivers/gpu/drm/nouveau/nv04_dac.c | 2 +- drivers/gpu/drm/nouveau/nv04_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nv04_fence.c | 2 +- drivers/gpu/drm/nouveau/nv04_software.c | 2 +- drivers/gpu/drm/nouveau/nv10_fence.c | 2 +- drivers/gpu/drm/nouveau/nv17_tv.c | 2 +- drivers/gpu/drm/nouveau/nv40_pm.c | 4 +- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- drivers/gpu/drm/nouveau/nv50_evo.c | 2 +- drivers/gpu/drm/nouveau/nv50_fbcon.c | 4 +- drivers/gpu/drm/nouveau/nv50_pm.c | 2 +- drivers/gpu/drm/nouveau/nv50_software.c | 2 +- drivers/gpu/drm/nouveau/nv84_fence.c | 4 +- drivers/gpu/drm/nouveau/nva3_pm.c | 2 +- drivers/gpu/drm/nouveau/nvc0_fbcon.c | 4 +- drivers/gpu/drm/nouveau/nvc0_fence.c | 4 +- drivers/gpu/drm/nouveau/nvc0_pm.c | 2 +- drivers/gpu/drm/nouveau/nvc0_software.c | 2 +- 111 files changed, 208 insertions(+), 168 deletions(-) rename drivers/gpu/drm/nouveau/{nouveau_mm.c => core/core/mm.c} (99%) rename drivers/gpu/drm/nouveau/{nouveau_ramht.c => core/core/ramht.c} (99%) rename drivers/gpu/drm/nouveau/{nv84_bsp.c => core/engine/bsp/nv84.c} (97%) rename drivers/gpu/drm/nouveau/{nva3_copy.fuc => core/engine/copy/fuc/nva3.fuc} (100%) rename drivers/gpu/drm/nouveau/{nva3_copy.fuc.h => core/engine/copy/fuc/nva3.fuc.h} (100%) rename drivers/gpu/drm/nouveau/{nvc0_copy.fuc.h => core/engine/copy/fuc/nvc0.fuc.h} (100%) rename drivers/gpu/drm/nouveau/{nva3_copy.c => core/engine/copy/nva3.c} (98%) rename drivers/gpu/drm/nouveau/{nvc0_copy.c => core/engine/copy/nvc0.c} (98%) rename drivers/gpu/drm/nouveau/{nv98_crypt.fuc => core/engine/crypt/fuc/nv98.fuc} (100%) rename drivers/gpu/drm/nouveau/{nv98_crypt.fuc.h => core/engine/crypt/fuc/nv98.fuc.h} (100%) rename drivers/gpu/drm/nouveau/{nv84_crypt.c => core/engine/crypt/nv84.c} (99%) rename drivers/gpu/drm/nouveau/{nv98_crypt.c => core/engine/crypt/nv98.c} (98%) rename drivers/gpu/drm/nouveau/{nv04_fifo.c => core/engine/fifo/nv04.c} (99%) rename drivers/gpu/drm/nouveau/{nv10_fifo.c => core/engine/fifo/nv10.c} (98%) rename drivers/gpu/drm/nouveau/{nv17_fifo.c => core/engine/fifo/nv17.c} (99%) rename drivers/gpu/drm/nouveau/{nv40_fifo.c => core/engine/fifo/nv40.c} (99%) rename drivers/gpu/drm/nouveau/{nv50_fifo.c => core/engine/fifo/nv50.c} (99%) rename drivers/gpu/drm/nouveau/{nv84_fifo.c => core/engine/fifo/nv84.c} (98%) rename drivers/gpu/drm/nouveau/{nvc0_fifo.c => core/engine/fifo/nvc0.c} (99%) rename drivers/gpu/drm/nouveau/{nve0_fifo.c => core/engine/fifo/nve0.c} (99%) rename drivers/gpu/drm/nouveau/{nouveau_grctx.h => core/engine/graph/ctx.h} (100%) rename drivers/gpu/drm/nouveau/{nv40_grctx.c => core/engine/graph/ctxnv40.c} (99%) rename drivers/gpu/drm/nouveau/{nv50_grctx.c => core/engine/graph/ctxnv50.c} (99%) rename drivers/gpu/drm/nouveau/{nvc0_grctx.c => core/engine/graph/ctxnvc0.c} (99%) rename drivers/gpu/drm/nouveau/{nve0_grctx.c => core/engine/graph/ctxnve0.c} (99%) rename drivers/gpu/drm/nouveau/{nvc0_grgpc.fuc => core/engine/graph/fuc/gpcnvc0.fuc} (100%) rename drivers/gpu/drm/nouveau/{nvc0_grgpc.fuc.h => core/engine/graph/fuc/gpcnvc0.fuc.h} (100%) rename drivers/gpu/drm/nouveau/{nvc0_grhub.fuc => core/engine/graph/fuc/hubnvc0.fuc} (100%) rename drivers/gpu/drm/nouveau/{nvc0_grhub.fuc.h => core/engine/graph/fuc/hubnvc0.fuc.h} (100%) rename drivers/gpu/drm/nouveau/{nvc0_graph.fuc => core/engine/graph/fuc/nvc0.fuc} (100%) rename drivers/gpu/drm/nouveau/{nv04_graph.c => core/engine/graph/nv04.c} (99%) rename drivers/gpu/drm/nouveau/{nv10_graph.c => core/engine/graph/nv10.c} (100%) rename drivers/gpu/drm/nouveau/{nv20_graph.c => core/engine/graph/nv20.c} (100%) rename drivers/gpu/drm/nouveau/{nv40_graph.c => core/engine/graph/nv40.c} (99%) rename drivers/gpu/drm/nouveau/{nv50_graph.c => core/engine/graph/nv50.c} (99%) rename drivers/gpu/drm/nouveau/{nvc0_graph.c => core/engine/graph/nvc0.c} (99%) rename drivers/gpu/drm/nouveau/{nvc0_graph.h => core/engine/graph/nvc0.h} (100%) rename drivers/gpu/drm/nouveau/{nve0_graph.c => core/engine/graph/nve0.c} (99%) rename drivers/gpu/drm/nouveau/{nve0_graph.h => core/engine/graph/nve0.h} (100%) rename drivers/gpu/drm/nouveau/{nv31_mpeg.c => core/engine/mpeg/nv31.c} (99%) rename drivers/gpu/drm/nouveau/{nv50_mpeg.c => core/engine/mpeg/nv50.c} (99%) rename drivers/gpu/drm/nouveau/{nv98_ppp.c => core/engine/ppp/nv98.c} (97%) rename drivers/gpu/drm/nouveau/{nv84_vp.c => core/engine/vp/nv84.c} (97%) rename drivers/gpu/drm/nouveau/{nouveau_mm.h => core/include/core/mm.h} (76%) rename drivers/gpu/drm/nouveau/{nouveau_ramht.h => core/include/core/ramht.h} (100%) rename drivers/gpu/drm/nouveau/{nouveau_fifo.h => core/include/engine/fifo.h} (100%) rename drivers/gpu/drm/nouveau/{nouveau_gpio.h => core/include/subdev/gpio.h} (100%) rename drivers/gpu/drm/nouveau/{nouveau_i2c.h => core/include/subdev/i2c.h} (100%) rename drivers/gpu/drm/nouveau/{nouveau_vm.h => core/include/subdev/vm.h} (99%) rename drivers/gpu/drm/nouveau/{nv04_fb.c => core/subdev/fb/nv04.c} (100%) rename drivers/gpu/drm/nouveau/{nv10_fb.c => core/subdev/fb/nv10.c} (100%) rename drivers/gpu/drm/nouveau/{nv20_fb.c => core/subdev/fb/nv20.c} (100%) rename drivers/gpu/drm/nouveau/{nv30_fb.c => core/subdev/fb/nv30.c} (100%) rename drivers/gpu/drm/nouveau/{nv40_fb.c => core/subdev/fb/nv40.c} (100%) rename drivers/gpu/drm/nouveau/{nv50_fb.c => core/subdev/fb/nv50.c} (99%) rename drivers/gpu/drm/nouveau/{ => core/subdev/fb}/nv50_vram.c (99%) rename drivers/gpu/drm/nouveau/{nvc0_fb.c => core/subdev/fb/nvc0.c} (100%) rename drivers/gpu/drm/nouveau/{ => core/subdev/fb}/nvc0_vram.c (99%) rename drivers/gpu/drm/nouveau/{nouveau_gpio.c => core/subdev/gpio/base.c} (99%) rename drivers/gpu/drm/nouveau/{nv10_gpio.c => core/subdev/gpio/nv10.c} (99%) rename drivers/gpu/drm/nouveau/{nv50_gpio.c => core/subdev/gpio/nv50.c} (99%) rename drivers/gpu/drm/nouveau/{nouveau_i2c.c => core/subdev/i2c/base.c} (99%) rename drivers/gpu/drm/nouveau/{nv04_instmem.c => core/subdev/instmem/nv04.c} (98%) rename drivers/gpu/drm/nouveau/{nv50_instmem.c => core/subdev/instmem/nv50.c} (99%) rename drivers/gpu/drm/nouveau/{nvc0_instmem.c => core/subdev/instmem/nvc0.c} (99%) rename drivers/gpu/drm/nouveau/{nv04_mc.c => core/subdev/mc/nv04.c} (100%) rename drivers/gpu/drm/nouveau/{nv40_mc.c => core/subdev/mc/nv40.c} (100%) rename drivers/gpu/drm/nouveau/{nv50_mc.c => core/subdev/mc/nv50.c} (100%) rename drivers/gpu/drm/nouveau/{nv04_timer.c => core/subdev/timer/nv04.c} (100%) rename drivers/gpu/drm/nouveau/{nouveau_vm.c => core/subdev/vm/base.c} (99%) rename drivers/gpu/drm/nouveau/{nv50_vm.c => core/subdev/vm/nv50.c} (99%) rename drivers/gpu/drm/nouveau/{nvc0_vm.c => core/subdev/vm/nvc0.c} (99%) diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile index 1cece6a78f397..40c311e24bcd6 100644 --- a/drivers/gpu/drm/nouveau/Makefile +++ b/drivers/gpu/drm/nouveau/Makefile @@ -3,45 +3,87 @@ # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. ccflags-y := -Iinclude/drm -nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ +ccflags-y += -I$(src)/core/include +ccflags-y += -I$(src) + +nouveau-y := core/core/mm.o +nouveau-y += core/core/ramht.o + +nouveau-y += core/subdev/fb/nv04.o +nouveau-y += core/subdev/fb/nv10.o +nouveau-y += core/subdev/fb/nv20.o +nouveau-y += core/subdev/fb/nv30.o +nouveau-y += core/subdev/fb/nv40.o +nouveau-y += core/subdev/fb/nv50.o +nouveau-y += core/subdev/fb/nvc0.o +nouveau-y += core/subdev/fb/nv50_vram.o +nouveau-y += core/subdev/fb/nvc0_vram.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/i2c/base.o +nouveau-y += core/subdev/instmem/nv04.o +nouveau-y += core/subdev/instmem/nv50.o +nouveau-y += core/subdev/instmem/nvc0.o +nouveau-y += core/subdev/mc/nv04.o +nouveau-y += core/subdev/mc/nv40.o +nouveau-y += core/subdev/mc/nv50.o +nouveau-y += core/subdev/timer/nv04.o +nouveau-y += core/subdev/vm/base.o +nouveau-y += core/subdev/vm/nv50.o +nouveau-y += core/subdev/vm/nvc0.o + +nouveau-y += core/engine/bsp/nv84.o +nouveau-y += core/engine/copy/nva3.o +nouveau-y += core/engine/copy/nvc0.o +nouveau-y += core/engine/crypt/nv84.o +nouveau-y += core/engine/crypt/nv98.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/graph/ctxnv40.o +nouveau-y += core/engine/graph/ctxnv50.o +nouveau-y += core/engine/graph/ctxnvc0.o +nouveau-y += core/engine/graph/ctxnve0.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/nv40.o +nouveau-y += core/engine/graph/nv50.o +nouveau-y += core/engine/graph/nvc0.o +nouveau-y += core/engine/graph/nve0.o +nouveau-y += core/engine/mpeg/nv31.o +nouveau-y += core/engine/mpeg/nv50.o +nouveau-y += core/engine/ppp/nv98.o +nouveau-y += core/engine/vp/nv84.o + +nouveau-y += nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ nouveau_gpuobj.o nouveau_irq.o nouveau_notifier.o \ nouveau_sgdma.o nouveau_dma.o nouveau_util.o \ nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o \ - nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \ + nouveau_hw.o nouveau_calc.o \ nouveau_display.o nouveau_connector.o nouveau_fbcon.o \ - nouveau_hdmi.o nouveau_dp.o nouveau_ramht.o \ + nouveau_hdmi.o nouveau_dp.o \ nouveau_pm.o nouveau_volt.o nouveau_perf.o nouveau_temp.o \ - nouveau_mm.o nouveau_vm.o nouveau_mxm.o nouveau_gpio.o \ + nouveau_mxm.o \ nouveau_abi16.o \ - nv04_timer.o \ - nv04_mc.o nv40_mc.o nv50_mc.o \ - nv04_fb.o nv10_fb.o nv20_fb.o nv30_fb.o nv40_fb.o \ - nv50_fb.o nvc0_fb.o \ - nv04_fifo.o nv10_fifo.o nv17_fifo.o nv40_fifo.o nv50_fifo.o \ - nv84_fifo.o nvc0_fifo.o nve0_fifo.o \ + nouveau_bios.o \ nv04_fence.o nv10_fence.o nv84_fence.o nvc0_fence.o \ nv04_software.o nv50_software.o nvc0_software.o \ - nv04_graph.o nv10_graph.o nv20_graph.o \ - nv40_graph.o nv50_graph.o nvc0_graph.o nve0_graph.o \ - nv40_grctx.o nv50_grctx.o nvc0_grctx.o nve0_grctx.o \ - nv84_crypt.o nv98_crypt.o \ - nva3_copy.o nvc0_copy.o \ - nv31_mpeg.o nv50_mpeg.o \ - nv84_bsp.o \ - nv84_vp.o \ - nv98_ppp.o \ - nv04_instmem.o nv50_instmem.o nvc0_instmem.o \ nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \ nv04_crtc.o nv04_display.o nv04_cursor.o \ nv50_evo.o nv50_crtc.o nv50_dac.o nv50_sor.o \ nv50_cursor.o nv50_display.o \ nvd0_display.o \ nv04_fbcon.o nv50_fbcon.o nvc0_fbcon.o \ - nv10_gpio.o nv50_gpio.o \ nv50_calc.o \ nv04_pm.o nv40_pm.o nv50_pm.o nva3_pm.o nvc0_pm.o \ - nv50_vram.o nvc0_vram.o \ - nv50_vm.o nvc0_vm.o nouveau_prime.o + nouveau_prime.o nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o diff --git a/drivers/gpu/drm/nouveau/nouveau_mm.c b/drivers/gpu/drm/nouveau/core/core/mm.c similarity index 99% rename from drivers/gpu/drm/nouveau/nouveau_mm.c rename to drivers/gpu/drm/nouveau/core/core/mm.c index b29ffb3d1408c..024dd2c722bbf 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mm.c +++ b/drivers/gpu/drm/nouveau/core/core/mm.c @@ -24,7 +24,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" +#include <core/mm.h> static inline void region_put(struct nouveau_mm *mm, struct nouveau_mm_node *a) diff --git a/drivers/gpu/drm/nouveau/nouveau_ramht.c b/drivers/gpu/drm/nouveau/core/core/ramht.c similarity index 99% rename from drivers/gpu/drm/nouveau/nouveau_ramht.c rename to drivers/gpu/drm/nouveau/core/core/ramht.c index a24a81f5a89e4..59c16192f0e4d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ramht.c +++ b/drivers/gpu/drm/nouveau/core/core/ramht.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> static u32 nouveau_ramht_hash_handle(struct nouveau_channel *chan, u32 handle) diff --git a/drivers/gpu/drm/nouveau/nv84_bsp.c b/drivers/gpu/drm/nouveau/core/engine/bsp/nv84.c similarity index 97% rename from drivers/gpu/drm/nouveau/nv84_bsp.c rename to drivers/gpu/drm/nouveau/core/engine/bsp/nv84.c index 74875739bcc0e..db3b57369830b 100644 --- a/drivers/gpu/drm/nouveau/nv84_bsp.c +++ b/drivers/gpu/drm/nouveau/core/engine/bsp/nv84.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_util.h" -#include "nouveau_vm.h" -#include "nouveau_ramht.h" +#include <subdev/vm.h> +#include <core/ramht.h> /*XXX: This stub is currently used on NV98+ also, as soon as this becomes * more than just an enable/disable stub this needs to be split out to diff --git a/drivers/gpu/drm/nouveau/nva3_copy.fuc b/drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc similarity index 100% rename from drivers/gpu/drm/nouveau/nva3_copy.fuc rename to drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc diff --git a/drivers/gpu/drm/nouveau/nva3_copy.fuc.h b/drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc.h similarity index 100% rename from drivers/gpu/drm/nouveau/nva3_copy.fuc.h rename to drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc.h diff --git a/drivers/gpu/drm/nouveau/nvc0_copy.fuc.h b/drivers/gpu/drm/nouveau/core/engine/copy/fuc/nvc0.fuc.h similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_copy.fuc.h rename to drivers/gpu/drm/nouveau/core/engine/copy/fuc/nvc0.fuc.h diff --git a/drivers/gpu/drm/nouveau/nva3_copy.c b/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c similarity index 98% rename from drivers/gpu/drm/nouveau/nva3_copy.c rename to drivers/gpu/drm/nouveau/core/engine/copy/nva3.c index 0387dc7f4f421..fec52463456a5 100644 --- a/drivers/gpu/drm/nouveau/nva3_copy.c +++ b/drivers/gpu/drm/nouveau/core/engine/copy/nva3.c @@ -26,9 +26,9 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_util.h" -#include "nouveau_vm.h" -#include "nouveau_ramht.h" -#include "nva3_copy.fuc.h" +#include <subdev/vm.h> +#include <core/ramht.h> +#include "fuc/nva3.fuc.h" struct nva3_copy_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nvc0_copy.c b/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c similarity index 98% rename from drivers/gpu/drm/nouveau/nvc0_copy.c rename to drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c index dddf006f6d887..90a069b46a9da 100644 --- a/drivers/gpu/drm/nouveau/nvc0_copy.c +++ b/drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c @@ -26,9 +26,9 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_util.h" -#include "nouveau_vm.h" -#include "nouveau_ramht.h" -#include "nvc0_copy.fuc.h" +#include <subdev/vm.h> +#include <core/ramht.h> +#include "fuc/nvc0.fuc.h" struct nvc0_copy_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv98_crypt.fuc b/drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc similarity index 100% rename from drivers/gpu/drm/nouveau/nv98_crypt.fuc rename to drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc diff --git a/drivers/gpu/drm/nouveau/nv98_crypt.fuc.h b/drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc.h similarity index 100% rename from drivers/gpu/drm/nouveau/nv98_crypt.fuc.h rename to drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc.h diff --git a/drivers/gpu/drm/nouveau/nv84_crypt.c b/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv84_crypt.c rename to drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c index bbfcc73b67080..388138946ad9c 100644 --- a/drivers/gpu/drm/nouveau/nv84_crypt.c +++ b/drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_util.h" -#include "nouveau_vm.h" -#include "nouveau_ramht.h" +#include <subdev/vm.h> +#include <core/ramht.h> struct nv84_crypt_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv98_crypt.c b/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c similarity index 98% rename from drivers/gpu/drm/nouveau/nv98_crypt.c rename to drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c index e25e13fb894e6..563f60d1ce6ee 100644 --- a/drivers/gpu/drm/nouveau/nv98_crypt.c +++ b/drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c @@ -26,10 +26,10 @@ #include "nouveau_drv.h" #include "nouveau_util.h" -#include "nouveau_vm.h" -#include "nouveau_ramht.h" +#include <subdev/vm.h> +#include <core/ramht.h> -#include "nv98_crypt.fuc.h" +#include "fuc/nv98.fuc.h" struct nv98_crypt_priv { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv04_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv04_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c index a6295cd00ec7b..bc3808737ace0 100644 --- a/drivers/gpu/drm/nouveau/nv04_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c @@ -27,9 +27,9 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> #include "nouveau_util.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_software.h" static struct ramfc_desc { diff --git a/drivers/gpu/drm/nouveau/nv10_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c similarity index 98% rename from drivers/gpu/drm/nouveau/nv10_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c index f1fe7d7582416..9058c31c3bf3d 100644 --- a/drivers/gpu/drm/nouveau/nv10_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c @@ -27,9 +27,9 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> #include "nouveau_util.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> static struct ramfc_desc { unsigned bits:6; diff --git a/drivers/gpu/drm/nouveau/nv17_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv17_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c index d9e482e4abeea..c514364cc321a 100644 --- a/drivers/gpu/drm/nouveau/nv17_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c @@ -27,9 +27,9 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> #include "nouveau_util.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> static struct ramfc_desc { unsigned bits:6; diff --git a/drivers/gpu/drm/nouveau/nv40_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv40_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c index cdc818479b0af..3079f080d40ec 100644 --- a/drivers/gpu/drm/nouveau/nv40_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c @@ -27,9 +27,9 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> #include "nouveau_util.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> static struct ramfc_desc { unsigned bits:6; diff --git a/drivers/gpu/drm/nouveau/nv50_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c index 55383b85db0b7..2309871704e77 100644 --- a/drivers/gpu/drm/nouveau/nv50_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c @@ -27,9 +27,9 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" -#include "nouveau_vm.h" +#include <engine/fifo.h> +#include <core/ramht.h> +#include <subdev/vm.h> struct nv50_fifo_priv { struct nouveau_fifo_priv base; diff --git a/drivers/gpu/drm/nouveau/nv84_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c similarity index 98% rename from drivers/gpu/drm/nouveau/nv84_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c index c564c5e4c30aa..f505d1ed8866d 100644 --- a/drivers/gpu/drm/nouveau/nv84_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c @@ -27,9 +27,9 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" -#include "nouveau_vm.h" +#include <engine/fifo.h> +#include <core/ramht.h> +#include <subdev/vm.h> struct nv84_fifo_priv { struct nouveau_fifo_priv base; diff --git a/drivers/gpu/drm/nouveau/nvc0_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nvc0_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c index cd39eb99f5b15..398f32df7e6e5 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" -#include "nouveau_fifo.h" +#include <core/mm.h> +#include <engine/fifo.h> static void nvc0_fifo_isr(struct drm_device *); diff --git a/drivers/gpu/drm/nouveau/nve0_fifo.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nve0_fifo.c rename to drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index 281bece751b61..829959fac149b 100644 --- a/drivers/gpu/drm/nouveau/nve0_fifo.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" -#include "nouveau_fifo.h" +#include <core/mm.h> +#include <engine/fifo.h> #define NVE0_FIFO_ENGINE_NUM 32 diff --git a/drivers/gpu/drm/nouveau/nouveau_grctx.h b/drivers/gpu/drm/nouveau/core/engine/graph/ctx.h similarity index 100% rename from drivers/gpu/drm/nouveau/nouveau_grctx.h rename to drivers/gpu/drm/nouveau/core/engine/graph/ctx.h diff --git a/drivers/gpu/drm/nouveau/nv40_grctx.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv40.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv40_grctx.c rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnv40.c index be0a74750fb1d..b17506d7eb607 100644 --- a/drivers/gpu/drm/nouveau/nv40_grctx.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv40.c @@ -111,7 +111,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_grctx.h" +#include "ctx.h" /* TODO: * - get vs count from 0x1540 diff --git a/drivers/gpu/drm/nouveau/nv50_grctx.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_grctx.c rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnv50.c index 881e22b249fc5..e17c17bfd89e7 100644 --- a/drivers/gpu/drm/nouveau/nv50_grctx.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv50.c @@ -107,7 +107,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_grctx.h" +#include "ctx.h" #define IS_NVA3F(x) (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf) #define IS_NVAAF(x) ((x) >= 0xaa && (x) <= 0xac) diff --git a/drivers/gpu/drm/nouveau/nvc0_grctx.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nvc0_grctx.c rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c index de77842b31c09..5083fda3a878a 100644 --- a/drivers/gpu/drm/nouveau/nvc0_grctx.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c @@ -24,8 +24,8 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" -#include "nvc0_graph.h" +#include <core/mm.h> +#include "nvc0.h" static void nv_icmd(struct drm_device *dev, u32 icmd, u32 data) diff --git a/drivers/gpu/drm/nouveau/nve0_grctx.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnve0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nve0_grctx.c rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnve0.c index d8cb360e92c17..bd40bd9effb89 100644 --- a/drivers/gpu/drm/nouveau/nve0_grctx.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnve0.c @@ -24,8 +24,8 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" -#include "nve0_graph.h" +#include <core/mm.h> +#include "nve0.h" static void nv_icmd(struct drm_device *dev, u32 icmd, u32 data) diff --git a/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_grgpc.fuc rename to drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc diff --git a/drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h rename to drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h diff --git a/drivers/gpu/drm/nouveau/nvc0_grhub.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_grhub.fuc rename to drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc diff --git a/drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h rename to drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/nvc0.fuc similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_graph.fuc rename to drivers/gpu/drm/nouveau/core/engine/graph/fuc/nvc0.fuc diff --git a/drivers/gpu/drm/nouveau/nv04_graph.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv04.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv04_graph.c rename to drivers/gpu/drm/nouveau/core/engine/graph/nv04.c index 72f1a62903b39..353d4d330cabb 100644 --- a/drivers/gpu/drm/nouveau/nv04_graph.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv04.c @@ -28,7 +28,7 @@ #include "nouveau_drv.h" #include "nouveau_hw.h" #include "nouveau_util.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> struct nv04_graph_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv10_graph.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv10.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv10_graph.c rename to drivers/gpu/drm/nouveau/core/engine/graph/nv10.c diff --git a/drivers/gpu/drm/nouveau/nv20_graph.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv20.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv20_graph.c rename to drivers/gpu/drm/nouveau/core/engine/graph/nv20.c diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv40_graph.c rename to drivers/gpu/drm/nouveau/core/engine/graph/nv40.c index aa9e2df64a26d..4ad9759f821e3 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv40.c @@ -27,8 +27,8 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> struct nv40_graph_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_graph.c rename to drivers/gpu/drm/nouveau/core/engine/graph/nv50.c index 437608d1dfe7b..c22e3a0bca76c 100644 --- a/drivers/gpu/drm/nouveau/nv50_graph.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv50.c @@ -27,10 +27,10 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> #include "nouveau_dma.h" -#include "nouveau_vm.h" +#include <subdev/vm.h> #include "nv50_evo.h" struct nv50_graph_engine { diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nvc0_graph.c rename to drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c index 2a01e6e47724f..8f515dcb63c0d 100644 --- a/drivers/gpu/drm/nouveau/nvc0_graph.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c @@ -28,12 +28,12 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" -#include "nouveau_fifo.h" +#include <core/mm.h> +#include <engine/fifo.h> -#include "nvc0_graph.h" -#include "nvc0_grhub.fuc.h" -#include "nvc0_grgpc.fuc.h" +#include "nvc0.h" +#include "fuc/hubnvc0.fuc.h" +#include "fuc/gpcnvc0.fuc.h" static void nvc0_graph_ctxctl_debug_unit(struct drm_device *dev, u32 base) diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.h b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_graph.h rename to drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h diff --git a/drivers/gpu/drm/nouveau/nve0_graph.c b/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nve0_graph.c rename to drivers/gpu/drm/nouveau/core/engine/graph/nve0.c index 8a8051b68f106..a8364b1236a06 100644 --- a/drivers/gpu/drm/nouveau/nve0_graph.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nve0.c @@ -28,10 +28,10 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" -#include "nouveau_fifo.h" +#include <core/mm.h> +#include <engine/fifo.h> -#include "nve0_graph.h" +#include "nve0.h" static void nve0_graph_ctxctl_debug_unit(struct drm_device *dev, u32 base) diff --git a/drivers/gpu/drm/nouveau/nve0_graph.h b/drivers/gpu/drm/nouveau/core/engine/graph/nve0.h similarity index 100% rename from drivers/gpu/drm/nouveau/nve0_graph.h rename to drivers/gpu/drm/nouveau/core/engine/graph/nve0.h diff --git a/drivers/gpu/drm/nouveau/nv31_mpeg.c b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv31_mpeg.c rename to drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c index 5f239bf658c48..4a14a6763dac1 100644 --- a/drivers/gpu/drm/nouveau/nv31_mpeg.c +++ b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c @@ -24,8 +24,8 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> struct nv31_mpeg_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv50_mpeg.c b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_mpeg.c rename to drivers/gpu/drm/nouveau/core/engine/mpeg/nv50.c index 90e8ed22cfcba..47d37a2f478fc 100644 --- a/drivers/gpu/drm/nouveau/nv50_mpeg.c +++ b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv50.c @@ -24,7 +24,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> struct nv50_mpeg_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv98_ppp.c b/drivers/gpu/drm/nouveau/core/engine/ppp/nv98.c similarity index 97% rename from drivers/gpu/drm/nouveau/nv98_ppp.c rename to drivers/gpu/drm/nouveau/core/engine/ppp/nv98.c index a987dd6e00362..20d33dcd7f40c 100644 --- a/drivers/gpu/drm/nouveau/nv98_ppp.c +++ b/drivers/gpu/drm/nouveau/core/engine/ppp/nv98.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_util.h" -#include "nouveau_vm.h" -#include "nouveau_ramht.h" +#include <subdev/vm.h> +#include <core/ramht.h> struct nv98_ppp_engine { struct nouveau_exec_engine base; diff --git a/drivers/gpu/drm/nouveau/nv84_vp.c b/drivers/gpu/drm/nouveau/core/engine/vp/nv84.c similarity index 97% rename from drivers/gpu/drm/nouveau/nv84_vp.c rename to drivers/gpu/drm/nouveau/core/engine/vp/nv84.c index 6570d300ab854..eb7e1960dd812 100644 --- a/drivers/gpu/drm/nouveau/nv84_vp.c +++ b/drivers/gpu/drm/nouveau/core/engine/vp/nv84.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_util.h" -#include "nouveau_vm.h" -#include "nouveau_ramht.h" +#include <subdev/vm.h> +#include <core/ramht.h> /*XXX: This stub is currently used on NV98+ also, as soon as this becomes * more than just an enable/disable stub this needs to be split out to diff --git a/drivers/gpu/drm/nouveau/nouveau_mm.h b/drivers/gpu/drm/nouveau/core/include/core/mm.h similarity index 76% rename from drivers/gpu/drm/nouveau/nouveau_mm.h rename to drivers/gpu/drm/nouveau/core/include/core/mm.h index 57a600c35c95a..d2b4290f5abec 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mm.h +++ b/drivers/gpu/drm/nouveau/core/include/core/mm.h @@ -52,16 +52,4 @@ int nouveau_mm_get(struct nouveau_mm *, int type, u32 size, u32 size_nc, u32 align, struct nouveau_mm_node **); void nouveau_mm_put(struct nouveau_mm *, struct nouveau_mm_node *); -int nv50_vram_init(struct drm_device *); -void nv50_vram_fini(struct drm_device *); -int nv50_vram_new(struct drm_device *, u64 size, u32 align, u32 size_nc, - u32 memtype, struct nouveau_mem **); -void nv50_vram_del(struct drm_device *, struct nouveau_mem **); -bool nv50_vram_flags_valid(struct drm_device *, u32 tile_flags); - -int nvc0_vram_init(struct drm_device *); -int nvc0_vram_new(struct drm_device *, u64 size, u32 align, u32 ncmin, - u32 memtype, struct nouveau_mem **); -bool nvc0_vram_flags_valid(struct drm_device *, u32 tile_flags); - #endif diff --git a/drivers/gpu/drm/nouveau/nouveau_ramht.h b/drivers/gpu/drm/nouveau/core/include/core/ramht.h similarity index 100% rename from drivers/gpu/drm/nouveau/nouveau_ramht.h rename to drivers/gpu/drm/nouveau/core/include/core/ramht.h diff --git a/drivers/gpu/drm/nouveau/nouveau_fifo.h b/drivers/gpu/drm/nouveau/core/include/engine/fifo.h similarity index 100% rename from drivers/gpu/drm/nouveau/nouveau_fifo.h rename to drivers/gpu/drm/nouveau/core/include/engine/fifo.h diff --git a/drivers/gpu/drm/nouveau/nouveau_gpio.h b/drivers/gpu/drm/nouveau/core/include/subdev/gpio.h similarity index 100% rename from drivers/gpu/drm/nouveau/nouveau_gpio.h rename to drivers/gpu/drm/nouveau/core/include/subdev/gpio.h diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.h b/drivers/gpu/drm/nouveau/core/include/subdev/i2c.h similarity index 100% rename from drivers/gpu/drm/nouveau/nouveau_i2c.h rename to drivers/gpu/drm/nouveau/core/include/subdev/i2c.h diff --git a/drivers/gpu/drm/nouveau/nouveau_vm.h b/drivers/gpu/drm/nouveau/core/include/subdev/vm.h similarity index 99% rename from drivers/gpu/drm/nouveau/nouveau_vm.h rename to drivers/gpu/drm/nouveau/core/include/subdev/vm.h index a8246e7e4a89e..7c1fc2114feca 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vm.h +++ b/drivers/gpu/drm/nouveau/core/include/subdev/vm.h @@ -28,7 +28,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" +#include <core/mm.h> struct nouveau_vm_pgt { struct nouveau_gpuobj *obj[2]; diff --git a/drivers/gpu/drm/nouveau/nv04_fb.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv04.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv04_fb.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv04.c diff --git a/drivers/gpu/drm/nouveau/nv10_fb.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv10_fb.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c diff --git a/drivers/gpu/drm/nouveau/nv20_fb.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv20_fb.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c diff --git a/drivers/gpu/drm/nouveau/nv30_fb.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv30_fb.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c diff --git a/drivers/gpu/drm/nouveau/nv40_fb.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv40.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv40_fb.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv40.c diff --git a/drivers/gpu/drm/nouveau/nv50_fb.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_fb.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c index f1e4b9e07d148..3488358401a81 100644 --- a/drivers/gpu/drm/nouveau/nv50_fb.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c @@ -2,7 +2,7 @@ #include "drm.h" #include "nouveau_drv.h" #include "nouveau_drm.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> struct nv50_fb_priv { struct page *r100c08_page; diff --git a/drivers/gpu/drm/nouveau/nv50_vram.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50_vram.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_vram.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv50_vram.c index 9ed9ae397d75c..029274baf9a37 100644 --- a/drivers/gpu/drm/nouveau/nv50_vram.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50_vram.c @@ -24,7 +24,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" +#include <core/mm.h> static int types[0x80] = { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/drivers/gpu/drm/nouveau/nvc0_fb.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c similarity index 100% rename from drivers/gpu/drm/nouveau/nvc0_fb.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c diff --git a/drivers/gpu/drm/nouveau/nvc0_vram.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0_vram.c similarity index 99% rename from drivers/gpu/drm/nouveau/nvc0_vram.c rename to drivers/gpu/drm/nouveau/core/subdev/fb/nvc0_vram.c index a7eef8934c074..8bb86e5035361 100644 --- a/drivers/gpu/drm/nouveau/nvc0_vram.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nvc0_vram.c @@ -24,7 +24,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" +#include <core/mm.h> /* 0 = unsupported * 1 = non-compressed diff --git a/drivers/gpu/drm/nouveau/nouveau_gpio.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/base.c similarity index 99% rename from drivers/gpu/drm/nouveau/nouveau_gpio.c rename to drivers/gpu/drm/nouveau/core/subdev/gpio/base.c index 82c19e82ff02e..2c48309b0e19c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gpio.c +++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/base.c @@ -24,8 +24,8 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_i2c.h" -#include "nouveau_gpio.h" +#include <subdev/i2c.h> +#include <subdev/gpio.h> static u8 * dcb_gpio_table(struct drm_device *dev) diff --git a/drivers/gpu/drm/nouveau/nv10_gpio.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv10.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv10_gpio.c rename to drivers/gpu/drm/nouveau/core/subdev/gpio/nv10.c index 9d79180069df2..42e600f68f2e8 100644 --- a/drivers/gpu/drm/nouveau/nv10_gpio.c +++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv10.c @@ -27,7 +27,7 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_hw.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> int nv10_gpio_sense(struct drm_device *dev, int line) diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_gpio.c rename to drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c index c399d510b27a8..48509b0a1c86b 100644 --- a/drivers/gpu/drm/nouveau/nv50_gpio.c +++ b/drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c @@ -26,7 +26,7 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_hw.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> #include "nv50_display.h" diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c similarity index 99% rename from drivers/gpu/drm/nouveau/nouveau_i2c.c rename to drivers/gpu/drm/nouveau/core/subdev/i2c/base.c index 240cf962c999e..71e9361583470 100644 --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c +++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c @@ -26,7 +26,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_i2c.h" +#include <subdev/i2c.h> #include "nouveau_hw.h" static void diff --git a/drivers/gpu/drm/nouveau/nv04_instmem.c b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c similarity index 98% rename from drivers/gpu/drm/nouveau/nv04_instmem.c rename to drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c index ef7a934a499ae..f01063c078e6e 100644 --- a/drivers/gpu/drm/nouveau/nv04_instmem.c +++ b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c @@ -2,8 +2,8 @@ #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> /* returns the size of fifo context */ static int diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_instmem.c rename to drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c index 0bba54f118002..d9b346333a443 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c @@ -29,7 +29,7 @@ #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_vm.h" +#include <subdev/vm.h> #define BAR1_VM_BASE 0x0020000000ULL #define BAR1_VM_SIZE pci_resource_len(dev->pdev, 1) @@ -425,4 +425,3 @@ nv84_instmem_flush(struct drm_device *dev) NV_ERROR(dev, "PRAMIN flush timeout\n"); spin_unlock_irqrestore(&dev_priv->vm_lock, flags); } - diff --git a/drivers/gpu/drm/nouveau/nvc0_instmem.c b/drivers/gpu/drm/nouveau/core/subdev/instmem/nvc0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nvc0_instmem.c rename to drivers/gpu/drm/nouveau/core/subdev/instmem/nvc0.c index b701c439c92e8..0ce986910cbf4 100644 --- a/drivers/gpu/drm/nouveau/nvc0_instmem.c +++ b/drivers/gpu/drm/nouveau/core/subdev/instmem/nvc0.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_vm.h" +#include <subdev/vm.h> struct nvc0_instmem_priv { struct nouveau_gpuobj *bar1_pgd; @@ -220,4 +220,3 @@ nvc0_instmem_takedown(struct drm_device *dev) dev_priv->engine.instmem.priv = NULL; kfree(priv); } - diff --git a/drivers/gpu/drm/nouveau/nv04_mc.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv04_mc.c rename to drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c diff --git a/drivers/gpu/drm/nouveau/nv40_mc.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nv40.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv40_mc.c rename to drivers/gpu/drm/nouveau/core/subdev/mc/nv40.c diff --git a/drivers/gpu/drm/nouveau/nv50_mc.c b/drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv50_mc.c rename to drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c diff --git a/drivers/gpu/drm/nouveau/nv04_timer.c b/drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c similarity index 100% rename from drivers/gpu/drm/nouveau/nv04_timer.c rename to drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c diff --git a/drivers/gpu/drm/nouveau/nouveau_vm.c b/drivers/gpu/drm/nouveau/core/subdev/vm/base.c similarity index 99% rename from drivers/gpu/drm/nouveau/nouveau_vm.c rename to drivers/gpu/drm/nouveau/core/subdev/vm/base.c index 11edd5e91a0a7..3d11a4aa39ef3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_vm.c +++ b/drivers/gpu/drm/nouveau/core/subdev/vm/base.c @@ -24,8 +24,8 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_mm.h" -#include "nouveau_vm.h" +#include <core/mm.h> +#include <subdev/vm.h> void nouveau_vm_map_at(struct nouveau_vma *vma, u64 delta, struct nouveau_mem *node) diff --git a/drivers/gpu/drm/nouveau/nv50_vm.c b/drivers/gpu/drm/nouveau/core/subdev/vm/nv50.c similarity index 99% rename from drivers/gpu/drm/nouveau/nv50_vm.c rename to drivers/gpu/drm/nouveau/core/subdev/vm/nv50.c index 179bb42a635c2..eeac72f402014 100644 --- a/drivers/gpu/drm/nouveau/nv50_vm.c +++ b/drivers/gpu/drm/nouveau/core/subdev/vm/nv50.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_vm.h" +#include <subdev/vm.h> void nv50_vm_map_pgt(struct nouveau_gpuobj *pgd, u32 pde, diff --git a/drivers/gpu/drm/nouveau/nvc0_vm.c b/drivers/gpu/drm/nouveau/core/subdev/vm/nvc0.c similarity index 99% rename from drivers/gpu/drm/nouveau/nvc0_vm.c rename to drivers/gpu/drm/nouveau/core/subdev/vm/nvc0.c index 30d2bd58828f9..734877a9aa091 100644 --- a/drivers/gpu/drm/nouveau/nvc0_vm.c +++ b/drivers/gpu/drm/nouveau/core/subdev/vm/nvc0.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_vm.h" +#include <subdev/vm.h> void nvc0_vm_map_pgt(struct nouveau_gpuobj *pgd, u32 index, diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 3ca240b4413d4..1b9db808a8559 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -26,7 +26,7 @@ #include "nouveau_drv.h" #include "nouveau_dma.h" #include "nouveau_abi16.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_software.h" int diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index a0a3fe3c016be..52c3992454aeb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -27,7 +27,7 @@ #include "nouveau_drv.h" #include "nouveau_hw.h" #include "nouveau_encoder.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> #include <linux/io-mapping.h> #include <linux/firmware.h> diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.h b/drivers/gpu/drm/nouveau/nouveau_bios.h index 298a3af48d14d..b42aa31144a1d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.h +++ b/drivers/gpu/drm/nouveau/nouveau_bios.h @@ -25,7 +25,7 @@ #define __NOUVEAU_BIOS_H__ #include "nvreg.h" -#include "nouveau_i2c.h" +#include <subdev/i2c.h> #define DCB_MAX_NUM_ENTRIES 16 #define DCB_MAX_NUM_I2C_ENTRIES 16 diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 7f80ed523562c..f9e6fbb0094f4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -33,10 +33,10 @@ #include "nouveau_drm.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_mm.h" -#include "nouveau_vm.h" +#include <core/mm.h> +#include <subdev/vm.h> #include "nouveau_fence.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include <linux/log2.h> #include <linux/slab.h> diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c index debd90225a88d..182fbd398f91f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c @@ -27,8 +27,8 @@ #include "nouveau_drv.h" #include "nouveau_drm.h" #include "nouveau_dma.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> #include "nouveau_fence.h" #include "nouveau_software.h" diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 7b11edb077d0c..d6eabd98506a7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -35,7 +35,7 @@ #include "nouveau_encoder.h" #include "nouveau_crtc.h" #include "nouveau_connector.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> #include "nouveau_hw.h" static void nouveau_connector_hotplug(void *, int); diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h index e4857021304c4..bb0faf9f5d1eb 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.h +++ b/drivers/gpu/drm/nouveau/nouveau_connector.h @@ -28,7 +28,7 @@ #define __NOUVEAU_CONNECTOR_H__ #include "drm_edid.h" -#include "nouveau_i2c.h" +#include <subdev/i2c.h> enum nouveau_underscan_type { UNDERSCAN_OFF, diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 7e16dc5e64672..d6051e01967d9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -34,7 +34,7 @@ #include "nouveau_dma.h" #include "nouveau_connector.h" #include "nouveau_software.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> #include "nouveau_fence.h" #include "nv50_display.h" diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c index 295932e66ac5b..efd0823234057 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.c +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c @@ -28,7 +28,7 @@ #include "drm.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> void nouveau_dma_init(struct nouveau_channel *chan) diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 7e289d2ad8e40..67b322554ac64 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c @@ -25,11 +25,11 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_i2c.h" +#include <subdev/i2c.h> #include "nouveau_connector.h" #include "nouveau_encoder.h" #include "nouveau_crtc.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> /****************************************************************************** * aux channel util functions diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 9a36f5f39b064..74c226587d52b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -34,7 +34,7 @@ #include "nouveau_fb.h" #include "nouveau_fbcon.h" #include "nouveau_pm.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> #include "nv50_display.h" #include "drm_pciids.h" diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 4f2cc95ce2649..a781d44001050 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -61,12 +61,12 @@ nouveau_fpriv(struct drm_file *file_priv) #include "nouveau_drm.h" #include "nouveau_reg.h" -#include "nouveau_bios.h" +#include <nouveau_bios.h> #include "nouveau_util.h" struct nouveau_grctx; struct nouveau_mem; -#include "nouveau_vm.h" +#include <subdev/vm.h> #define MAX_NUM_DCB_ENTRIES 16 @@ -1607,6 +1607,18 @@ nv44_graph_class(struct drm_device *dev) return !(0x0baf & (1 << (dev_priv->chipset & 0x0f))); } +int nv50_vram_init(struct drm_device *); +void nv50_vram_fini(struct drm_device *); +int nv50_vram_new(struct drm_device *, u64 size, u32 align, u32 size_nc, + u32 memtype, struct nouveau_mem **); +void nv50_vram_del(struct drm_device *, struct nouveau_mem **); +bool nv50_vram_flags_valid(struct drm_device *, u32 tile_flags); + +int nvc0_vram_init(struct drm_device *); +int nvc0_vram_new(struct drm_device *, u64 size, u32 align, u32 ncmin, + u32 memtype, struct nouveau_mem **); +bool nvc0_vram_flags_valid(struct drm_device *, u32 tile_flags); + /* memory type/access flags, do not match hardware values */ #define NV_MEM_ACCESS_RO 1 #define NV_MEM_ACCESS_WO 2 diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index 3c180493dab82..a91d6e8598893 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -31,7 +31,7 @@ #include <linux/hrtimer.h> #include "nouveau_drv.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_fence.h" #include "nouveau_software.h" #include "nouveau_dma.h" diff --git a/drivers/gpu/drm/nouveau/nouveau_gpuobj.c b/drivers/gpu/drm/nouveau/nouveau_gpuobj.c index bd79fedb70541..0e5fb0dc83e96 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gpuobj.c +++ b/drivers/gpu/drm/nouveau/nouveau_gpuobj.c @@ -34,10 +34,10 @@ #include "drm.h" #include "nouveau_drv.h" #include "nouveau_drm.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> #include "nouveau_software.h" -#include "nouveau_vm.h" +#include <subdev/vm.h> struct nouveau_gpuobj_method { struct list_head head; diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c index b2c2937531a80..f4b29882dd504 100644 --- a/drivers/gpu/drm/nouveau/nouveau_irq.c +++ b/drivers/gpu/drm/nouveau/nouveau_irq.c @@ -35,7 +35,7 @@ #include "nouveau_drm.h" #include "nouveau_drv.h" #include "nouveau_reg.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_util.h" void diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 5b498ea32e141..0887236a36456 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -37,9 +37,9 @@ #include "nouveau_drv.h" #include "nouveau_pm.h" -#include "nouveau_mm.h" -#include "nouveau_vm.h" -#include "nouveau_fifo.h" +#include <core/mm.h> +#include <subdev/vm.h> +#include <engine/fifo.h> #include "nouveau_fence.h" /* diff --git a/drivers/gpu/drm/nouveau/nouveau_notifier.c b/drivers/gpu/drm/nouveau/nouveau_notifier.c index 69c93b864519f..151ffbb411c3d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_notifier.c +++ b/drivers/gpu/drm/nouveau/nouveau_notifier.c @@ -28,7 +28,7 @@ #include "drmP.h" #include "drm.h" #include "nouveau_drv.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> int nouveau_notifier_init_channel(struct nouveau_channel *chan) diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index da3e7c3abab70..dc34664572c1d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -26,7 +26,7 @@ #include "nouveau_drv.h" #include "nouveau_pm.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> #ifdef CONFIG_ACPI #include <linux/acpi.h> diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index c61014442aa93..0e8f325c709c8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c @@ -35,11 +35,11 @@ #include "nouveau_drv.h" #include "nouveau_drm.h" #include "nouveau_fbcon.h" -#include "nouveau_ramht.h" -#include "nouveau_gpio.h" +#include <core/ramht.h> +#include <subdev/gpio.h> #include "nouveau_pm.h" #include "nv50_display.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> #include "nouveau_fence.h" #include "nouveau_software.h" diff --git a/drivers/gpu/drm/nouveau/nouveau_volt.c b/drivers/gpu/drm/nouveau/nouveau_volt.c index b010cb997b342..9e34b573b8de8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_volt.c +++ b/drivers/gpu/drm/nouveau/nouveau_volt.c @@ -26,7 +26,7 @@ #include "nouveau_drv.h" #include "nouveau_pm.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> static const enum dcb_gpio_tag vidtag[] = { 0x04, 0x05, 0x06, 0x1a, 0x73 }; static int nr_vidtag = sizeof(vidtag) / sizeof(vidtag[0]); diff --git a/drivers/gpu/drm/nouveau/nv04_dac.c b/drivers/gpu/drm/nouveau/nv04_dac.c index 38f19479417c8..da091a1caed6b 100644 --- a/drivers/gpu/drm/nouveau/nv04_dac.c +++ b/drivers/gpu/drm/nouveau/nv04_dac.c @@ -32,7 +32,7 @@ #include "nouveau_connector.h" #include "nouveau_crtc.h" #include "nouveau_hw.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> #include "nvreg.h" int nv04_dac_output_offset(struct drm_encoder *encoder) diff --git a/drivers/gpu/drm/nouveau/nv04_fbcon.c b/drivers/gpu/drm/nouveau/nv04_fbcon.c index 7cd7857347ef5..06fb68acf8130 100644 --- a/drivers/gpu/drm/nouveau/nv04_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv04_fbcon.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_fbcon.h" int diff --git a/drivers/gpu/drm/nouveau/nv04_fence.c b/drivers/gpu/drm/nouveau/nv04_fence.c index abe89db6de24e..78d851f7192b6 100644 --- a/drivers/gpu/drm/nouveau/nv04_fence.c +++ b/drivers/gpu/drm/nouveau/nv04_fence.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_fence.h" struct nv04_fence_chan { diff --git a/drivers/gpu/drm/nouveau/nv04_software.c b/drivers/gpu/drm/nouveau/nv04_software.c index 0c41abf487747..06c316b386ac8 100644 --- a/drivers/gpu/drm/nouveau/nv04_software.c +++ b/drivers/gpu/drm/nouveau/nv04_software.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_fence.h" #include "nouveau_software.h" #include "nouveau_hw.h" diff --git a/drivers/gpu/drm/nouveau/nv10_fence.c b/drivers/gpu/drm/nouveau/nv10_fence.c index 8a1b75009185d..8ff9fbabc3311 100644 --- a/drivers/gpu/drm/nouveau/nv10_fence.c +++ b/drivers/gpu/drm/nouveau/nv10_fence.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_fence.h" struct nv10_fence_chan { diff --git a/drivers/gpu/drm/nouveau/nv17_tv.c b/drivers/gpu/drm/nouveau/nv17_tv.c index 67be5db021f55..65f7c452e4797 100644 --- a/drivers/gpu/drm/nouveau/nv17_tv.c +++ b/drivers/gpu/drm/nouveau/nv17_tv.c @@ -30,7 +30,7 @@ #include "nouveau_encoder.h" #include "nouveau_connector.h" #include "nouveau_crtc.h" -#include "nouveau_gpio.h" +#include <subdev/gpio.h> #include "nouveau_hw.h" #include "nv17_tv.h" diff --git a/drivers/gpu/drm/nouveau/nv40_pm.c b/drivers/gpu/drm/nouveau/nv40_pm.c index e66273aff493d..661d9cfd980d0 100644 --- a/drivers/gpu/drm/nouveau/nv40_pm.c +++ b/drivers/gpu/drm/nouveau/nv40_pm.c @@ -24,10 +24,10 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_bios.h" +#include <nouveau_bios.h> #include "nouveau_pm.h" #include "nouveau_hw.h" -#include "nouveau_fifo.h" +#include <engine/fifo.h> #define min2(a,b) ((a) < (b) ? (a) : (b)) diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index b244d9968c5d1..66abff11d1bd5 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -31,7 +31,7 @@ #include "nouveau_connector.h" #include "nouveau_fb.h" #include "nouveau_fbcon.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_software.h" #include "drm_crtc_helper.h" diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c index ddcd55595824b..5731cb3df67ff 100644 --- a/drivers/gpu/drm/nouveau/nv50_evo.c +++ b/drivers/gpu/drm/nouveau/nv50_evo.c @@ -26,7 +26,7 @@ #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nv50_display.h" static void diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index e3c8b05dcae48..1593e2402fd2a 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c @@ -25,9 +25,9 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_fbcon.h" -#include "nouveau_mm.h" +#include <core/mm.h> int nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c index d020ed4979b43..be5704fd4a868 100644 --- a/drivers/gpu/drm/nouveau/nv50_pm.c +++ b/drivers/gpu/drm/nouveau/nv50_pm.c @@ -24,7 +24,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_bios.h" +#include <nouveau_bios.h> #include "nouveau_hw.h" #include "nouveau_pm.h" #include "nouveau_hwsq.h" diff --git a/drivers/gpu/drm/nouveau/nv50_software.c b/drivers/gpu/drm/nouveau/nv50_software.c index df554d9dacb85..1440a948d0aa3 100644 --- a/drivers/gpu/drm/nouveau/nv50_software.c +++ b/drivers/gpu/drm/nouveau/nv50_software.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_software.h" #include "nv50_display.h" diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c index c2f889b0d3406..199c57c669b54 100644 --- a/drivers/gpu/drm/nouveau/nv84_fence.c +++ b/drivers/gpu/drm/nouveau/nv84_fence.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> #include "nouveau_fence.h" struct nv84_fence_chan { diff --git a/drivers/gpu/drm/nouveau/nva3_pm.c b/drivers/gpu/drm/nouveau/nva3_pm.c index 798829353fb6b..ff0fafbfe6214 100644 --- a/drivers/gpu/drm/nouveau/nva3_pm.c +++ b/drivers/gpu/drm/nouveau/nva3_pm.c @@ -24,7 +24,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_bios.h" +#include <nouveau_bios.h> #include "nouveau_pm.h" static u32 read_clk(struct drm_device *, int, bool); diff --git a/drivers/gpu/drm/nouveau/nvc0_fbcon.c b/drivers/gpu/drm/nouveau/nvc0_fbcon.c index 797159e7b7a65..db26e050c73c5 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fbcon.c +++ b/drivers/gpu/drm/nouveau/nvc0_fbcon.c @@ -25,9 +25,9 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_fbcon.h" -#include "nouveau_mm.h" +#include <core/mm.h> int nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) diff --git a/drivers/gpu/drm/nouveau/nvc0_fence.c b/drivers/gpu/drm/nouveau/nvc0_fence.c index 8e5a2f407ed4d..79bb31ed6c8b3 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fence.c +++ b/drivers/gpu/drm/nouveau/nvc0_fence.c @@ -25,8 +25,8 @@ #include "drmP.h" #include "nouveau_drv.h" #include "nouveau_dma.h" -#include "nouveau_fifo.h" -#include "nouveau_ramht.h" +#include <engine/fifo.h> +#include <core/ramht.h> #include "nouveau_fence.h" struct nvc0_fence_priv { diff --git a/drivers/gpu/drm/nouveau/nvc0_pm.c b/drivers/gpu/drm/nouveau/nvc0_pm.c index 4e712b10ebdb6..81b649864fa10 100644 --- a/drivers/gpu/drm/nouveau/nvc0_pm.c +++ b/drivers/gpu/drm/nouveau/nvc0_pm.c @@ -24,7 +24,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_bios.h" +#include <nouveau_bios.h> #include "nouveau_pm.h" static u32 read_div(struct drm_device *, int, u32, u32); diff --git a/drivers/gpu/drm/nouveau/nvc0_software.c b/drivers/gpu/drm/nouveau/nvc0_software.c index 93e8c164fec60..22527682ec58c 100644 --- a/drivers/gpu/drm/nouveau/nvc0_software.c +++ b/drivers/gpu/drm/nouveau/nvc0_software.c @@ -25,7 +25,7 @@ #include "drmP.h" #include "nouveau_drv.h" -#include "nouveau_ramht.h" +#include <core/ramht.h> #include "nouveau_software.h" #include "nv50_display.h" -- GitLab