]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/nouveau: restructure source tree, split core from drm implementation
authorBen Skeggs <bskeggs@redhat.com>
Wed, 4 Jul 2012 13:44:54 +0000 (23:44 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 3 Oct 2012 03:12:43 +0000 (13:12 +1000)
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>
111 files changed:
drivers/gpu/drm/nouveau/Makefile
drivers/gpu/drm/nouveau/core/core/mm.c [moved from drivers/gpu/drm/nouveau/nouveau_mm.c with 99% similarity]
drivers/gpu/drm/nouveau/core/core/ramht.c [moved from drivers/gpu/drm/nouveau/nouveau_ramht.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/bsp/nv84.c [moved from drivers/gpu/drm/nouveau/nv84_bsp.c with 97% similarity]
drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc [moved from drivers/gpu/drm/nouveau/nva3_copy.fuc with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc.h [moved from drivers/gpu/drm/nouveau/nva3_copy.fuc.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/copy/fuc/nvc0.fuc.h [moved from drivers/gpu/drm/nouveau/nvc0_copy.fuc.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/copy/nva3.c [moved from drivers/gpu/drm/nouveau/nva3_copy.c with 98% similarity]
drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c [moved from drivers/gpu/drm/nouveau/nvc0_copy.c with 98% similarity]
drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc [moved from drivers/gpu/drm/nouveau/nv98_crypt.fuc with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc.h [moved from drivers/gpu/drm/nouveau/nv98_crypt.fuc.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c [moved from drivers/gpu/drm/nouveau/nv84_crypt.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c [moved from drivers/gpu/drm/nouveau/nv98_crypt.c with 98% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c [moved from drivers/gpu/drm/nouveau/nv04_fifo.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c [moved from drivers/gpu/drm/nouveau/nv10_fifo.c with 98% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c [moved from drivers/gpu/drm/nouveau/nv17_fifo.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c [moved from drivers/gpu/drm/nouveau/nv40_fifo.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_fifo.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c [moved from drivers/gpu/drm/nouveau/nv84_fifo.c with 98% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c [moved from drivers/gpu/drm/nouveau/nvc0_fifo.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c [moved from drivers/gpu/drm/nouveau/nve0_fifo.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/ctx.h [moved from drivers/gpu/drm/nouveau/nouveau_grctx.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/ctxnv40.c [moved from drivers/gpu/drm/nouveau/nv40_grctx.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/ctxnv50.c [moved from drivers/gpu/drm/nouveau/nv50_grctx.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c [moved from drivers/gpu/drm/nouveau/nvc0_grctx.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/ctxnve0.c [moved from drivers/gpu/drm/nouveau/nve0_grctx.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc [moved from drivers/gpu/drm/nouveau/nvc0_grgpc.fuc with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h [moved from drivers/gpu/drm/nouveau/nvc0_grgpc.fuc.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc [moved from drivers/gpu/drm/nouveau/nvc0_grhub.fuc with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h [moved from drivers/gpu/drm/nouveau/nvc0_grhub.fuc.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/fuc/nvc0.fuc [moved from drivers/gpu/drm/nouveau/nvc0_graph.fuc with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nv04.c [moved from drivers/gpu/drm/nouveau/nv04_graph.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nv10.c [moved from drivers/gpu/drm/nouveau/nv10_graph.c with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nv20.c [moved from drivers/gpu/drm/nouveau/nv20_graph.c with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nv40.c [moved from drivers/gpu/drm/nouveau/nv40_graph.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_graph.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c [moved from drivers/gpu/drm/nouveau/nvc0_graph.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h [moved from drivers/gpu/drm/nouveau/nvc0_graph.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nve0.c [moved from drivers/gpu/drm/nouveau/nve0_graph.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/graph/nve0.h [moved from drivers/gpu/drm/nouveau/nve0_graph.h with 100% similarity]
drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c [moved from drivers/gpu/drm/nouveau/nv31_mpeg.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/mpeg/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_mpeg.c with 99% similarity]
drivers/gpu/drm/nouveau/core/engine/ppp/nv98.c [moved from drivers/gpu/drm/nouveau/nv98_ppp.c with 97% similarity]
drivers/gpu/drm/nouveau/core/engine/vp/nv84.c [moved from drivers/gpu/drm/nouveau/nv84_vp.c with 97% similarity]
drivers/gpu/drm/nouveau/core/include/core/mm.h [moved from drivers/gpu/drm/nouveau/nouveau_mm.h with 76% similarity]
drivers/gpu/drm/nouveau/core/include/core/ramht.h [moved from drivers/gpu/drm/nouveau/nouveau_ramht.h with 100% similarity]
drivers/gpu/drm/nouveau/core/include/engine/fifo.h [moved from drivers/gpu/drm/nouveau/nouveau_fifo.h with 100% similarity]
drivers/gpu/drm/nouveau/core/include/subdev/gpio.h [moved from drivers/gpu/drm/nouveau/nouveau_gpio.h with 100% similarity]
drivers/gpu/drm/nouveau/core/include/subdev/i2c.h [moved from drivers/gpu/drm/nouveau/nouveau_i2c.h with 100% similarity]
drivers/gpu/drm/nouveau/core/include/subdev/vm.h [moved from drivers/gpu/drm/nouveau/nouveau_vm.h with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nv04.c [moved from drivers/gpu/drm/nouveau/nv04_fb.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c [moved from drivers/gpu/drm/nouveau/nv10_fb.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c [moved from drivers/gpu/drm/nouveau/nv20_fb.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nv30.c [moved from drivers/gpu/drm/nouveau/nv30_fb.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nv40.c [moved from drivers/gpu/drm/nouveau/nv40_fb.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_fb.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nv50_vram.c [moved from drivers/gpu/drm/nouveau/nv50_vram.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0.c [moved from drivers/gpu/drm/nouveau/nvc0_fb.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/fb/nvc0_vram.c [moved from drivers/gpu/drm/nouveau/nvc0_vram.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/gpio/base.c [moved from drivers/gpu/drm/nouveau/nouveau_gpio.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/gpio/nv10.c [moved from drivers/gpu/drm/nouveau/nv10_gpio.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_gpio.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/i2c/base.c [moved from drivers/gpu/drm/nouveau/nouveau_i2c.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c [moved from drivers/gpu/drm/nouveau/nv04_instmem.c with 98% similarity]
drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_instmem.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/instmem/nvc0.c [moved from drivers/gpu/drm/nouveau/nvc0_instmem.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/mc/nv04.c [moved from drivers/gpu/drm/nouveau/nv04_mc.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/mc/nv40.c [moved from drivers/gpu/drm/nouveau/nv40_mc.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/mc/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_mc.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/timer/nv04.c [moved from drivers/gpu/drm/nouveau/nv04_timer.c with 100% similarity]
drivers/gpu/drm/nouveau/core/subdev/vm/base.c [moved from drivers/gpu/drm/nouveau/nouveau_vm.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/vm/nv50.c [moved from drivers/gpu/drm/nouveau/nv50_vm.c with 99% similarity]
drivers/gpu/drm/nouveau/core/subdev/vm/nvc0.c [moved from drivers/gpu/drm/nouveau/nvc0_vm.c with 99% similarity]
drivers/gpu/drm/nouveau/nouveau_abi16.c
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_channel.c
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.h
drivers/gpu/drm/nouveau/nouveau_display.c
drivers/gpu/drm/nouveau/nouveau_dma.c
drivers/gpu/drm/nouveau/nouveau_dp.c
drivers/gpu/drm/nouveau/nouveau_drv.c
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_fence.c
drivers/gpu/drm/nouveau/nouveau_gpuobj.c
drivers/gpu/drm/nouveau/nouveau_irq.c
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nouveau_notifier.c
drivers/gpu/drm/nouveau/nouveau_pm.c
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_volt.c
drivers/gpu/drm/nouveau/nv04_dac.c
drivers/gpu/drm/nouveau/nv04_fbcon.c
drivers/gpu/drm/nouveau/nv04_fence.c
drivers/gpu/drm/nouveau/nv04_software.c
drivers/gpu/drm/nouveau/nv10_fence.c
drivers/gpu/drm/nouveau/nv17_tv.c
drivers/gpu/drm/nouveau/nv40_pm.c
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_evo.c
drivers/gpu/drm/nouveau/nv50_fbcon.c
drivers/gpu/drm/nouveau/nv50_pm.c
drivers/gpu/drm/nouveau/nv50_software.c
drivers/gpu/drm/nouveau/nv84_fence.c
drivers/gpu/drm/nouveau/nva3_pm.c
drivers/gpu/drm/nouveau/nvc0_fbcon.c
drivers/gpu/drm/nouveau/nvc0_fence.c
drivers/gpu/drm/nouveau/nvc0_pm.c
drivers/gpu/drm/nouveau/nvc0_software.c

index 1cece6a78f397d02b092590656c2b38bde29a8f0..40c311e24bcd65e1a93fa965a4e5c7b02053a592 100644 (file)
@@ -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
similarity index 99%
rename from drivers/gpu/drm/nouveau/nouveau_mm.c
rename to drivers/gpu/drm/nouveau/core/core/mm.c
index b29ffb3d1408c6686f09c499c13e0d1a8f7fe05a..024dd2c722bbf6474fe1f5da4a6aa3a8427709db 100644 (file)
@@ -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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nouveau_ramht.c
rename to drivers/gpu/drm/nouveau/core/core/ramht.c
index a24a81f5a89e40719067806281ff63b3da02fba2..59c16192f0e4d6dce30eac69e45d2c623f57c2dd 100644 (file)
@@ -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)
similarity index 97%
rename from drivers/gpu/drm/nouveau/nv84_bsp.c
rename to drivers/gpu/drm/nouveau/core/engine/bsp/nv84.c
index 74875739bcc0e8e50e58f9932e1471e12f09026f..db3b57369830bf231265e58fcf4b2817bf0737ee 100644 (file)
@@ -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
similarity index 98%
rename from drivers/gpu/drm/nouveau/nva3_copy.c
rename to drivers/gpu/drm/nouveau/core/engine/copy/nva3.c
index 0387dc7f4f4219e23c42606841c6ffd198f37f78..fec52463456a582d041e012714bdd32717131d65 100644 (file)
@@ -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;
similarity index 98%
rename from drivers/gpu/drm/nouveau/nvc0_copy.c
rename to drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c
index dddf006f6d88721451abe4d9634892bd139e8662..90a069b46a9da777a259f87552cbbf9fbdbda0ac 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv84_crypt.c
rename to drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
index bbfcc73b67080b4879acd3e7a0ebc5f451c42481..388138946ad9ced918a3ba53329326388c475d19 100644 (file)
@@ -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;
similarity index 98%
rename from drivers/gpu/drm/nouveau/nv98_crypt.c
rename to drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c
index e25e13fb894e60279796cbd1ae0497bd8cdc1a4c..563f60d1ce6ee4afb0ccb06d5b516d1e7671f215 100644 (file)
 
 #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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv04_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv04.c
index a6295cd00ec7b3759d967b978b8c1f66831e19d2..bc3808737ace0caab2d04aa1a36d4e9396810e73 100644 (file)
@@ -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 {
similarity index 98%
rename from drivers/gpu/drm/nouveau/nv10_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv10.c
index f1fe7d7582416282e54ef072cd605f4b26ef3213..9058c31c3bf3ddf160d0d9ae5f733253e62714a0 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv17_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv17.c
index d9e482e4abeea2459932770c5b95f47d03f62072..c514364cc321a0efdac6fada5f423edac5dc1d04 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv40_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv40.c
index cdc818479b0afb09494c9858aae1deac9ef4722a..3079f080d40ec71d505630714d170eebabd8230b 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c
index 55383b85db0b7ea4a0ab22a35421f09d6eb11765..2309871704e7737e255a18eb83b395bdebd7d0be 100644 (file)
@@ -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;
similarity index 98%
rename from drivers/gpu/drm/nouveau/nv84_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
index c564c5e4c30aa97841f5cf1060d3bbcf8686ebbf..f505d1ed8866dbb33201d121c42be381ad18d634 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nvc0_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
index cd39eb99f5b15b4aef3f9fa4d47967b7bf3f55f6..398f32df7e6e539a5c1c9c6b7d9d4b8d5d247441 100644 (file)
@@ -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 *);
 
similarity index 99%
rename from drivers/gpu/drm/nouveau/nve0_fifo.c
rename to drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
index 281bece751b61eb091d2b6da73144dc9d2ddb5c5..829959fac149bf031ed10dabbccfad1e24ace3f2 100644 (file)
@@ -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
 
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv40_grctx.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnv40.c
index be0a74750fb1df9cd7bd4a5b1f8b06cb165140cd..b17506d7eb6076c13e53f5973e42ca1aa9c492dd 100644 (file)
 
 #include "drmP.h"
 #include "nouveau_drv.h"
-#include "nouveau_grctx.h"
+#include "ctx.h"
 
 /* TODO:
  *  - get vs count from 0x1540
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_grctx.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnv50.c
index 881e22b249fc5e0e34750614fb241c0a77b600db..e17c17bfd89e7c2730a2013cdb9989741b0d8904 100644 (file)
 
 #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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nvc0_grctx.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.c
index de77842b31c09df7313b6c38f6d4c54f91ffa997..5083fda3a878a0071bc93f3f0cd3fee1e784465e 100644 (file)
@@ -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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nve0_grctx.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/ctxnve0.c
index d8cb360e92c175cdd782914b4a38be23384d1010..bd40bd9effb89f06ec93ff618efbb077a7e73457 100644 (file)
@@ -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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv04_graph.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/nv04.c
index 72f1a62903b395cd358a68e938af9785a33b9c44..353d4d330cabb6f71075e55ffc6cef634db3611b 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv40_graph.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
index aa9e2df64a26d5b28ee62825453ebdcbd8128cc0..4ad9759f821e3a18d70e762d7f909878b7737ef6 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_graph.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
index 437608d1dfe7b884920bb5e9268154744100a5b5..c22e3a0bca76ce04c211da04801bc02a4776a0b7 100644 (file)
 #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 {
similarity index 99%
rename from drivers/gpu/drm/nouveau/nvc0_graph.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
index 2a01e6e47724fd60af2542db4a1f4a7deebcbc55..8f515dcb63c0d86cabee27c525e2d931857fa7c9 100644 (file)
 #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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nve0_graph.c
rename to drivers/gpu/drm/nouveau/core/engine/graph/nve0.c
index 8a8051b68f106a10a4bc8c884297227964fb6308..a8364b1236a0615634374e03a1677178173aa9d6 100644 (file)
 #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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv31_mpeg.c
rename to drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
index 5f239bf658c48ef58a8663b8fdbda66ebb779c3d..4a14a6763dac161951c35fe87e85e307f641975a 100644 (file)
@@ -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;
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_mpeg.c
rename to drivers/gpu/drm/nouveau/core/engine/mpeg/nv50.c
index 90e8ed22cfcbac83a77a88a2525b382a88ef6b0d..47d37a2f478fc2010ebffa47754073a3c2880459 100644 (file)
@@ -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;
similarity index 97%
rename from drivers/gpu/drm/nouveau/nv98_ppp.c
rename to drivers/gpu/drm/nouveau/core/engine/ppp/nv98.c
index a987dd6e003626de749c3b772d17089d658a7782..20d33dcd7f40ccff85449cf434b33633a1ce4384 100644 (file)
@@ -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;
similarity index 97%
rename from drivers/gpu/drm/nouveau/nv84_vp.c
rename to drivers/gpu/drm/nouveau/core/engine/vp/nv84.c
index 6570d300ab854c2ce845384814ffb5c93f8b6296..eb7e1960dd812d3f91e45a0ac09a6dc8d44d93f5 100644 (file)
@@ -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
similarity index 76%
rename from drivers/gpu/drm/nouveau/nouveau_mm.h
rename to drivers/gpu/drm/nouveau/core/include/core/mm.h
index 57a600c35c95a49bd878741a34ce5c9453abbb6e..d2b4290f5abecb128e3a6270974b3f59fb961c5a 100644 (file)
@@ -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
similarity index 99%
rename from drivers/gpu/drm/nouveau/nouveau_vm.h
rename to drivers/gpu/drm/nouveau/core/include/subdev/vm.h
index a8246e7e4a89ea7152955f0121a6aff4287aa8b7..7c1fc2114fecaa4db435cbc5f0c036d61984976a 100644 (file)
@@ -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];
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_fb.c
rename to drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c
index f1e4b9e07d1485f6b0250f52042e68aaedd94113..3488358401a81589592487eff72b3f7cce9bdeea 100644 (file)
@@ -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;
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 9ed9ae397d75c774609dc6562896c9df8fb16867..029274baf9a378e3e005e05c5091eb5fb8d2555d 100644 (file)
@@ -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,
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 a7eef8934c07439af0881d8b255b6f3de9173f4c..8bb86e5035361bf8a093d16e0a060231b1bd39e5 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "drmP.h"
 #include "nouveau_drv.h"
-#include "nouveau_mm.h"
+#include <core/mm.h>
 
 /* 0 = unsupported
  * 1 = non-compressed
similarity index 99%
rename from drivers/gpu/drm/nouveau/nouveau_gpio.c
rename to drivers/gpu/drm/nouveau/core/subdev/gpio/base.c
index 82c19e82ff02e6914fd1b8923b87dd3fe44fe60e..2c48309b0e19cd95b8088f1d096768982cdb261c 100644 (file)
@@ -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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv10_gpio.c
rename to drivers/gpu/drm/nouveau/core/subdev/gpio/nv10.c
index 9d79180069df2cdb93b6e8b7ea45cb0508fed38c..42e600f68f2e873acb4871e6721e361d58e59fc1 100644 (file)
@@ -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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_gpio.c
rename to drivers/gpu/drm/nouveau/core/subdev/gpio/nv50.c
index c399d510b27a8611aa4524b3cffa582f9f033da7..48509b0a1c86b923257db068191e46047e9438b9 100644 (file)
@@ -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"
 
similarity index 99%
rename from drivers/gpu/drm/nouveau/nouveau_i2c.c
rename to drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
index 240cf962c999ee322e4f77fe2e612ffc731e6eb7..71e93615834706be7df2f370b33ae1db9486f454 100644 (file)
@@ -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
similarity index 98%
rename from drivers/gpu/drm/nouveau/nv04_instmem.c
rename to drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
index ef7a934a499aea06e920f4ffcd9292ae09a3334b..f01063c078e6ec71a10b797c000f2b8c2d840667 100644 (file)
@@ -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
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_instmem.c
rename to drivers/gpu/drm/nouveau/core/subdev/instmem/nv50.c
index 0bba54f118002231e101281ed59dcd8d75880eb2..d9b346333a443f1651bc7e37d42ce8af6cd476fe 100644 (file)
@@ -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);
 }
-
similarity index 99%
rename from drivers/gpu/drm/nouveau/nvc0_instmem.c
rename to drivers/gpu/drm/nouveau/core/subdev/instmem/nvc0.c
index b701c439c92e86e6788202c9e462e0ad5051e895..0ce986910cbf453c5a9f2e1b7421a45132617dcd 100644 (file)
@@ -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);
 }
-
similarity index 99%
rename from drivers/gpu/drm/nouveau/nouveau_vm.c
rename to drivers/gpu/drm/nouveau/core/subdev/vm/base.c
index 11edd5e91a0a77be98651803f959358ae04c7961..3d11a4aa39ef3de09220fa1e674253da386e870e 100644 (file)
@@ -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)
similarity index 99%
rename from drivers/gpu/drm/nouveau/nv50_vm.c
rename to drivers/gpu/drm/nouveau/core/subdev/vm/nv50.c
index 179bb42a635c2fb76480f14c6fef660a12296f59..eeac72f402014b6e1c54899e672deb11b195e1fe 100644 (file)
@@ -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,
similarity index 99%
rename from drivers/gpu/drm/nouveau/nvc0_vm.c
rename to drivers/gpu/drm/nouveau/core/subdev/vm/nvc0.c
index 30d2bd58828f9c57cdfc6b3017c35362e472ea26..734877a9aa0916a2b99220c491a76f802541719f 100644 (file)
@@ -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,
index 3ca240b4413d48eb9ddf0bdf479db97345397965..1b9db808a8559729b9af7cdeb9b4ad311f142a7a 100644 (file)
@@ -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
index a0a3fe3c016be86665db1369c44bef832f829a1a..52c3992454aeb44169010dd785b6fbb2d2bcd3f0 100644 (file)
@@ -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>
index 298a3af48d14d68fc7b54bb7be7431dfbab4d9d5..b42aa31144a1de45d953822407f10483ed697b9d 100644 (file)
@@ -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
index 7f80ed523562c11a3a788657cc0291d87390ade0..f9e6fbb0094f4fdfbcc960ac9b9b1a306644b165 100644 (file)
 #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>
index debd90225a88d9d633c6d4a5cd59a526877c1b14..182fbd398f91f916bbf94219ad51c91e1b62d0e2 100644 (file)
@@ -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"
 
index 7b11edb077d0c5790dc6e4b35c90b1686d315f9f..d6eabd98506a76451f54cbdcc433d1447608e39e 100644 (file)
@@ -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);
index e4857021304c46f5ff4bf3d6e2fa9b6d8f3baf21..bb0faf9f5d1eb4b9168402dbe0f035df6373662a 100644 (file)
@@ -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,
index 7e16dc5e64672929e80a2aecf4b6e6e2446641b8..d6051e01967d9ccfe19c4c94013bb7ae2f5f6a0f 100644 (file)
@@ -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"
 
index 295932e66ac5b0a6a9918148fdcd3f69fe0db54e..efd0823234057747cdf941bcd7968717febe309f 100644 (file)
@@ -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)
index 7e289d2ad8e40f75d13b504fadbbc25c99cdeac2..67b322554ac6471764661e572842c13c5dc1f2be 100644 (file)
 #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
index 9a36f5f39b06447d5fce8ff6a17163eda7a41331..74c226587d52bf6ea7a02ff98bbea1454618f95b 100644 (file)
@@ -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"
index 4f2cc95ce26498e9df3fa389908ccd6e542b2a1d..a781d440010504d7eaf0245340bbca09ec497379 100644 (file)
@@ -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
index 3c180493dab828c286b39531905f9697330f3c8b..a91d6e8598893a6d3497a4943f027c1137d41356 100644 (file)
@@ -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"
index bd79fedb70541245ac97fc8587b6b66e006f6a83..0e5fb0dc83e96eb7ef7e4557609244db870b955e 100644 (file)
 #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;
index b2c2937531a80e04854f287ca904369d346e148b..f4b29882dd504d7a8f753d1f931d41c6c75d9588 100644 (file)
@@ -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
index 5b498ea32e1413091bb1fb4e851937c5fbdbc72f..0887236a3645629de756f5b70d98f838f01d718c 100644 (file)
@@ -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"
 
 /*
index 69c93b864519fb2388e965fa7b7acad83856de46..151ffbb411c3dbfc234b3144d34a7961ecd5e08c 100644 (file)
@@ -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)
index da3e7c3abab7090a3770413c02bd0cbbaa6134a3..dc34664572c1dafb680394fa09bd6efb8150b977 100644 (file)
@@ -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>
index c61014442aa931cfe5822069c7ecf6c0d565f4dc..0e8f325c709c8df2ced1e61d6eb0b78f90df6013 100644 (file)
 #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"
 
index b010cb997b342aab62ac5ddb7f8d48573a6b4011..9e34b573b8de83df4deb98defd03af76cbcf3b62 100644 (file)
@@ -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]);
index 38f19479417c8948c3c684814fdacb9c645b1c8f..da091a1caed6b0cfe200652d6c98dbb0e2cd7936 100644 (file)
@@ -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)
index 7cd7857347ef5225c64dd4c6216252b9e0bb4350..06fb68acf8130c794bbf4e729284f05793cd58b9 100644 (file)
@@ -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
index abe89db6de24e4e9736b92a92cae899884945133..78d851f7192b6b22b60e4cc3cb2870f73f9fa7f1 100644 (file)
@@ -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 {
index 0c41abf4877470911d6b0efe696bc4eac00fa65c..06c316b386ac8402232ca23e389d21f2793beeb9 100644 (file)
@@ -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"
index 8a1b75009185dcc735af23265b8065e163ba19c1..8ff9fbabc33113b9e41d221faac81be63c3dee38 100644 (file)
@@ -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 {
index 67be5db021f5579c1e31cefe9feb802920e19c51..65f7c452e47970bad3b165945b78b222f95f54a9 100644 (file)
@@ -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"
 
index e66273aff493d799b20f68eedf93ff9e1aa78d23..661d9cfd980d031e78ad862b4fe2f99bfff5e355 100644 (file)
 
 #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))
 
index b244d9968c5d1437c3d6b558e8172663cba6e219..66abff11d1bd5c3300075d8432f3d59e017a22a5 100644 (file)
@@ -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"
 
index ddcd55595824b818a369ee45329289a2af2dc03e..5731cb3df67ff1d0e70344370ec1fbcbed934e10 100644 (file)
@@ -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
index e3c8b05dcae482e3148dc5643a82cc8d78d4888a..1593e2402fd2abf9936f89ce3d39c40e720101a4 100644 (file)
@@ -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)
index d020ed4979b43853cc9bdb9db81f0a5bf17c64fd..be5704fd4a868f097eb0c82d33563915ed079744 100644 (file)
@@ -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"
index df554d9dacb85f8f816d0ca386570421965e389b..1440a948d0aa38d4127fa78f01d51fa07ed0c6eb 100644 (file)
@@ -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"
index c2f889b0d3406d73a17fe6dbf9c35f636a7b1454..199c57c669b546f023cd0cdccf65541bf42cd548 100644 (file)
@@ -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 {
index 798829353fb6b14e2d17decc1c88054cb4fb10f7..ff0fafbfe6214976475e782a80464bd37fa974e6 100644 (file)
@@ -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);
index 797159e7b7a65260f111127f74d76bf2fd2242a3..db26e050c73c589a2c4d231069f1d0fa4cad2c37 100644 (file)
@@ -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)
index 8e5a2f407ed4d165527e96929c2a3e806baab52c..79bb31ed6c8b338e46417d87f7b5143676ca0f13 100644 (file)
@@ -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 {
index 4e712b10ebdb682c7956c74a5f3e694ff57e61dd..81b649864fa103dca2de884c24272df2d83ac29e 100644 (file)
@@ -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);
index 93e8c164fec6012ad6dfacb026f8162277979576..22527682ec58c16ab2aab9ca467d8cc97168fa36 100644 (file)
@@ -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"