diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-01-13 21:02:28 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-21 21:17:45 -0500 |
commit | b8bf04e1fd3aba5cdd81ec766fc0372c7894497c (patch) | |
tree | 7588cd484512fbebc118763dea9af8ea320c35d2 | |
parent | aedf24ff354e3d8f32f0264edcb37f07a1826f59 (diff) |
drm/nouveau/gr: rename from graph (no binary change)
Shorter device name, match Tegra and our existing enums.
The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver. This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).
Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.
A comparison of objdump disassemblies proves no code changes.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvif/class.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvif/device.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 86 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/engine/graph.h | 86 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c | 34 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c | 30 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c | 20 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 36 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctx.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctx.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgk110b.c) | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgk20a.c) | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgm107.c) | 76 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv108.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv108.c) | 50 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv40.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv40.c) | 38 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv50.c) | 238 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc0.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc0.c) | 116 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc0.h | 202 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc1.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc1.c) | 48 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc4.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc4.c) | 20 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc8.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc8.c) | 26 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvd7.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvd7.c) | 56 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvd9.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvd9.c) | 48 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnve4.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnve4.c) | 80 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvf0.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvf0.c) | 52 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/com.fuc (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/com.fuc) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpc.fuc) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnv108.fuc5 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnv108.fuc5.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvc0.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvc0.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvd7.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvd7.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnve0.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnve0.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvf0.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvf0.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hub.fuc (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hub.fuc) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnv108.fuc5 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnv108.fuc5.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvc0.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvc0.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvd7.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvd7.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnve0.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnve0.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvf0.fuc3 (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvf0.fuc3.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/macros.fuc (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/macros.fuc) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/os.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/os.h) | 0 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/gk110b.c) | 88 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/gk20a.c) | 20 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/gm107.c) | 190 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv04.c) | 594 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv10.c) | 362 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv108.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv108.c) | 120 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv20.c) | 122 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h | 31 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv25.c) | 78 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv2a.c) | 46 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv30.c) | 88 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv34.c) | 82 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv35.c) | 80 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv40.c) | 168 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv40.h) | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv50.c) | 206 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nv50.h) | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc0.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc0.c) | 412 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc0.h | 270 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc1.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc1.c) | 98 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc4.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc4.c) | 90 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc8.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc8.c) | 90 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvd7.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nvd7.c) | 100 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvd9.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nvd9.c) | 118 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nve4.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nve4.c) | 148 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/nvf0.c (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/nvf0.c) | 132 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/regs.h (renamed from drivers/gpu/drm/nouveau/nvkm/engine/graph/regs.h) | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/graph/Kbuild | 36 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc0.h | 202 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/graph/nv20.h | 31 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc0.h | 270 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | 6 |
94 files changed, 2874 insertions, 2874 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvif/class.h b/drivers/gpu/drm/nouveau/include/nvif/class.h index 0fe20917e05d..c88bb7c1010e 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/class.h +++ b/drivers/gpu/drm/nouveau/include/nvif/class.h | |||
@@ -122,7 +122,7 @@ struct nv_device_v0 { | |||
122 | #define NV_DEVICE_V0_DISABLE_CORE 0x0000000000000008ULL | 122 | #define NV_DEVICE_V0_DISABLE_CORE 0x0000000000000008ULL |
123 | #define NV_DEVICE_V0_DISABLE_DISP 0x0000000000010000ULL | 123 | #define NV_DEVICE_V0_DISABLE_DISP 0x0000000000010000ULL |
124 | #define NV_DEVICE_V0_DISABLE_FIFO 0x0000000000020000ULL | 124 | #define NV_DEVICE_V0_DISABLE_FIFO 0x0000000000020000ULL |
125 | #define NV_DEVICE_V0_DISABLE_GRAPH 0x0000000100000000ULL | 125 | #define NV_DEVICE_V0_DISABLE_GR 0x0000000100000000ULL |
126 | #define NV_DEVICE_V0_DISABLE_MPEG 0x0000000200000000ULL | 126 | #define NV_DEVICE_V0_DISABLE_MPEG 0x0000000200000000ULL |
127 | #define NV_DEVICE_V0_DISABLE_ME 0x0000000400000000ULL | 127 | #define NV_DEVICE_V0_DISABLE_ME 0x0000000400000000ULL |
128 | #define NV_DEVICE_V0_DISABLE_VP 0x0000000800000000ULL | 128 | #define NV_DEVICE_V0_DISABLE_VP 0x0000000800000000ULL |
diff --git a/drivers/gpu/drm/nouveau/include/nvif/device.h b/drivers/gpu/drm/nouveau/include/nvif/device.h index 93acd5153bee..7f1770beff21 100644 --- a/drivers/gpu/drm/nouveau/include/nvif/device.h +++ b/drivers/gpu/drm/nouveau/include/nvif/device.h | |||
@@ -52,11 +52,11 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **); | |||
52 | 52 | ||
53 | #include <engine/device.h> | 53 | #include <engine/device.h> |
54 | #include <engine/fifo.h> | 54 | #include <engine/fifo.h> |
55 | #include <engine/graph.h> | 55 | #include <engine/gr.h> |
56 | #include <engine/software.h> | 56 | #include <engine/software.h> |
57 | 57 | ||
58 | #define nvkm_fifo(a) nouveau_fifo(nvkm_device(a)) | 58 | #define nvkm_fifo(a) nouveau_fifo(nvkm_device(a)) |
59 | #define nvkm_fifo_chan(a) ((struct nouveau_fifo_chan *)nvkm_object(a)) | 59 | #define nvkm_fifo_chan(a) ((struct nouveau_fifo_chan *)nvkm_object(a)) |
60 | #define nvkm_gr(a) ((struct nouveau_graph *)nouveau_engine(nvkm_object(a), NVDEV_ENGINE_GR)) | 60 | #define nvkm_gr(a) ((struct nouveau_gr *)nouveau_engine(nvkm_object(a), NVDEV_ENGINE_GR)) |
61 | 61 | ||
62 | #endif | 62 | #endif |
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h new file mode 100644 index 000000000000..9985adca0fda --- /dev/null +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | |||
@@ -0,0 +1,86 @@ | |||
1 | #ifndef __NOUVEAU_GR_H__ | ||
2 | #define __NOUVEAU_GR_H__ | ||
3 | |||
4 | #include <core/engine.h> | ||
5 | #include <core/engctx.h> | ||
6 | #include <core/enum.h> | ||
7 | |||
8 | struct nouveau_gr_chan { | ||
9 | struct nouveau_engctx base; | ||
10 | }; | ||
11 | |||
12 | #define nouveau_gr_context_create(p,e,c,g,s,a,f,d) \ | ||
13 | nouveau_engctx_create((p), (e), (c), (g), (s), (a), (f), (d)) | ||
14 | #define nouveau_gr_context_destroy(d) \ | ||
15 | nouveau_engctx_destroy(&(d)->base) | ||
16 | #define nouveau_gr_context_init(d) \ | ||
17 | nouveau_engctx_init(&(d)->base) | ||
18 | #define nouveau_gr_context_fini(d,s) \ | ||
19 | nouveau_engctx_fini(&(d)->base, (s)) | ||
20 | |||
21 | #define _nouveau_gr_context_dtor _nouveau_engctx_dtor | ||
22 | #define _nouveau_gr_context_init _nouveau_engctx_init | ||
23 | #define _nouveau_gr_context_fini _nouveau_engctx_fini | ||
24 | #define _nouveau_gr_context_rd32 _nouveau_engctx_rd32 | ||
25 | #define _nouveau_gr_context_wr32 _nouveau_engctx_wr32 | ||
26 | |||
27 | struct nouveau_gr { | ||
28 | struct nouveau_engine base; | ||
29 | |||
30 | /* Returns chipset-specific counts of units packed into an u64. | ||
31 | */ | ||
32 | u64 (*units)(struct nouveau_gr *); | ||
33 | }; | ||
34 | |||
35 | static inline struct nouveau_gr * | ||
36 | nouveau_gr(void *obj) | ||
37 | { | ||
38 | return (void *)nouveau_engine(obj, NVDEV_ENGINE_GR); | ||
39 | } | ||
40 | |||
41 | #define nouveau_gr_create(p,e,c,y,d) \ | ||
42 | nouveau_engine_create((p), (e), (c), (y), "PGR", "graphics", (d)) | ||
43 | #define nouveau_gr_destroy(d) \ | ||
44 | nouveau_engine_destroy(&(d)->base) | ||
45 | #define nouveau_gr_init(d) \ | ||
46 | nouveau_engine_init(&(d)->base) | ||
47 | #define nouveau_gr_fini(d,s) \ | ||
48 | nouveau_engine_fini(&(d)->base, (s)) | ||
49 | |||
50 | #define _nouveau_gr_dtor _nouveau_engine_dtor | ||
51 | #define _nouveau_gr_init _nouveau_engine_init | ||
52 | #define _nouveau_gr_fini _nouveau_engine_fini | ||
53 | |||
54 | extern struct nouveau_oclass nv04_gr_oclass; | ||
55 | extern struct nouveau_oclass nv10_gr_oclass; | ||
56 | extern struct nouveau_oclass nv20_gr_oclass; | ||
57 | extern struct nouveau_oclass nv25_gr_oclass; | ||
58 | extern struct nouveau_oclass nv2a_gr_oclass; | ||
59 | extern struct nouveau_oclass nv30_gr_oclass; | ||
60 | extern struct nouveau_oclass nv34_gr_oclass; | ||
61 | extern struct nouveau_oclass nv35_gr_oclass; | ||
62 | extern struct nouveau_oclass nv40_gr_oclass; | ||
63 | extern struct nouveau_oclass nv50_gr_oclass; | ||
64 | extern struct nouveau_oclass *nvc0_gr_oclass; | ||
65 | extern struct nouveau_oclass *nvc1_gr_oclass; | ||
66 | extern struct nouveau_oclass *nvc4_gr_oclass; | ||
67 | extern struct nouveau_oclass *nvc8_gr_oclass; | ||
68 | extern struct nouveau_oclass *nvd7_gr_oclass; | ||
69 | extern struct nouveau_oclass *nvd9_gr_oclass; | ||
70 | extern struct nouveau_oclass *nve4_gr_oclass; | ||
71 | extern struct nouveau_oclass *gk20a_gr_oclass; | ||
72 | extern struct nouveau_oclass *nvf0_gr_oclass; | ||
73 | extern struct nouveau_oclass *gk110b_gr_oclass; | ||
74 | extern struct nouveau_oclass *nv108_gr_oclass; | ||
75 | extern struct nouveau_oclass *gm107_gr_oclass; | ||
76 | |||
77 | extern const struct nouveau_bitfield nv04_gr_nsource[]; | ||
78 | extern struct nouveau_ofuncs nv04_gr_ofuncs; | ||
79 | bool nv04_gr_idle(void *obj); | ||
80 | |||
81 | extern const struct nouveau_bitfield nv10_gr_intr_name[]; | ||
82 | extern const struct nouveau_bitfield nv10_gr_nstatus[]; | ||
83 | |||
84 | extern const struct nouveau_enum nv50_data_error_names[]; | ||
85 | |||
86 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/graph.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/graph.h deleted file mode 100644 index d61dcb7d6d5f..000000000000 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/graph.h +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | #ifndef __NOUVEAU_GRAPH_H__ | ||
2 | #define __NOUVEAU_GRAPH_H__ | ||
3 | |||
4 | #include <core/engine.h> | ||
5 | #include <core/engctx.h> | ||
6 | #include <core/enum.h> | ||
7 | |||
8 | struct nouveau_graph_chan { | ||
9 | struct nouveau_engctx base; | ||
10 | }; | ||
11 | |||
12 | #define nouveau_graph_context_create(p,e,c,g,s,a,f,d) \ | ||
13 | nouveau_engctx_create((p), (e), (c), (g), (s), (a), (f), (d)) | ||
14 | #define nouveau_graph_context_destroy(d) \ | ||
15 | nouveau_engctx_destroy(&(d)->base) | ||
16 | #define nouveau_graph_context_init(d) \ | ||
17 | nouveau_engctx_init(&(d)->base) | ||
18 | #define nouveau_graph_context_fini(d,s) \ | ||
19 | nouveau_engctx_fini(&(d)->base, (s)) | ||
20 | |||
21 | #define _nouveau_graph_context_dtor _nouveau_engctx_dtor | ||
22 | #define _nouveau_graph_context_init _nouveau_engctx_init | ||
23 | #define _nouveau_graph_context_fini _nouveau_engctx_fini | ||
24 | #define _nouveau_graph_context_rd32 _nouveau_engctx_rd32 | ||
25 | #define _nouveau_graph_context_wr32 _nouveau_engctx_wr32 | ||
26 | |||
27 | struct nouveau_graph { | ||
28 | struct nouveau_engine base; | ||
29 | |||
30 | /* Returns chipset-specific counts of units packed into an u64. | ||
31 | */ | ||
32 | u64 (*units)(struct nouveau_graph *); | ||
33 | }; | ||
34 | |||
35 | static inline struct nouveau_graph * | ||
36 | nouveau_graph(void *obj) | ||
37 | { | ||
38 | return (void *)nouveau_engine(obj, NVDEV_ENGINE_GR); | ||
39 | } | ||
40 | |||
41 | #define nouveau_graph_create(p,e,c,y,d) \ | ||
42 | nouveau_engine_create((p), (e), (c), (y), "PGRAPH", "graphics", (d)) | ||
43 | #define nouveau_graph_destroy(d) \ | ||
44 | nouveau_engine_destroy(&(d)->base) | ||
45 | #define nouveau_graph_init(d) \ | ||
46 | nouveau_engine_init(&(d)->base) | ||
47 | #define nouveau_graph_fini(d,s) \ | ||
48 | nouveau_engine_fini(&(d)->base, (s)) | ||
49 | |||
50 | #define _nouveau_graph_dtor _nouveau_engine_dtor | ||
51 | #define _nouveau_graph_init _nouveau_engine_init | ||
52 | #define _nouveau_graph_fini _nouveau_engine_fini | ||
53 | |||
54 | extern struct nouveau_oclass nv04_graph_oclass; | ||
55 | extern struct nouveau_oclass nv10_graph_oclass; | ||
56 | extern struct nouveau_oclass nv20_graph_oclass; | ||
57 | extern struct nouveau_oclass nv25_graph_oclass; | ||
58 | extern struct nouveau_oclass nv2a_graph_oclass; | ||
59 | extern struct nouveau_oclass nv30_graph_oclass; | ||
60 | extern struct nouveau_oclass nv34_graph_oclass; | ||
61 | extern struct nouveau_oclass nv35_graph_oclass; | ||
62 | extern struct nouveau_oclass nv40_graph_oclass; | ||
63 | extern struct nouveau_oclass nv50_graph_oclass; | ||
64 | extern struct nouveau_oclass *nvc0_graph_oclass; | ||
65 | extern struct nouveau_oclass *nvc1_graph_oclass; | ||
66 | extern struct nouveau_oclass *nvc4_graph_oclass; | ||
67 | extern struct nouveau_oclass *nvc8_graph_oclass; | ||
68 | extern struct nouveau_oclass *nvd7_graph_oclass; | ||
69 | extern struct nouveau_oclass *nvd9_graph_oclass; | ||
70 | extern struct nouveau_oclass *nve4_graph_oclass; | ||
71 | extern struct nouveau_oclass *gk20a_graph_oclass; | ||
72 | extern struct nouveau_oclass *nvf0_graph_oclass; | ||
73 | extern struct nouveau_oclass *gk110b_graph_oclass; | ||
74 | extern struct nouveau_oclass *nv108_graph_oclass; | ||
75 | extern struct nouveau_oclass *gm107_graph_oclass; | ||
76 | |||
77 | extern const struct nouveau_bitfield nv04_graph_nsource[]; | ||
78 | extern struct nouveau_ofuncs nv04_graph_ofuncs; | ||
79 | bool nv04_graph_idle(void *obj); | ||
80 | |||
81 | extern const struct nouveau_bitfield nv10_graph_intr_name[]; | ||
82 | extern const struct nouveau_bitfield nv10_graph_nstatus[]; | ||
83 | |||
84 | extern const struct nouveau_enum nv50_data_error_names[]; | ||
85 | |||
86 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index d39a15000068..16ab6b187a52 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c | |||
@@ -165,7 +165,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) | |||
165 | struct nouveau_drm *drm = nouveau_drm(dev); | 165 | struct nouveau_drm *drm = nouveau_drm(dev); |
166 | struct nvif_device *device = &drm->device; | 166 | struct nvif_device *device = &drm->device; |
167 | struct nouveau_timer *ptimer = nvkm_timer(device); | 167 | struct nouveau_timer *ptimer = nvkm_timer(device); |
168 | struct nouveau_graph *graph = nvkm_gr(device); | 168 | struct nouveau_gr *gr = nvkm_gr(device); |
169 | struct drm_nouveau_getparam *getparam = data; | 169 | struct drm_nouveau_getparam *getparam = data; |
170 | 170 | ||
171 | switch (getparam->param) { | 171 | switch (getparam->param) { |
@@ -215,7 +215,7 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) | |||
215 | getparam->value = 1; | 215 | getparam->value = 1; |
216 | break; | 216 | break; |
217 | case NOUVEAU_GETPARAM_GRAPH_UNITS: | 217 | case NOUVEAU_GETPARAM_GRAPH_UNITS: |
218 | getparam->value = graph->units ? graph->units(graph) : 0; | 218 | getparam->value = gr->units ? gr->units(gr) : 0; |
219 | break; | 219 | break; |
220 | default: | 220 | default: |
221 | NV_PRINTK(debug, cli, "unknown parameter %lld\n", getparam->param); | 221 | NV_PRINTK(debug, cli, "unknown parameter %lld\n", getparam->param); |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/Kbuild index 71d6542147a2..183475e2a924 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/Kbuild +++ b/drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | |||
@@ -8,7 +8,7 @@ include $(src)/nvkm/engine/device/Kbuild | |||
8 | include $(src)/nvkm/engine/disp/Kbuild | 8 | include $(src)/nvkm/engine/disp/Kbuild |
9 | include $(src)/nvkm/engine/dmaobj/Kbuild | 9 | include $(src)/nvkm/engine/dmaobj/Kbuild |
10 | include $(src)/nvkm/engine/fifo/Kbuild | 10 | include $(src)/nvkm/engine/fifo/Kbuild |
11 | include $(src)/nvkm/engine/graph/Kbuild | 11 | include $(src)/nvkm/engine/gr/Kbuild |
12 | include $(src)/nvkm/engine/mpeg/Kbuild | 12 | include $(src)/nvkm/engine/mpeg/Kbuild |
13 | include $(src)/nvkm/engine/msvld/Kbuild | 13 | include $(src)/nvkm/engine/msvld/Kbuild |
14 | include $(src)/nvkm/engine/perfmon/Kbuild | 14 | include $(src)/nvkm/engine/perfmon/Kbuild |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index 96050a487226..baad4ad22058 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | |||
@@ -228,7 +228,7 @@ static const u64 disable_map[] = { | |||
228 | [NVDEV_ENGINE_PERFMON] = NV_DEVICE_V0_DISABLE_CORE, | 228 | [NVDEV_ENGINE_PERFMON] = NV_DEVICE_V0_DISABLE_CORE, |
229 | [NVDEV_ENGINE_FIFO] = NV_DEVICE_V0_DISABLE_FIFO, | 229 | [NVDEV_ENGINE_FIFO] = NV_DEVICE_V0_DISABLE_FIFO, |
230 | [NVDEV_ENGINE_SW] = NV_DEVICE_V0_DISABLE_FIFO, | 230 | [NVDEV_ENGINE_SW] = NV_DEVICE_V0_DISABLE_FIFO, |
231 | [NVDEV_ENGINE_GR] = NV_DEVICE_V0_DISABLE_GRAPH, | 231 | [NVDEV_ENGINE_GR] = NV_DEVICE_V0_DISABLE_GR, |
232 | [NVDEV_ENGINE_MPEG] = NV_DEVICE_V0_DISABLE_MPEG, | 232 | [NVDEV_ENGINE_MPEG] = NV_DEVICE_V0_DISABLE_MPEG, |
233 | [NVDEV_ENGINE_ME] = NV_DEVICE_V0_DISABLE_ME, | 233 | [NVDEV_ENGINE_ME] = NV_DEVICE_V0_DISABLE_ME, |
234 | [NVDEV_ENGINE_VP] = NV_DEVICE_V0_DISABLE_VP, | 234 | [NVDEV_ENGINE_VP] = NV_DEVICE_V0_DISABLE_VP, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c index c9c18dc6f216..e7289fd2da9b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <engine/dmaobj.h> | 46 | #include <engine/dmaobj.h> |
47 | #include <engine/fifo.h> | 47 | #include <engine/fifo.h> |
48 | #include <engine/software.h> | 48 | #include <engine/software.h> |
49 | #include <engine/graph.h> | 49 | #include <engine/gr.h> |
50 | #include <engine/disp.h> | 50 | #include <engine/disp.h> |
51 | #include <engine/ce.h> | 51 | #include <engine/ce.h> |
52 | #include <engine/bsp.h> | 52 | #include <engine/bsp.h> |
@@ -86,7 +86,7 @@ gm100_identify(struct nouveau_device *device) | |||
86 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 86 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
87 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; | 87 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; |
88 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 88 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
89 | device->oclass[NVDEV_ENGINE_GR ] = gm107_graph_oclass; | 89 | device->oclass[NVDEV_ENGINE_GR ] = gm107_gr_oclass; |
90 | device->oclass[NVDEV_ENGINE_DISP ] = gm107_disp_oclass; | 90 | device->oclass[NVDEV_ENGINE_DISP ] = gm107_disp_oclass; |
91 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 91 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
92 | #if 0 | 92 | #if 0 |
@@ -130,7 +130,7 @@ gm100_identify(struct nouveau_device *device) | |||
130 | #if 0 | 130 | #if 0 |
131 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; | 131 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; |
132 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 132 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
133 | device->oclass[NVDEV_ENGINE_GR ] = gm107_graph_oclass; | 133 | device->oclass[NVDEV_ENGINE_GR ] = gm107_gr_oclass; |
134 | #endif | 134 | #endif |
135 | device->oclass[NVDEV_ENGINE_DISP ] = gm204_disp_oclass; | 135 | device->oclass[NVDEV_ENGINE_DISP ] = gm204_disp_oclass; |
136 | #if 0 | 136 | #if 0 |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c index 7f98385acec7..dcb53917b5e0 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <engine/dmaobj.h> | 37 | #include <engine/dmaobj.h> |
38 | #include <engine/fifo.h> | 38 | #include <engine/fifo.h> |
39 | #include <engine/software.h> | 39 | #include <engine/software.h> |
40 | #include <engine/graph.h> | 40 | #include <engine/gr.h> |
41 | #include <engine/disp.h> | 41 | #include <engine/disp.h> |
42 | 42 | ||
43 | int | 43 | int |
@@ -59,7 +59,7 @@ nv04_identify(struct nouveau_device *device) | |||
59 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 59 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
60 | device->oclass[NVDEV_ENGINE_FIFO ] = nv04_fifo_oclass; | 60 | device->oclass[NVDEV_ENGINE_FIFO ] = nv04_fifo_oclass; |
61 | device->oclass[NVDEV_ENGINE_SW ] = nv04_software_oclass; | 61 | device->oclass[NVDEV_ENGINE_SW ] = nv04_software_oclass; |
62 | device->oclass[NVDEV_ENGINE_GR ] = &nv04_graph_oclass; | 62 | device->oclass[NVDEV_ENGINE_GR ] = &nv04_gr_oclass; |
63 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 63 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
64 | break; | 64 | break; |
65 | case 0x05: | 65 | case 0x05: |
@@ -77,7 +77,7 @@ nv04_identify(struct nouveau_device *device) | |||
77 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 77 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
78 | device->oclass[NVDEV_ENGINE_FIFO ] = nv04_fifo_oclass; | 78 | device->oclass[NVDEV_ENGINE_FIFO ] = nv04_fifo_oclass; |
79 | device->oclass[NVDEV_ENGINE_SW ] = nv04_software_oclass; | 79 | device->oclass[NVDEV_ENGINE_SW ] = nv04_software_oclass; |
80 | device->oclass[NVDEV_ENGINE_GR ] = &nv04_graph_oclass; | 80 | device->oclass[NVDEV_ENGINE_GR ] = &nv04_gr_oclass; |
81 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 81 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
82 | break; | 82 | break; |
83 | default: | 83 | default: |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c index 6a7ece0fc789..f292e7b88628 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <engine/dmaobj.h> | 38 | #include <engine/dmaobj.h> |
39 | #include <engine/fifo.h> | 39 | #include <engine/fifo.h> |
40 | #include <engine/software.h> | 40 | #include <engine/software.h> |
41 | #include <engine/graph.h> | 41 | #include <engine/gr.h> |
42 | #include <engine/disp.h> | 42 | #include <engine/disp.h> |
43 | 43 | ||
44 | int | 44 | int |
@@ -59,7 +59,7 @@ nv10_identify(struct nouveau_device *device) | |||
59 | device->oclass[NVDEV_SUBDEV_INSTMEM] = nv04_instmem_oclass; | 59 | device->oclass[NVDEV_SUBDEV_INSTMEM] = nv04_instmem_oclass; |
60 | device->oclass[NVDEV_SUBDEV_MMU ] = &nv04_mmu_oclass; | 60 | device->oclass[NVDEV_SUBDEV_MMU ] = &nv04_mmu_oclass; |
61 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 61 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
62 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 62 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
63 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 63 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
64 | break; | 64 | break; |
65 | case 0x15: | 65 | case 0x15: |
@@ -78,7 +78,7 @@ nv10_identify(struct nouveau_device *device) | |||
78 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 78 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
79 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; | 79 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; |
80 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 80 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
81 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 81 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
82 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 82 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
83 | break; | 83 | break; |
84 | case 0x16: | 84 | case 0x16: |
@@ -97,7 +97,7 @@ nv10_identify(struct nouveau_device *device) | |||
97 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 97 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
98 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; | 98 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; |
99 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 99 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
100 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 100 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
101 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 101 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
102 | break; | 102 | break; |
103 | case 0x1a: | 103 | case 0x1a: |
@@ -116,7 +116,7 @@ nv10_identify(struct nouveau_device *device) | |||
116 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 116 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
117 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; | 117 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; |
118 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 118 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
119 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 119 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
120 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 120 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
121 | break; | 121 | break; |
122 | case 0x11: | 122 | case 0x11: |
@@ -135,7 +135,7 @@ nv10_identify(struct nouveau_device *device) | |||
135 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 135 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
136 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; | 136 | device->oclass[NVDEV_ENGINE_FIFO ] = nv10_fifo_oclass; |
137 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 137 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
138 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 138 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
139 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 139 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
140 | break; | 140 | break; |
141 | case 0x17: | 141 | case 0x17: |
@@ -154,7 +154,7 @@ nv10_identify(struct nouveau_device *device) | |||
154 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 154 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
155 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 155 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
156 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 156 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
157 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 157 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
158 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 158 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
159 | break; | 159 | break; |
160 | case 0x1f: | 160 | case 0x1f: |
@@ -173,7 +173,7 @@ nv10_identify(struct nouveau_device *device) | |||
173 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 173 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
174 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 174 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
175 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 175 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
176 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 176 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
177 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 177 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
178 | break; | 178 | break; |
179 | case 0x18: | 179 | case 0x18: |
@@ -192,7 +192,7 @@ nv10_identify(struct nouveau_device *device) | |||
192 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 192 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
193 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 193 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
194 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 194 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
195 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_graph_oclass; | 195 | device->oclass[NVDEV_ENGINE_GR ] = &nv10_gr_oclass; |
196 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 196 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
197 | break; | 197 | break; |
198 | default: | 198 | default: |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c index e3b17fde89e6..a03420ca82b1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <engine/dmaobj.h> | 39 | #include <engine/dmaobj.h> |
40 | #include <engine/fifo.h> | 40 | #include <engine/fifo.h> |
41 | #include <engine/software.h> | 41 | #include <engine/software.h> |
42 | #include <engine/graph.h> | 42 | #include <engine/gr.h> |
43 | #include <engine/disp.h> | 43 | #include <engine/disp.h> |
44 | 44 | ||
45 | int | 45 | int |
@@ -62,7 +62,7 @@ nv20_identify(struct nouveau_device *device) | |||
62 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 62 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
63 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 63 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
64 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 64 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
65 | device->oclass[NVDEV_ENGINE_GR ] = &nv20_graph_oclass; | 65 | device->oclass[NVDEV_ENGINE_GR ] = &nv20_gr_oclass; |
66 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 66 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
67 | break; | 67 | break; |
68 | case 0x25: | 68 | case 0x25: |
@@ -81,7 +81,7 @@ nv20_identify(struct nouveau_device *device) | |||
81 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 81 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
82 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 82 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
83 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 83 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
84 | device->oclass[NVDEV_ENGINE_GR ] = &nv25_graph_oclass; | 84 | device->oclass[NVDEV_ENGINE_GR ] = &nv25_gr_oclass; |
85 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 85 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
86 | break; | 86 | break; |
87 | case 0x28: | 87 | case 0x28: |
@@ -100,7 +100,7 @@ nv20_identify(struct nouveau_device *device) | |||
100 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 100 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
101 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 101 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
102 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 102 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
103 | device->oclass[NVDEV_ENGINE_GR ] = &nv25_graph_oclass; | 103 | device->oclass[NVDEV_ENGINE_GR ] = &nv25_gr_oclass; |
104 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 104 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
105 | break; | 105 | break; |
106 | case 0x2a: | 106 | case 0x2a: |
@@ -119,7 +119,7 @@ nv20_identify(struct nouveau_device *device) | |||
119 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 119 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
120 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 120 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
121 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 121 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
122 | device->oclass[NVDEV_ENGINE_GR ] = &nv2a_graph_oclass; | 122 | device->oclass[NVDEV_ENGINE_GR ] = &nv2a_gr_oclass; |
123 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 123 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
124 | break; | 124 | break; |
125 | default: | 125 | default: |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c index 8f67f4d402d7..59b6baa64b4c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <engine/dmaobj.h> | 38 | #include <engine/dmaobj.h> |
39 | #include <engine/fifo.h> | 39 | #include <engine/fifo.h> |
40 | #include <engine/software.h> | 40 | #include <engine/software.h> |
41 | #include <engine/graph.h> | 41 | #include <engine/gr.h> |
42 | #include <engine/mpeg.h> | 42 | #include <engine/mpeg.h> |
43 | #include <engine/disp.h> | 43 | #include <engine/disp.h> |
44 | 44 | ||
@@ -62,7 +62,7 @@ nv30_identify(struct nouveau_device *device) | |||
62 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 62 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
63 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 63 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
64 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 64 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
65 | device->oclass[NVDEV_ENGINE_GR ] = &nv30_graph_oclass; | 65 | device->oclass[NVDEV_ENGINE_GR ] = &nv30_gr_oclass; |
66 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 66 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
67 | break; | 67 | break; |
68 | case 0x35: | 68 | case 0x35: |
@@ -81,7 +81,7 @@ nv30_identify(struct nouveau_device *device) | |||
81 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 81 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
82 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 82 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
83 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 83 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
84 | device->oclass[NVDEV_ENGINE_GR ] = &nv35_graph_oclass; | 84 | device->oclass[NVDEV_ENGINE_GR ] = &nv35_gr_oclass; |
85 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 85 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
86 | break; | 86 | break; |
87 | case 0x31: | 87 | case 0x31: |
@@ -100,7 +100,7 @@ nv30_identify(struct nouveau_device *device) | |||
100 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 100 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
101 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 101 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
102 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 102 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
103 | device->oclass[NVDEV_ENGINE_GR ] = &nv30_graph_oclass; | 103 | device->oclass[NVDEV_ENGINE_GR ] = &nv30_gr_oclass; |
104 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv31_mpeg_oclass; | 104 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv31_mpeg_oclass; |
105 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 105 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
106 | break; | 106 | break; |
@@ -120,7 +120,7 @@ nv30_identify(struct nouveau_device *device) | |||
120 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 120 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
121 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 121 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
122 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 122 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
123 | device->oclass[NVDEV_ENGINE_GR ] = &nv35_graph_oclass; | 123 | device->oclass[NVDEV_ENGINE_GR ] = &nv35_gr_oclass; |
124 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv31_mpeg_oclass; | 124 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv31_mpeg_oclass; |
125 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 125 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
126 | break; | 126 | break; |
@@ -140,7 +140,7 @@ nv30_identify(struct nouveau_device *device) | |||
140 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 140 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
141 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; | 141 | device->oclass[NVDEV_ENGINE_FIFO ] = nv17_fifo_oclass; |
142 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 142 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
143 | device->oclass[NVDEV_ENGINE_GR ] = &nv34_graph_oclass; | 143 | device->oclass[NVDEV_ENGINE_GR ] = &nv34_gr_oclass; |
144 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv31_mpeg_oclass; | 144 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv31_mpeg_oclass; |
145 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 145 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
146 | break; | 146 | break; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c index 49c68d7c093c..3b16fdc4c95e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <engine/dmaobj.h> | 41 | #include <engine/dmaobj.h> |
42 | #include <engine/fifo.h> | 42 | #include <engine/fifo.h> |
43 | #include <engine/software.h> | 43 | #include <engine/software.h> |
44 | #include <engine/graph.h> | 44 | #include <engine/gr.h> |
45 | #include <engine/mpeg.h> | 45 | #include <engine/mpeg.h> |
46 | #include <engine/disp.h> | 46 | #include <engine/disp.h> |
47 | #include <engine/perfmon.h> | 47 | #include <engine/perfmon.h> |
@@ -68,7 +68,7 @@ nv40_identify(struct nouveau_device *device) | |||
68 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 68 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
69 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 69 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
70 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 70 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
71 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 71 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
72 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; | 72 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; |
73 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 73 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
74 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 74 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -91,7 +91,7 @@ nv40_identify(struct nouveau_device *device) | |||
91 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 91 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
92 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 92 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
93 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 93 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
94 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 94 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
95 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; | 95 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; |
96 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 96 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
97 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 97 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -114,7 +114,7 @@ nv40_identify(struct nouveau_device *device) | |||
114 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 114 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
115 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 115 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
116 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 116 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
117 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 117 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
118 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; | 118 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; |
119 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 119 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
120 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 120 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -137,7 +137,7 @@ nv40_identify(struct nouveau_device *device) | |||
137 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 137 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
138 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 138 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
139 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 139 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
140 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 140 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
141 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; | 141 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv40_mpeg_oclass; |
142 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 142 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
143 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 143 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -160,7 +160,7 @@ nv40_identify(struct nouveau_device *device) | |||
160 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 160 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
161 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 161 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
162 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 162 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
163 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 163 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
164 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 164 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
165 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 165 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
166 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 166 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -183,7 +183,7 @@ nv40_identify(struct nouveau_device *device) | |||
183 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 183 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
184 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 184 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
185 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 185 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
186 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 186 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
187 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 187 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
188 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 188 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
189 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 189 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -206,7 +206,7 @@ nv40_identify(struct nouveau_device *device) | |||
206 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 206 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
207 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 207 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
208 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 208 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
209 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 209 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
210 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 210 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
211 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 211 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
212 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 212 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -229,7 +229,7 @@ nv40_identify(struct nouveau_device *device) | |||
229 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 229 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
230 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 230 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
231 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 231 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
232 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 232 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
233 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 233 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
234 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 234 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
235 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 235 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -252,7 +252,7 @@ nv40_identify(struct nouveau_device *device) | |||
252 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 252 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
253 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 253 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
254 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 254 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
255 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 255 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
256 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 256 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
257 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 257 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
258 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 258 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -275,7 +275,7 @@ nv40_identify(struct nouveau_device *device) | |||
275 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 275 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
276 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 276 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
277 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 277 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
278 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 278 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
279 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 279 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
280 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 280 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
281 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 281 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -298,7 +298,7 @@ nv40_identify(struct nouveau_device *device) | |||
298 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 298 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
299 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 299 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
300 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 300 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
301 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 301 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
302 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 302 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
303 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 303 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
304 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 304 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -321,7 +321,7 @@ nv40_identify(struct nouveau_device *device) | |||
321 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 321 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
322 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 322 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
323 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 323 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
324 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 324 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
325 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 325 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
326 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 326 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
327 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 327 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -344,7 +344,7 @@ nv40_identify(struct nouveau_device *device) | |||
344 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 344 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
345 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 345 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
346 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 346 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
347 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 347 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
348 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 348 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
349 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 349 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
350 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 350 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -367,7 +367,7 @@ nv40_identify(struct nouveau_device *device) | |||
367 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 367 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
368 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 368 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
369 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 369 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
370 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 370 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
371 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 371 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
372 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 372 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
373 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 373 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -390,7 +390,7 @@ nv40_identify(struct nouveau_device *device) | |||
390 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 390 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
391 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 391 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
392 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 392 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
393 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 393 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
394 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 394 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
395 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 395 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
396 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 396 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
@@ -413,7 +413,7 @@ nv40_identify(struct nouveau_device *device) | |||
413 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; | 413 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv04_dmaeng_oclass; |
414 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; | 414 | device->oclass[NVDEV_ENGINE_FIFO ] = nv40_fifo_oclass; |
415 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; | 415 | device->oclass[NVDEV_ENGINE_SW ] = nv10_software_oclass; |
416 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_graph_oclass; | 416 | device->oclass[NVDEV_ENGINE_GR ] = &nv40_gr_oclass; |
417 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; | 417 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv44_mpeg_oclass; |
418 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; | 418 | device->oclass[NVDEV_ENGINE_DISP ] = nv04_disp_oclass; |
419 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; | 419 | device->oclass[NVDEV_ENGINE_PERFMON] = nv40_perfmon_oclass; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c index cb978023d472..a9788b4999c6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <engine/dmaobj.h> | 44 | #include <engine/dmaobj.h> |
45 | #include <engine/fifo.h> | 45 | #include <engine/fifo.h> |
46 | #include <engine/software.h> | 46 | #include <engine/software.h> |
47 | #include <engine/graph.h> | 47 | #include <engine/gr.h> |
48 | #include <engine/mpeg.h> | 48 | #include <engine/mpeg.h> |
49 | #include <engine/vp.h> | 49 | #include <engine/vp.h> |
50 | #include <engine/cipher.h> | 50 | #include <engine/cipher.h> |
@@ -81,7 +81,7 @@ nv50_identify(struct nouveau_device *device) | |||
81 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 81 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
82 | device->oclass[NVDEV_ENGINE_FIFO ] = nv50_fifo_oclass; | 82 | device->oclass[NVDEV_ENGINE_FIFO ] = nv50_fifo_oclass; |
83 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 83 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
84 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 84 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
85 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv50_mpeg_oclass; | 85 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv50_mpeg_oclass; |
86 | device->oclass[NVDEV_ENGINE_DISP ] = nv50_disp_oclass; | 86 | device->oclass[NVDEV_ENGINE_DISP ] = nv50_disp_oclass; |
87 | device->oclass[NVDEV_ENGINE_PERFMON] = nv50_perfmon_oclass; | 87 | device->oclass[NVDEV_ENGINE_PERFMON] = nv50_perfmon_oclass; |
@@ -107,7 +107,7 @@ nv50_identify(struct nouveau_device *device) | |||
107 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 107 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
108 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 108 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
109 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 109 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
110 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 110 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
111 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; | 111 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; |
112 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; | 112 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; |
113 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; | 113 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; |
@@ -136,7 +136,7 @@ nv50_identify(struct nouveau_device *device) | |||
136 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 136 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
137 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 137 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
138 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 138 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
139 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 139 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
140 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; | 140 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; |
141 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; | 141 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; |
142 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; | 142 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; |
@@ -165,7 +165,7 @@ nv50_identify(struct nouveau_device *device) | |||
165 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 165 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
166 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 166 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
167 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 167 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
168 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 168 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
169 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; | 169 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; |
170 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; | 170 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; |
171 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; | 171 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; |
@@ -194,7 +194,7 @@ nv50_identify(struct nouveau_device *device) | |||
194 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 194 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
195 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 195 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
196 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 196 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
197 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 197 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
198 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; | 198 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; |
199 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; | 199 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; |
200 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; | 200 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; |
@@ -223,7 +223,7 @@ nv50_identify(struct nouveau_device *device) | |||
223 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 223 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
224 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 224 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
225 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 225 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
226 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 226 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
227 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; | 227 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; |
228 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; | 228 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; |
229 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; | 229 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; |
@@ -252,7 +252,7 @@ nv50_identify(struct nouveau_device *device) | |||
252 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 252 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
253 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 253 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
254 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 254 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
255 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 255 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
256 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; | 256 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; |
257 | device->oclass[NVDEV_ENGINE_SEC ] = &nv98_sec_oclass; | 257 | device->oclass[NVDEV_ENGINE_SEC ] = &nv98_sec_oclass; |
258 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; | 258 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; |
@@ -281,7 +281,7 @@ nv50_identify(struct nouveau_device *device) | |||
281 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 281 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
282 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 282 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
283 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 283 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
284 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 284 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
285 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; | 285 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; |
286 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; | 286 | device->oclass[NVDEV_ENGINE_VP ] = &nv84_vp_oclass; |
287 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; | 287 | device->oclass[NVDEV_ENGINE_CIPHER ] = &nv84_cipher_oclass; |
@@ -310,7 +310,7 @@ nv50_identify(struct nouveau_device *device) | |||
310 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 310 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
311 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 311 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
312 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 312 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
313 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 313 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
314 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; | 314 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; |
315 | device->oclass[NVDEV_ENGINE_SEC ] = &nv98_sec_oclass; | 315 | device->oclass[NVDEV_ENGINE_SEC ] = &nv98_sec_oclass; |
316 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; | 316 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; |
@@ -339,7 +339,7 @@ nv50_identify(struct nouveau_device *device) | |||
339 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 339 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
340 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 340 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
341 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 341 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
342 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 342 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
343 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; | 343 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; |
344 | device->oclass[NVDEV_ENGINE_SEC ] = &nv98_sec_oclass; | 344 | device->oclass[NVDEV_ENGINE_SEC ] = &nv98_sec_oclass; |
345 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; | 345 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; |
@@ -369,7 +369,7 @@ nv50_identify(struct nouveau_device *device) | |||
369 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 369 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
370 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 370 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
371 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 371 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
372 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 372 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
373 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; | 373 | device->oclass[NVDEV_ENGINE_MPEG ] = &nv84_mpeg_oclass; |
374 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; | 374 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; |
375 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; | 375 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; |
@@ -400,7 +400,7 @@ nv50_identify(struct nouveau_device *device) | |||
400 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 400 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
401 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 401 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
402 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 402 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
403 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 403 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
404 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; | 404 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; |
405 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; | 405 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; |
406 | device->oclass[NVDEV_ENGINE_PPP ] = &nv98_ppp_oclass; | 406 | device->oclass[NVDEV_ENGINE_PPP ] = &nv98_ppp_oclass; |
@@ -430,7 +430,7 @@ nv50_identify(struct nouveau_device *device) | |||
430 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 430 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
431 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 431 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
432 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 432 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
433 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 433 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
434 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; | 434 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; |
435 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; | 435 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; |
436 | device->oclass[NVDEV_ENGINE_PPP ] = &nv98_ppp_oclass; | 436 | device->oclass[NVDEV_ENGINE_PPP ] = &nv98_ppp_oclass; |
@@ -460,7 +460,7 @@ nv50_identify(struct nouveau_device *device) | |||
460 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; | 460 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nv50_dmaeng_oclass; |
461 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; | 461 | device->oclass[NVDEV_ENGINE_FIFO ] = nv84_fifo_oclass; |
462 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; | 462 | device->oclass[NVDEV_ENGINE_SW ] = nv50_software_oclass; |
463 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_graph_oclass; | 463 | device->oclass[NVDEV_ENGINE_GR ] = &nv50_gr_oclass; |
464 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; | 464 | device->oclass[NVDEV_ENGINE_VP ] = &nv98_vp_oclass; |
465 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; | 465 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nv98_msvld_oclass; |
466 | device->oclass[NVDEV_ENGINE_PPP ] = &nv98_ppp_oclass; | 466 | device->oclass[NVDEV_ENGINE_PPP ] = &nv98_ppp_oclass; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c index 39bf7d115bc6..1f93c9611f37 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <engine/dmaobj.h> | 46 | #include <engine/dmaobj.h> |
47 | #include <engine/fifo.h> | 47 | #include <engine/fifo.h> |
48 | #include <engine/software.h> | 48 | #include <engine/software.h> |
49 | #include <engine/graph.h> | 49 | #include <engine/gr.h> |
50 | #include <engine/vp.h> | 50 | #include <engine/vp.h> |
51 | #include <engine/bsp.h> | 51 | #include <engine/bsp.h> |
52 | #include <engine/msvld.h> | 52 | #include <engine/msvld.h> |
@@ -83,7 +83,7 @@ nvc0_identify(struct nouveau_device *device) | |||
83 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; | 83 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; |
84 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 84 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
85 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 85 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
86 | device->oclass[NVDEV_ENGINE_GR ] = nvc0_graph_oclass; | 86 | device->oclass[NVDEV_ENGINE_GR ] = nvc0_gr_oclass; |
87 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 87 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
88 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 88 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
89 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 89 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -116,7 +116,7 @@ nvc0_identify(struct nouveau_device *device) | |||
116 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; | 116 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; |
117 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 117 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
118 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 118 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
119 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_graph_oclass; | 119 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_gr_oclass; |
120 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 120 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
121 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 121 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
122 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 122 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -149,7 +149,7 @@ nvc0_identify(struct nouveau_device *device) | |||
149 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; | 149 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; |
150 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 150 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
151 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 151 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
152 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_graph_oclass; | 152 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_gr_oclass; |
153 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 153 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
154 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 154 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
155 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 155 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -181,7 +181,7 @@ nvc0_identify(struct nouveau_device *device) | |||
181 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; | 181 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; |
182 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 182 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
183 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 183 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
184 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_graph_oclass; | 184 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_gr_oclass; |
185 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 185 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
186 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 186 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
187 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 187 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -214,7 +214,7 @@ nvc0_identify(struct nouveau_device *device) | |||
214 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; | 214 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; |
215 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 215 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
216 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 216 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
217 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_graph_oclass; | 217 | device->oclass[NVDEV_ENGINE_GR ] = nvc4_gr_oclass; |
218 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 218 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
219 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 219 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
220 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 220 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -246,7 +246,7 @@ nvc0_identify(struct nouveau_device *device) | |||
246 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; | 246 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; |
247 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 247 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
248 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 248 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
249 | device->oclass[NVDEV_ENGINE_GR ] = nvc1_graph_oclass; | 249 | device->oclass[NVDEV_ENGINE_GR ] = nvc1_gr_oclass; |
250 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 250 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
251 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 251 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
252 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 252 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -278,7 +278,7 @@ nvc0_identify(struct nouveau_device *device) | |||
278 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; | 278 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvc0_dmaeng_oclass; |
279 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 279 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
280 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 280 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
281 | device->oclass[NVDEV_ENGINE_GR ] = nvc8_graph_oclass; | 281 | device->oclass[NVDEV_ENGINE_GR ] = nvc8_gr_oclass; |
282 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 282 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
283 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 283 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
284 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 284 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -311,7 +311,7 @@ nvc0_identify(struct nouveau_device *device) | |||
311 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 311 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
312 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 312 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
313 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 313 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
314 | device->oclass[NVDEV_ENGINE_GR ] = nvd9_graph_oclass; | 314 | device->oclass[NVDEV_ENGINE_GR ] = nvd9_gr_oclass; |
315 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 315 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
316 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 316 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
317 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 317 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
@@ -341,7 +341,7 @@ nvc0_identify(struct nouveau_device *device) | |||
341 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 341 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
342 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; | 342 | device->oclass[NVDEV_ENGINE_FIFO ] = nvc0_fifo_oclass; |
343 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 343 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
344 | device->oclass[NVDEV_ENGINE_GR ] = nvd7_graph_oclass; | 344 | device->oclass[NVDEV_ENGINE_GR ] = nvd7_gr_oclass; |
345 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; | 345 | device->oclass[NVDEV_ENGINE_VP ] = &nvc0_vp_oclass; |
346 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; | 346 | device->oclass[NVDEV_ENGINE_MSVLD ] = &nvc0_msvld_oclass; |
347 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; | 347 | device->oclass[NVDEV_ENGINE_PPP ] = &nvc0_ppp_oclass; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c index 1f6d515fb641..c18f5821c3cf 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <engine/dmaobj.h> | 46 | #include <engine/dmaobj.h> |
47 | #include <engine/fifo.h> | 47 | #include <engine/fifo.h> |
48 | #include <engine/software.h> | 48 | #include <engine/software.h> |
49 | #include <engine/graph.h> | 49 | #include <engine/gr.h> |
50 | #include <engine/disp.h> | 50 | #include <engine/disp.h> |
51 | #include <engine/ce.h> | 51 | #include <engine/ce.h> |
52 | #include <engine/bsp.h> | 52 | #include <engine/bsp.h> |
@@ -83,7 +83,7 @@ nve0_identify(struct nouveau_device *device) | |||
83 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 83 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
84 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; | 84 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; |
85 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 85 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
86 | device->oclass[NVDEV_ENGINE_GR ] = nve4_graph_oclass; | 86 | device->oclass[NVDEV_ENGINE_GR ] = nve4_gr_oclass; |
87 | device->oclass[NVDEV_ENGINE_DISP ] = nve0_disp_oclass; | 87 | device->oclass[NVDEV_ENGINE_DISP ] = nve0_disp_oclass; |
88 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 88 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
89 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; | 89 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; |
@@ -117,7 +117,7 @@ nve0_identify(struct nouveau_device *device) | |||
117 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 117 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
118 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; | 118 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; |
119 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 119 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
120 | device->oclass[NVDEV_ENGINE_GR ] = nve4_graph_oclass; | 120 | device->oclass[NVDEV_ENGINE_GR ] = nve4_gr_oclass; |
121 | device->oclass[NVDEV_ENGINE_DISP ] = nve0_disp_oclass; | 121 | device->oclass[NVDEV_ENGINE_DISP ] = nve0_disp_oclass; |
122 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 122 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
123 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; | 123 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; |
@@ -151,7 +151,7 @@ nve0_identify(struct nouveau_device *device) | |||
151 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 151 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
152 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; | 152 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; |
153 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 153 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
154 | device->oclass[NVDEV_ENGINE_GR ] = nve4_graph_oclass; | 154 | device->oclass[NVDEV_ENGINE_GR ] = nve4_gr_oclass; |
155 | device->oclass[NVDEV_ENGINE_DISP ] = nve0_disp_oclass; | 155 | device->oclass[NVDEV_ENGINE_DISP ] = nve0_disp_oclass; |
156 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 156 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
157 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; | 157 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; |
@@ -177,7 +177,7 @@ nve0_identify(struct nouveau_device *device) | |||
177 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 177 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
178 | device->oclass[NVDEV_ENGINE_FIFO ] = gk20a_fifo_oclass; | 178 | device->oclass[NVDEV_ENGINE_FIFO ] = gk20a_fifo_oclass; |
179 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 179 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
180 | device->oclass[NVDEV_ENGINE_GR ] = gk20a_graph_oclass; | 180 | device->oclass[NVDEV_ENGINE_GR ] = gk20a_gr_oclass; |
181 | device->oclass[NVDEV_ENGINE_CE2 ] = &nve0_ce2_oclass; | 181 | device->oclass[NVDEV_ENGINE_CE2 ] = &nve0_ce2_oclass; |
182 | device->oclass[NVDEV_ENGINE_PERFMON] = &nve0_perfmon_oclass; | 182 | device->oclass[NVDEV_ENGINE_PERFMON] = &nve0_perfmon_oclass; |
183 | device->oclass[NVDEV_SUBDEV_VOLT ] = &gk20a_volt_oclass; | 183 | device->oclass[NVDEV_SUBDEV_VOLT ] = &gk20a_volt_oclass; |
@@ -207,7 +207,7 @@ nve0_identify(struct nouveau_device *device) | |||
207 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 207 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
208 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; | 208 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; |
209 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 209 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
210 | device->oclass[NVDEV_ENGINE_GR ] = nvf0_graph_oclass; | 210 | device->oclass[NVDEV_ENGINE_GR ] = nvf0_gr_oclass; |
211 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; | 211 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; |
212 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 212 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
213 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; | 213 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; |
@@ -241,7 +241,7 @@ nve0_identify(struct nouveau_device *device) | |||
241 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 241 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
242 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; | 242 | device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; |
243 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 243 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
244 | device->oclass[NVDEV_ENGINE_GR ] = gk110b_graph_oclass; | 244 | device->oclass[NVDEV_ENGINE_GR ] = gk110b_gr_oclass; |
245 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; | 245 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; |
246 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 246 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
247 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; | 247 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; |
@@ -275,7 +275,7 @@ nve0_identify(struct nouveau_device *device) | |||
275 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 275 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
276 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; | 276 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; |
277 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 277 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
278 | device->oclass[NVDEV_ENGINE_GR ] = nv108_graph_oclass; | 278 | device->oclass[NVDEV_ENGINE_GR ] = nv108_gr_oclass; |
279 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; | 279 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; |
280 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 280 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
281 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; | 281 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; |
@@ -308,7 +308,7 @@ nve0_identify(struct nouveau_device *device) | |||
308 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; | 308 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = nvd0_dmaeng_oclass; |
309 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; | 309 | device->oclass[NVDEV_ENGINE_FIFO ] = nv108_fifo_oclass; |
310 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; | 310 | device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; |
311 | device->oclass[NVDEV_ENGINE_GR ] = nv108_graph_oclass; | 311 | device->oclass[NVDEV_ENGINE_GR ] = nv108_gr_oclass; |
312 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; | 312 | device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; |
313 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; | 313 | device->oclass[NVDEV_ENGINE_CE0 ] = &nve0_ce0_oclass; |
314 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; | 314 | device->oclass[NVDEV_ENGINE_CE1 ] = &nve0_ce1_oclass; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild new file mode 100644 index 000000000000..ce508e85b8f0 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | |||
@@ -0,0 +1,36 @@ | |||
1 | nvkm-y += nvkm/engine/gr/ctxnv40.o | ||
2 | nvkm-y += nvkm/engine/gr/ctxnv50.o | ||
3 | nvkm-y += nvkm/engine/gr/ctxnvc0.o | ||
4 | nvkm-y += nvkm/engine/gr/ctxnvc1.o | ||
5 | nvkm-y += nvkm/engine/gr/ctxnvc4.o | ||
6 | nvkm-y += nvkm/engine/gr/ctxnvc8.o | ||
7 | nvkm-y += nvkm/engine/gr/ctxnvd7.o | ||
8 | nvkm-y += nvkm/engine/gr/ctxnvd9.o | ||
9 | nvkm-y += nvkm/engine/gr/ctxnve4.o | ||
10 | nvkm-y += nvkm/engine/gr/ctxgk20a.o | ||
11 | nvkm-y += nvkm/engine/gr/ctxnvf0.o | ||
12 | nvkm-y += nvkm/engine/gr/ctxgk110b.o | ||
13 | nvkm-y += nvkm/engine/gr/ctxnv108.o | ||
14 | nvkm-y += nvkm/engine/gr/ctxgm107.o | ||
15 | nvkm-y += nvkm/engine/gr/nv04.o | ||
16 | nvkm-y += nvkm/engine/gr/nv10.o | ||
17 | nvkm-y += nvkm/engine/gr/nv20.o | ||
18 | nvkm-y += nvkm/engine/gr/nv25.o | ||
19 | nvkm-y += nvkm/engine/gr/nv2a.o | ||
20 | nvkm-y += nvkm/engine/gr/nv30.o | ||
21 | nvkm-y += nvkm/engine/gr/nv34.o | ||
22 | nvkm-y += nvkm/engine/gr/nv35.o | ||
23 | nvkm-y += nvkm/engine/gr/nv40.o | ||
24 | nvkm-y += nvkm/engine/gr/nv50.o | ||
25 | nvkm-y += nvkm/engine/gr/nvc0.o | ||
26 | nvkm-y += nvkm/engine/gr/nvc1.o | ||
27 | nvkm-y += nvkm/engine/gr/nvc4.o | ||
28 | nvkm-y += nvkm/engine/gr/nvc8.o | ||
29 | nvkm-y += nvkm/engine/gr/nvd7.o | ||
30 | nvkm-y += nvkm/engine/gr/nvd9.o | ||
31 | nvkm-y += nvkm/engine/gr/nve4.o | ||
32 | nvkm-y += nvkm/engine/gr/gk20a.o | ||
33 | nvkm-y += nvkm/engine/gr/nvf0.o | ||
34 | nvkm-y += nvkm/engine/gr/gk110b.o | ||
35 | nvkm-y += nvkm/engine/gr/nv108.o | ||
36 | nvkm-y += nvkm/engine/gr/gm107.o | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctx.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctx.h index e1947013d3bc..e1947013d3bc 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctx.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctx.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgk110b.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c index 3adb7fe91772..05a69ca48f25 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgk110b.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | gk110b_grctx_init_sm_0[] = { | 32 | gk110b_grctx_init_sm_0[] = { |
33 | { 0x419e04, 1, 0x04, 0x00000000 }, | 33 | { 0x419e04, 1, 0x04, 0x00000000 }, |
34 | { 0x419e08, 1, 0x04, 0x0000001d }, | 34 | { 0x419e08, 1, 0x04, 0x0000001d }, |
@@ -56,7 +56,7 @@ gk110b_grctx_init_sm_0[] = { | |||
56 | {} | 56 | {} |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static const struct nvc0_graph_pack | 59 | static const struct nvc0_gr_pack |
60 | gk110b_grctx_pack_tpc[] = { | 60 | gk110b_grctx_pack_tpc[] = { |
61 | { nvd7_grctx_init_pe_0 }, | 61 | { nvd7_grctx_init_pe_0 }, |
62 | { nvf0_grctx_init_tex_0 }, | 62 | { nvf0_grctx_init_tex_0 }, |
@@ -74,12 +74,12 @@ struct nouveau_oclass * | |||
74 | gk110b_grctx_oclass = &(struct nvc0_grctx_oclass) { | 74 | gk110b_grctx_oclass = &(struct nvc0_grctx_oclass) { |
75 | .base.handle = NV_ENGCTX(GR, 0xf1), | 75 | .base.handle = NV_ENGCTX(GR, 0xf1), |
76 | .base.ofuncs = &(struct nouveau_ofuncs) { | 76 | .base.ofuncs = &(struct nouveau_ofuncs) { |
77 | .ctor = nvc0_graph_context_ctor, | 77 | .ctor = nvc0_gr_context_ctor, |
78 | .dtor = nvc0_graph_context_dtor, | 78 | .dtor = nvc0_gr_context_dtor, |
79 | .init = _nouveau_graph_context_init, | 79 | .init = _nouveau_gr_context_init, |
80 | .fini = _nouveau_graph_context_fini, | 80 | .fini = _nouveau_gr_context_fini, |
81 | .rd32 = _nouveau_graph_context_rd32, | 81 | .rd32 = _nouveau_gr_context_rd32, |
82 | .wr32 = _nouveau_graph_context_wr32, | 82 | .wr32 = _nouveau_gr_context_wr32, |
83 | }, | 83 | }, |
84 | .main = nve4_grctx_generate_main, | 84 | .main = nve4_grctx_generate_main, |
85 | .unkn = nve4_grctx_generate_unkn, | 85 | .unkn = nve4_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgk20a.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c index 36fc9831cc93..5aae94ced9ed 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include "ctxnvc0.h" | 23 | #include "ctxnvc0.h" |
24 | 24 | ||
25 | static const struct nvc0_graph_pack | 25 | static const struct nvc0_gr_pack |
26 | gk20a_grctx_pack_mthd[] = { | 26 | gk20a_grctx_pack_mthd[] = { |
27 | { nve4_grctx_init_a097_0, 0xa297 }, | 27 | { nve4_grctx_init_a097_0, 0xa297 }, |
28 | { nvc0_grctx_init_902d_0, 0x902d }, | 28 | { nvc0_grctx_init_902d_0, 0x902d }, |
@@ -33,12 +33,12 @@ struct nouveau_oclass * | |||
33 | gk20a_grctx_oclass = &(struct nvc0_grctx_oclass) { | 33 | gk20a_grctx_oclass = &(struct nvc0_grctx_oclass) { |
34 | .base.handle = NV_ENGCTX(GR, 0xea), | 34 | .base.handle = NV_ENGCTX(GR, 0xea), |
35 | .base.ofuncs = &(struct nouveau_ofuncs) { | 35 | .base.ofuncs = &(struct nouveau_ofuncs) { |
36 | .ctor = nvc0_graph_context_ctor, | 36 | .ctor = nvc0_gr_context_ctor, |
37 | .dtor = nvc0_graph_context_dtor, | 37 | .dtor = nvc0_gr_context_dtor, |
38 | .init = _nouveau_graph_context_init, | 38 | .init = _nouveau_gr_context_init, |
39 | .fini = _nouveau_graph_context_fini, | 39 | .fini = _nouveau_gr_context_fini, |
40 | .rd32 = _nouveau_graph_context_rd32, | 40 | .rd32 = _nouveau_gr_context_rd32, |
41 | .wr32 = _nouveau_graph_context_wr32, | 41 | .wr32 = _nouveau_gr_context_wr32, |
42 | }, | 42 | }, |
43 | .main = nve4_grctx_generate_main, | 43 | .main = nve4_grctx_generate_main, |
44 | .unkn = nve4_grctx_generate_unkn, | 44 | .unkn = nve4_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c index 62e918b9fa81..cf6199fe3b59 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxgm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | gm107_grctx_init_icmd_0[] = { | 32 | gm107_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x000039, 3, 0x01, 0x00000000 }, | 34 | { 0x000039, 3, 0x01, 0x00000000 }, |
@@ -287,13 +287,13 @@ gm107_grctx_init_icmd_0[] = { | |||
287 | {} | 287 | {} |
288 | }; | 288 | }; |
289 | 289 | ||
290 | static const struct nvc0_graph_pack | 290 | static const struct nvc0_gr_pack |
291 | gm107_grctx_pack_icmd[] = { | 291 | gm107_grctx_pack_icmd[] = { |
292 | { gm107_grctx_init_icmd_0 }, | 292 | { gm107_grctx_init_icmd_0 }, |
293 | {} | 293 | {} |
294 | }; | 294 | }; |
295 | 295 | ||
296 | static const struct nvc0_graph_init | 296 | static const struct nvc0_gr_init |
297 | gm107_grctx_init_b097_0[] = { | 297 | gm107_grctx_init_b097_0[] = { |
298 | { 0x000800, 8, 0x40, 0x00000000 }, | 298 | { 0x000800, 8, 0x40, 0x00000000 }, |
299 | { 0x000804, 8, 0x40, 0x00000000 }, | 299 | { 0x000804, 8, 0x40, 0x00000000 }, |
@@ -610,14 +610,14 @@ gm107_grctx_init_b097_0[] = { | |||
610 | {} | 610 | {} |
611 | }; | 611 | }; |
612 | 612 | ||
613 | static const struct nvc0_graph_pack | 613 | static const struct nvc0_gr_pack |
614 | gm107_grctx_pack_mthd[] = { | 614 | gm107_grctx_pack_mthd[] = { |
615 | { gm107_grctx_init_b097_0, 0xb097 }, | 615 | { gm107_grctx_init_b097_0, 0xb097 }, |
616 | { nvc0_grctx_init_902d_0, 0x902d }, | 616 | { nvc0_grctx_init_902d_0, 0x902d }, |
617 | {} | 617 | {} |
618 | }; | 618 | }; |
619 | 619 | ||
620 | static const struct nvc0_graph_init | 620 | static const struct nvc0_gr_init |
621 | gm107_grctx_init_fe_0[] = { | 621 | gm107_grctx_init_fe_0[] = { |
622 | { 0x404004, 8, 0x04, 0x00000000 }, | 622 | { 0x404004, 8, 0x04, 0x00000000 }, |
623 | { 0x404024, 1, 0x04, 0x0000e000 }, | 623 | { 0x404024, 1, 0x04, 0x0000e000 }, |
@@ -639,7 +639,7 @@ gm107_grctx_init_fe_0[] = { | |||
639 | {} | 639 | {} |
640 | }; | 640 | }; |
641 | 641 | ||
642 | static const struct nvc0_graph_init | 642 | static const struct nvc0_gr_init |
643 | gm107_grctx_init_ds_0[] = { | 643 | gm107_grctx_init_ds_0[] = { |
644 | { 0x405800, 1, 0x04, 0x0f8001bf }, | 644 | { 0x405800, 1, 0x04, 0x0f8001bf }, |
645 | { 0x405830, 1, 0x04, 0x0aa01000 }, | 645 | { 0x405830, 1, 0x04, 0x0aa01000 }, |
@@ -653,7 +653,7 @@ gm107_grctx_init_ds_0[] = { | |||
653 | {} | 653 | {} |
654 | }; | 654 | }; |
655 | 655 | ||
656 | static const struct nvc0_graph_init | 656 | static const struct nvc0_gr_init |
657 | gm107_grctx_init_pd_0[] = { | 657 | gm107_grctx_init_pd_0[] = { |
658 | { 0x406020, 1, 0x04, 0x07410001 }, | 658 | { 0x406020, 1, 0x04, 0x07410001 }, |
659 | { 0x406028, 4, 0x04, 0x00000001 }, | 659 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -669,7 +669,7 @@ gm107_grctx_init_pd_0[] = { | |||
669 | {} | 669 | {} |
670 | }; | 670 | }; |
671 | 671 | ||
672 | static const struct nvc0_graph_init | 672 | static const struct nvc0_gr_init |
673 | gm107_grctx_init_be_0[] = { | 673 | gm107_grctx_init_be_0[] = { |
674 | { 0x408800, 1, 0x04, 0x32802a3c }, | 674 | { 0x408800, 1, 0x04, 0x32802a3c }, |
675 | { 0x408804, 1, 0x04, 0x00000040 }, | 675 | { 0x408804, 1, 0x04, 0x00000040 }, |
@@ -682,7 +682,7 @@ gm107_grctx_init_be_0[] = { | |||
682 | {} | 682 | {} |
683 | }; | 683 | }; |
684 | 684 | ||
685 | static const struct nvc0_graph_pack | 685 | static const struct nvc0_gr_pack |
686 | gm107_grctx_pack_hub[] = { | 686 | gm107_grctx_pack_hub[] = { |
687 | { nvc0_grctx_init_main_0 }, | 687 | { nvc0_grctx_init_main_0 }, |
688 | { gm107_grctx_init_fe_0 }, | 688 | { gm107_grctx_init_fe_0 }, |
@@ -697,13 +697,13 @@ gm107_grctx_pack_hub[] = { | |||
697 | {} | 697 | {} |
698 | }; | 698 | }; |
699 | 699 | ||
700 | static const struct nvc0_graph_init | 700 | static const struct nvc0_gr_init |
701 | gm107_grctx_init_gpc_unk_0[] = { | 701 | gm107_grctx_init_gpc_unk_0[] = { |
702 | { 0x418380, 1, 0x04, 0x00000056 }, | 702 | { 0x418380, 1, 0x04, 0x00000056 }, |
703 | {} | 703 | {} |
704 | }; | 704 | }; |
705 | 705 | ||
706 | static const struct nvc0_graph_init | 706 | static const struct nvc0_gr_init |
707 | gm107_grctx_init_gpc_unk_1[] = { | 707 | gm107_grctx_init_gpc_unk_1[] = { |
708 | { 0x418600, 1, 0x04, 0x0000007f }, | 708 | { 0x418600, 1, 0x04, 0x0000007f }, |
709 | { 0x418684, 1, 0x04, 0x0000001f }, | 709 | { 0x418684, 1, 0x04, 0x0000001f }, |
@@ -714,7 +714,7 @@ gm107_grctx_init_gpc_unk_1[] = { | |||
714 | {} | 714 | {} |
715 | }; | 715 | }; |
716 | 716 | ||
717 | static const struct nvc0_graph_init | 717 | static const struct nvc0_gr_init |
718 | gm107_grctx_init_setup_0[] = { | 718 | gm107_grctx_init_setup_0[] = { |
719 | { 0x418800, 1, 0x04, 0x7006863a }, | 719 | { 0x418800, 1, 0x04, 0x7006863a }, |
720 | { 0x418810, 1, 0x04, 0x00000000 }, | 720 | { 0x418810, 1, 0x04, 0x00000000 }, |
@@ -727,7 +727,7 @@ gm107_grctx_init_setup_0[] = { | |||
727 | {} | 727 | {} |
728 | }; | 728 | }; |
729 | 729 | ||
730 | static const struct nvc0_graph_init | 730 | static const struct nvc0_gr_init |
731 | gm107_grctx_init_gpc_unk_2[] = { | 731 | gm107_grctx_init_gpc_unk_2[] = { |
732 | { 0x418d24, 1, 0x04, 0x00000000 }, | 732 | { 0x418d24, 1, 0x04, 0x00000000 }, |
733 | { 0x418e00, 1, 0x04, 0x90000000 }, | 733 | { 0x418e00, 1, 0x04, 0x90000000 }, |
@@ -741,7 +741,7 @@ gm107_grctx_init_gpc_unk_2[] = { | |||
741 | {} | 741 | {} |
742 | }; | 742 | }; |
743 | 743 | ||
744 | static const struct nvc0_graph_pack | 744 | static const struct nvc0_gr_pack |
745 | gm107_grctx_pack_gpc[] = { | 745 | gm107_grctx_pack_gpc[] = { |
746 | { gm107_grctx_init_gpc_unk_0 }, | 746 | { gm107_grctx_init_gpc_unk_0 }, |
747 | { nv108_grctx_init_prop_0 }, | 747 | { nv108_grctx_init_prop_0 }, |
@@ -755,7 +755,7 @@ gm107_grctx_pack_gpc[] = { | |||
755 | {} | 755 | {} |
756 | }; | 756 | }; |
757 | 757 | ||
758 | static const struct nvc0_graph_init | 758 | static const struct nvc0_gr_init |
759 | gm107_grctx_init_tex_0[] = { | 759 | gm107_grctx_init_tex_0[] = { |
760 | { 0x419a00, 1, 0x04, 0x000300f0 }, | 760 | { 0x419a00, 1, 0x04, 0x000300f0 }, |
761 | { 0x419a04, 1, 0x04, 0x00000005 }, | 761 | { 0x419a04, 1, 0x04, 0x00000005 }, |
@@ -771,7 +771,7 @@ gm107_grctx_init_tex_0[] = { | |||
771 | {} | 771 | {} |
772 | }; | 772 | }; |
773 | 773 | ||
774 | static const struct nvc0_graph_init | 774 | static const struct nvc0_gr_init |
775 | gm107_grctx_init_mpc_0[] = { | 775 | gm107_grctx_init_mpc_0[] = { |
776 | { 0x419c00, 1, 0x04, 0x0000001a }, | 776 | { 0x419c00, 1, 0x04, 0x0000001a }, |
777 | { 0x419c04, 1, 0x04, 0x80000006 }, | 777 | { 0x419c04, 1, 0x04, 0x80000006 }, |
@@ -785,13 +785,13 @@ gm107_grctx_init_mpc_0[] = { | |||
785 | {} | 785 | {} |
786 | }; | 786 | }; |
787 | 787 | ||
788 | static const struct nvc0_graph_init | 788 | static const struct nvc0_gr_init |
789 | gm107_grctx_init_l1c_0[] = { | 789 | gm107_grctx_init_l1c_0[] = { |
790 | { 0x419c84, 1, 0x04, 0x00000020 }, | 790 | { 0x419c84, 1, 0x04, 0x00000020 }, |
791 | {} | 791 | {} |
792 | }; | 792 | }; |
793 | 793 | ||
794 | static const struct nvc0_graph_init | 794 | static const struct nvc0_gr_init |
795 | gm107_grctx_init_sm_0[] = { | 795 | gm107_grctx_init_sm_0[] = { |
796 | { 0x419e04, 3, 0x04, 0x00000000 }, | 796 | { 0x419e04, 3, 0x04, 0x00000000 }, |
797 | { 0x419e10, 1, 0x04, 0x00001c02 }, | 797 | { 0x419e10, 1, 0x04, 0x00001c02 }, |
@@ -812,7 +812,7 @@ gm107_grctx_init_sm_0[] = { | |||
812 | {} | 812 | {} |
813 | }; | 813 | }; |
814 | 814 | ||
815 | static const struct nvc0_graph_pack | 815 | static const struct nvc0_gr_pack |
816 | gm107_grctx_pack_tpc[] = { | 816 | gm107_grctx_pack_tpc[] = { |
817 | { nvd7_grctx_init_pe_0 }, | 817 | { nvd7_grctx_init_pe_0 }, |
818 | { gm107_grctx_init_tex_0 }, | 818 | { gm107_grctx_init_tex_0 }, |
@@ -822,7 +822,7 @@ gm107_grctx_pack_tpc[] = { | |||
822 | {} | 822 | {} |
823 | }; | 823 | }; |
824 | 824 | ||
825 | static const struct nvc0_graph_init | 825 | static const struct nvc0_gr_init |
826 | gm107_grctx_init_cbm_0[] = { | 826 | gm107_grctx_init_cbm_0[] = { |
827 | { 0x41bec0, 1, 0x04, 0x00000000 }, | 827 | { 0x41bec0, 1, 0x04, 0x00000000 }, |
828 | { 0x41bec4, 1, 0x04, 0x01050000 }, | 828 | { 0x41bec4, 1, 0x04, 0x01050000 }, |
@@ -832,7 +832,7 @@ gm107_grctx_init_cbm_0[] = { | |||
832 | {} | 832 | {} |
833 | }; | 833 | }; |
834 | 834 | ||
835 | static const struct nvc0_graph_init | 835 | static const struct nvc0_gr_init |
836 | gm107_grctx_init_wwdx_0[] = { | 836 | gm107_grctx_init_wwdx_0[] = { |
837 | { 0x41bf00, 1, 0x04, 0x0a418820 }, | 837 | { 0x41bf00, 1, 0x04, 0x0a418820 }, |
838 | { 0x41bf04, 1, 0x04, 0x062080e6 }, | 838 | { 0x41bf04, 1, 0x04, 0x062080e6 }, |
@@ -846,7 +846,7 @@ gm107_grctx_init_wwdx_0[] = { | |||
846 | {} | 846 | {} |
847 | }; | 847 | }; |
848 | 848 | ||
849 | static const struct nvc0_graph_pack | 849 | static const struct nvc0_gr_pack |
850 | gm107_grctx_pack_ppc[] = { | 850 | gm107_grctx_pack_ppc[] = { |
851 | { nve4_grctx_init_pes_0 }, | 851 | { nve4_grctx_init_pes_0 }, |
852 | { gm107_grctx_init_cbm_0 }, | 852 | { gm107_grctx_init_cbm_0 }, |
@@ -893,7 +893,7 @@ gm107_grctx_generate_pagepool(struct nvc0_grctx *info) | |||
893 | static void | 893 | static void |
894 | gm107_grctx_generate_attrib(struct nvc0_grctx *info) | 894 | gm107_grctx_generate_attrib(struct nvc0_grctx *info) |
895 | { | 895 | { |
896 | struct nvc0_graph_priv *priv = info->priv; | 896 | struct nvc0_gr_priv *priv = info->priv; |
897 | const struct nvc0_grctx_oclass *impl = (void *)nvc0_grctx_impl(priv); | 897 | const struct nvc0_grctx_oclass *impl = (void *)nvc0_grctx_impl(priv); |
898 | const u32 alpha = impl->alpha_nr; | 898 | const u32 alpha = impl->alpha_nr; |
899 | const u32 attrib = impl->attrib_nr; | 899 | const u32 attrib = impl->attrib_nr; |
@@ -930,7 +930,7 @@ gm107_grctx_generate_attrib(struct nvc0_grctx *info) | |||
930 | } | 930 | } |
931 | 931 | ||
932 | static void | 932 | static void |
933 | gm107_grctx_generate_tpcid(struct nvc0_graph_priv *priv) | 933 | gm107_grctx_generate_tpcid(struct nvc0_gr_priv *priv) |
934 | { | 934 | { |
935 | int gpc, tpc, id; | 935 | int gpc, tpc, id; |
936 | 936 | ||
@@ -950,16 +950,16 @@ gm107_grctx_generate_tpcid(struct nvc0_graph_priv *priv) | |||
950 | } | 950 | } |
951 | 951 | ||
952 | static void | 952 | static void |
953 | gm107_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | 953 | gm107_grctx_generate_main(struct nvc0_gr_priv *priv, struct nvc0_grctx *info) |
954 | { | 954 | { |
955 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; | 955 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; |
956 | int i; | 956 | int i; |
957 | 957 | ||
958 | nvc0_graph_mmio(priv, oclass->hub); | 958 | nvc0_gr_mmio(priv, oclass->hub); |
959 | nvc0_graph_mmio(priv, oclass->gpc); | 959 | nvc0_gr_mmio(priv, oclass->gpc); |
960 | nvc0_graph_mmio(priv, oclass->zcull); | 960 | nvc0_gr_mmio(priv, oclass->zcull); |
961 | nvc0_graph_mmio(priv, oclass->tpc); | 961 | nvc0_gr_mmio(priv, oclass->tpc); |
962 | nvc0_graph_mmio(priv, oclass->ppc); | 962 | nvc0_gr_mmio(priv, oclass->ppc); |
963 | 963 | ||
964 | nv_wr32(priv, 0x404154, 0x00000000); | 964 | nv_wr32(priv, 0x404154, 0x00000000); |
965 | 965 | ||
@@ -988,9 +988,9 @@ gm107_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | |||
988 | nv_mask(priv, 0x408958, 0x0000000f, priv->gpc_nr); | 988 | nv_mask(priv, 0x408958, 0x0000000f, priv->gpc_nr); |
989 | } | 989 | } |
990 | 990 | ||
991 | nvc0_graph_icmd(priv, oclass->icmd); | 991 | nvc0_gr_icmd(priv, oclass->icmd); |
992 | nv_wr32(priv, 0x404154, 0x00000400); | 992 | nv_wr32(priv, 0x404154, 0x00000400); |
993 | nvc0_graph_mthd(priv, oclass->mthd); | 993 | nvc0_gr_mthd(priv, oclass->mthd); |
994 | 994 | ||
995 | nv_mask(priv, 0x419e00, 0x00808080, 0x00808080); | 995 | nv_mask(priv, 0x419e00, 0x00808080, 0x00808080); |
996 | nv_mask(priv, 0x419ccc, 0x80000000, 0x80000000); | 996 | nv_mask(priv, 0x419ccc, 0x80000000, 0x80000000); |
@@ -1002,12 +1002,12 @@ struct nouveau_oclass * | |||
1002 | gm107_grctx_oclass = &(struct nvc0_grctx_oclass) { | 1002 | gm107_grctx_oclass = &(struct nvc0_grctx_oclass) { |
1003 | .base.handle = NV_ENGCTX(GR, 0x08), | 1003 | .base.handle = NV_ENGCTX(GR, 0x08), |
1004 | .base.ofuncs = &(struct nouveau_ofuncs) { | 1004 | .base.ofuncs = &(struct nouveau_ofuncs) { |
1005 | .ctor = nvc0_graph_context_ctor, | 1005 | .ctor = nvc0_gr_context_ctor, |
1006 | .dtor = nvc0_graph_context_dtor, | 1006 | .dtor = nvc0_gr_context_dtor, |
1007 | .init = _nouveau_graph_context_init, | 1007 | .init = _nouveau_gr_context_init, |
1008 | .fini = _nouveau_graph_context_fini, | 1008 | .fini = _nouveau_gr_context_fini, |
1009 | .rd32 = _nouveau_graph_context_rd32, | 1009 | .rd32 = _nouveau_gr_context_rd32, |
1010 | .wr32 = _nouveau_graph_context_wr32, | 1010 | .wr32 = _nouveau_gr_context_wr32, |
1011 | }, | 1011 | }, |
1012 | .main = gm107_grctx_generate_main, | 1012 | .main = gm107_grctx_generate_main, |
1013 | .unkn = nve4_grctx_generate_unkn, | 1013 | .unkn = nve4_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv108.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv108.c index ce252adbef81..f56d77e307c1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv108.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv108.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nv108_grctx_init_icmd_0[] = { | 32 | nv108_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x000039, 3, 0x01, 0x00000000 }, | 34 | { 0x000039, 3, 0x01, 0x00000000 }, |
@@ -278,13 +278,13 @@ nv108_grctx_init_icmd_0[] = { | |||
278 | {} | 278 | {} |
279 | }; | 279 | }; |
280 | 280 | ||
281 | static const struct nvc0_graph_pack | 281 | static const struct nvc0_gr_pack |
282 | nv108_grctx_pack_icmd[] = { | 282 | nv108_grctx_pack_icmd[] = { |
283 | { nv108_grctx_init_icmd_0 }, | 283 | { nv108_grctx_init_icmd_0 }, |
284 | {} | 284 | {} |
285 | }; | 285 | }; |
286 | 286 | ||
287 | static const struct nvc0_graph_init | 287 | static const struct nvc0_gr_init |
288 | nv108_grctx_init_fe_0[] = { | 288 | nv108_grctx_init_fe_0[] = { |
289 | { 0x404004, 8, 0x04, 0x00000000 }, | 289 | { 0x404004, 8, 0x04, 0x00000000 }, |
290 | { 0x404024, 1, 0x04, 0x0000e000 }, | 290 | { 0x404024, 1, 0x04, 0x0000e000 }, |
@@ -311,7 +311,7 @@ nv108_grctx_init_fe_0[] = { | |||
311 | {} | 311 | {} |
312 | }; | 312 | }; |
313 | 313 | ||
314 | static const struct nvc0_graph_init | 314 | static const struct nvc0_gr_init |
315 | nv108_grctx_init_ds_0[] = { | 315 | nv108_grctx_init_ds_0[] = { |
316 | { 0x405800, 1, 0x04, 0x0f8000bf }, | 316 | { 0x405800, 1, 0x04, 0x0f8000bf }, |
317 | { 0x405830, 1, 0x04, 0x02180648 }, | 317 | { 0x405830, 1, 0x04, 0x02180648 }, |
@@ -325,7 +325,7 @@ nv108_grctx_init_ds_0[] = { | |||
325 | {} | 325 | {} |
326 | }; | 326 | }; |
327 | 327 | ||
328 | static const struct nvc0_graph_init | 328 | static const struct nvc0_gr_init |
329 | nv108_grctx_init_pd_0[] = { | 329 | nv108_grctx_init_pd_0[] = { |
330 | { 0x406020, 1, 0x04, 0x034103c1 }, | 330 | { 0x406020, 1, 0x04, 0x034103c1 }, |
331 | { 0x406028, 4, 0x04, 0x00000001 }, | 331 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -340,7 +340,7 @@ nv108_grctx_init_pd_0[] = { | |||
340 | {} | 340 | {} |
341 | }; | 341 | }; |
342 | 342 | ||
343 | const struct nvc0_graph_init | 343 | const struct nvc0_gr_init |
344 | nv108_grctx_init_rstr2d_0[] = { | 344 | nv108_grctx_init_rstr2d_0[] = { |
345 | { 0x407804, 1, 0x04, 0x00000063 }, | 345 | { 0x407804, 1, 0x04, 0x00000063 }, |
346 | { 0x40780c, 1, 0x04, 0x0a418820 }, | 346 | { 0x40780c, 1, 0x04, 0x0a418820 }, |
@@ -353,7 +353,7 @@ nv108_grctx_init_rstr2d_0[] = { | |||
353 | {} | 353 | {} |
354 | }; | 354 | }; |
355 | 355 | ||
356 | static const struct nvc0_graph_init | 356 | static const struct nvc0_gr_init |
357 | nv108_grctx_init_be_0[] = { | 357 | nv108_grctx_init_be_0[] = { |
358 | { 0x408800, 1, 0x04, 0x32802a3c }, | 358 | { 0x408800, 1, 0x04, 0x32802a3c }, |
359 | { 0x408804, 1, 0x04, 0x00000040 }, | 359 | { 0x408804, 1, 0x04, 0x00000040 }, |
@@ -366,7 +366,7 @@ nv108_grctx_init_be_0[] = { | |||
366 | {} | 366 | {} |
367 | }; | 367 | }; |
368 | 368 | ||
369 | static const struct nvc0_graph_pack | 369 | static const struct nvc0_gr_pack |
370 | nv108_grctx_pack_hub[] = { | 370 | nv108_grctx_pack_hub[] = { |
371 | { nvc0_grctx_init_main_0 }, | 371 | { nvc0_grctx_init_main_0 }, |
372 | { nv108_grctx_init_fe_0 }, | 372 | { nv108_grctx_init_fe_0 }, |
@@ -381,7 +381,7 @@ nv108_grctx_pack_hub[] = { | |||
381 | {} | 381 | {} |
382 | }; | 382 | }; |
383 | 383 | ||
384 | const struct nvc0_graph_init | 384 | const struct nvc0_gr_init |
385 | nv108_grctx_init_prop_0[] = { | 385 | nv108_grctx_init_prop_0[] = { |
386 | { 0x418400, 1, 0x04, 0x38005e00 }, | 386 | { 0x418400, 1, 0x04, 0x38005e00 }, |
387 | { 0x418404, 1, 0x04, 0x71e0ffff }, | 387 | { 0x418404, 1, 0x04, 0x71e0ffff }, |
@@ -394,7 +394,7 @@ nv108_grctx_init_prop_0[] = { | |||
394 | {} | 394 | {} |
395 | }; | 395 | }; |
396 | 396 | ||
397 | static const struct nvc0_graph_init | 397 | static const struct nvc0_gr_init |
398 | nv108_grctx_init_gpc_unk_1[] = { | 398 | nv108_grctx_init_gpc_unk_1[] = { |
399 | { 0x418600, 1, 0x04, 0x0000007f }, | 399 | { 0x418600, 1, 0x04, 0x0000007f }, |
400 | { 0x418684, 1, 0x04, 0x0000001f }, | 400 | { 0x418684, 1, 0x04, 0x0000001f }, |
@@ -404,7 +404,7 @@ nv108_grctx_init_gpc_unk_1[] = { | |||
404 | {} | 404 | {} |
405 | }; | 405 | }; |
406 | 406 | ||
407 | static const struct nvc0_graph_init | 407 | static const struct nvc0_gr_init |
408 | nv108_grctx_init_setup_0[] = { | 408 | nv108_grctx_init_setup_0[] = { |
409 | { 0x418800, 1, 0x04, 0x7006863a }, | 409 | { 0x418800, 1, 0x04, 0x7006863a }, |
410 | { 0x418808, 1, 0x04, 0x00000000 }, | 410 | { 0x418808, 1, 0x04, 0x00000000 }, |
@@ -419,7 +419,7 @@ nv108_grctx_init_setup_0[] = { | |||
419 | {} | 419 | {} |
420 | }; | 420 | }; |
421 | 421 | ||
422 | const struct nvc0_graph_init | 422 | const struct nvc0_gr_init |
423 | nv108_grctx_init_crstr_0[] = { | 423 | nv108_grctx_init_crstr_0[] = { |
424 | { 0x418b00, 1, 0x04, 0x0000001e }, | 424 | { 0x418b00, 1, 0x04, 0x0000001e }, |
425 | { 0x418b08, 1, 0x04, 0x0a418820 }, | 425 | { 0x418b08, 1, 0x04, 0x0a418820 }, |
@@ -432,7 +432,7 @@ nv108_grctx_init_crstr_0[] = { | |||
432 | {} | 432 | {} |
433 | }; | 433 | }; |
434 | 434 | ||
435 | static const struct nvc0_graph_init | 435 | static const struct nvc0_gr_init |
436 | nv108_grctx_init_gpm_0[] = { | 436 | nv108_grctx_init_gpm_0[] = { |
437 | { 0x418c08, 1, 0x04, 0x00000001 }, | 437 | { 0x418c08, 1, 0x04, 0x00000001 }, |
438 | { 0x418c10, 8, 0x04, 0x00000000 }, | 438 | { 0x418c10, 8, 0x04, 0x00000000 }, |
@@ -443,7 +443,7 @@ nv108_grctx_init_gpm_0[] = { | |||
443 | {} | 443 | {} |
444 | }; | 444 | }; |
445 | 445 | ||
446 | static const struct nvc0_graph_pack | 446 | static const struct nvc0_gr_pack |
447 | nv108_grctx_pack_gpc[] = { | 447 | nv108_grctx_pack_gpc[] = { |
448 | { nvc0_grctx_init_gpc_unk_0 }, | 448 | { nvc0_grctx_init_gpc_unk_0 }, |
449 | { nv108_grctx_init_prop_0 }, | 449 | { nv108_grctx_init_prop_0 }, |
@@ -457,7 +457,7 @@ nv108_grctx_pack_gpc[] = { | |||
457 | {} | 457 | {} |
458 | }; | 458 | }; |
459 | 459 | ||
460 | static const struct nvc0_graph_init | 460 | static const struct nvc0_gr_init |
461 | nv108_grctx_init_tex_0[] = { | 461 | nv108_grctx_init_tex_0[] = { |
462 | { 0x419a00, 1, 0x04, 0x000100f0 }, | 462 | { 0x419a00, 1, 0x04, 0x000100f0 }, |
463 | { 0x419a04, 1, 0x04, 0x00000001 }, | 463 | { 0x419a04, 1, 0x04, 0x00000001 }, |
@@ -472,7 +472,7 @@ nv108_grctx_init_tex_0[] = { | |||
472 | {} | 472 | {} |
473 | }; | 473 | }; |
474 | 474 | ||
475 | static const struct nvc0_graph_init | 475 | static const struct nvc0_gr_init |
476 | nv108_grctx_init_sm_0[] = { | 476 | nv108_grctx_init_sm_0[] = { |
477 | { 0x419e04, 1, 0x04, 0x00000000 }, | 477 | { 0x419e04, 1, 0x04, 0x00000000 }, |
478 | { 0x419e08, 1, 0x04, 0x0000001d }, | 478 | { 0x419e08, 1, 0x04, 0x0000001d }, |
@@ -500,7 +500,7 @@ nv108_grctx_init_sm_0[] = { | |||
500 | {} | 500 | {} |
501 | }; | 501 | }; |
502 | 502 | ||
503 | static const struct nvc0_graph_pack | 503 | static const struct nvc0_gr_pack |
504 | nv108_grctx_pack_tpc[] = { | 504 | nv108_grctx_pack_tpc[] = { |
505 | { nvd7_grctx_init_pe_0 }, | 505 | { nvd7_grctx_init_pe_0 }, |
506 | { nv108_grctx_init_tex_0 }, | 506 | { nv108_grctx_init_tex_0 }, |
@@ -510,7 +510,7 @@ nv108_grctx_pack_tpc[] = { | |||
510 | {} | 510 | {} |
511 | }; | 511 | }; |
512 | 512 | ||
513 | static const struct nvc0_graph_init | 513 | static const struct nvc0_gr_init |
514 | nv108_grctx_init_cbm_0[] = { | 514 | nv108_grctx_init_cbm_0[] = { |
515 | { 0x41bec0, 1, 0x04, 0x10000000 }, | 515 | { 0x41bec0, 1, 0x04, 0x10000000 }, |
516 | { 0x41bec4, 1, 0x04, 0x00037f7f }, | 516 | { 0x41bec4, 1, 0x04, 0x00037f7f }, |
@@ -519,7 +519,7 @@ nv108_grctx_init_cbm_0[] = { | |||
519 | {} | 519 | {} |
520 | }; | 520 | }; |
521 | 521 | ||
522 | static const struct nvc0_graph_pack | 522 | static const struct nvc0_gr_pack |
523 | nv108_grctx_pack_ppc[] = { | 523 | nv108_grctx_pack_ppc[] = { |
524 | { nve4_grctx_init_pes_0 }, | 524 | { nve4_grctx_init_pes_0 }, |
525 | { nv108_grctx_init_cbm_0 }, | 525 | { nv108_grctx_init_cbm_0 }, |
@@ -535,12 +535,12 @@ struct nouveau_oclass * | |||
535 | nv108_grctx_oclass = &(struct nvc0_grctx_oclass) { | 535 | nv108_grctx_oclass = &(struct nvc0_grctx_oclass) { |
536 | .base.handle = NV_ENGCTX(GR, 0x08), | 536 | .base.handle = NV_ENGCTX(GR, 0x08), |
537 | .base.ofuncs = &(struct nouveau_ofuncs) { | 537 | .base.ofuncs = &(struct nouveau_ofuncs) { |
538 | .ctor = nvc0_graph_context_ctor, | 538 | .ctor = nvc0_gr_context_ctor, |
539 | .dtor = nvc0_graph_context_dtor, | 539 | .dtor = nvc0_gr_context_dtor, |
540 | .init = _nouveau_graph_context_init, | 540 | .init = _nouveau_gr_context_init, |
541 | .fini = _nouveau_graph_context_fini, | 541 | .fini = _nouveau_gr_context_fini, |
542 | .rd32 = _nouveau_graph_context_rd32, | 542 | .rd32 = _nouveau_gr_context_rd32, |
543 | .wr32 = _nouveau_graph_context_wr32, | 543 | .wr32 = _nouveau_gr_context_wr32, |
544 | }, | 544 | }, |
545 | .main = nve4_grctx_generate_main, | 545 | .main = nve4_grctx_generate_main, |
546 | .unkn = nve4_grctx_generate_unkn, | 546 | .unkn = nve4_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv40.c index 7bbb1e1b7a8d..9e311411f1b1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv40.c | |||
@@ -119,7 +119,7 @@ | |||
119 | */ | 119 | */ |
120 | 120 | ||
121 | static int | 121 | static int |
122 | nv40_graph_vs_count(struct nouveau_device *device) | 122 | nv40_gr_vs_count(struct nouveau_device *device) |
123 | { | 123 | { |
124 | 124 | ||
125 | switch (device->chipset) { | 125 | switch (device->chipset) { |
@@ -158,7 +158,7 @@ enum cp_label { | |||
158 | }; | 158 | }; |
159 | 159 | ||
160 | static void | 160 | static void |
161 | nv40_graph_construct_general(struct nouveau_grctx *ctx) | 161 | nv40_gr_construct_general(struct nouveau_grctx *ctx) |
162 | { | 162 | { |
163 | struct nouveau_device *device = ctx->device; | 163 | struct nouveau_device *device = ctx->device; |
164 | int i; | 164 | int i; |
@@ -208,7 +208,7 @@ nv40_graph_construct_general(struct nouveau_grctx *ctx) | |||
208 | gr_def(ctx, 0x4009dc, 0x80000000); | 208 | gr_def(ctx, 0x4009dc, 0x80000000); |
209 | } else { | 209 | } else { |
210 | cp_ctx(ctx, 0x400840, 20); | 210 | cp_ctx(ctx, 0x400840, 20); |
211 | if (nv44_graph_class(ctx->device)) { | 211 | if (nv44_gr_class(ctx->device)) { |
212 | for (i = 0; i < 8; i++) | 212 | for (i = 0; i < 8; i++) |
213 | gr_def(ctx, 0x400860 + (i * 4), 0x00000001); | 213 | gr_def(ctx, 0x400860 + (i * 4), 0x00000001); |
214 | } | 214 | } |
@@ -217,7 +217,7 @@ nv40_graph_construct_general(struct nouveau_grctx *ctx) | |||
217 | gr_def(ctx, 0x400888, 0x00000040); | 217 | gr_def(ctx, 0x400888, 0x00000040); |
218 | cp_ctx(ctx, 0x400894, 11); | 218 | cp_ctx(ctx, 0x400894, 11); |
219 | gr_def(ctx, 0x400894, 0x00000040); | 219 | gr_def(ctx, 0x400894, 0x00000040); |
220 | if (!nv44_graph_class(ctx->device)) { | 220 | if (!nv44_gr_class(ctx->device)) { |
221 | for (i = 0; i < 8; i++) | 221 | for (i = 0; i < 8; i++) |
222 | gr_def(ctx, 0x4008a0 + (i * 4), 0x80000000); | 222 | gr_def(ctx, 0x4008a0 + (i * 4), 0x80000000); |
223 | } | 223 | } |
@@ -264,7 +264,7 @@ nv40_graph_construct_general(struct nouveau_grctx *ctx) | |||
264 | } | 264 | } |
265 | 265 | ||
266 | static void | 266 | static void |
267 | nv40_graph_construct_state3d(struct nouveau_grctx *ctx) | 267 | nv40_gr_construct_state3d(struct nouveau_grctx *ctx) |
268 | { | 268 | { |
269 | struct nouveau_device *device = ctx->device; | 269 | struct nouveau_device *device = ctx->device; |
270 | int i; | 270 | int i; |
@@ -369,7 +369,7 @@ nv40_graph_construct_state3d(struct nouveau_grctx *ctx) | |||
369 | } | 369 | } |
370 | 370 | ||
371 | static void | 371 | static void |
372 | nv40_graph_construct_state3d_2(struct nouveau_grctx *ctx) | 372 | nv40_gr_construct_state3d_2(struct nouveau_grctx *ctx) |
373 | { | 373 | { |
374 | struct nouveau_device *device = ctx->device; | 374 | struct nouveau_device *device = ctx->device; |
375 | int i; | 375 | int i; |
@@ -504,8 +504,8 @@ nv40_graph_construct_state3d_2(struct nouveau_grctx *ctx) | |||
504 | 504 | ||
505 | cp_ctx(ctx, 0x403400, device->chipset == 0x40 ? 4 : 3); | 505 | cp_ctx(ctx, 0x403400, device->chipset == 0x40 ? 4 : 3); |
506 | cp_ctx(ctx, 0x403410, device->chipset == 0x40 ? 4 : 3); | 506 | cp_ctx(ctx, 0x403410, device->chipset == 0x40 ? 4 : 3); |
507 | cp_ctx(ctx, 0x403420, nv40_graph_vs_count(ctx->device)); | 507 | cp_ctx(ctx, 0x403420, nv40_gr_vs_count(ctx->device)); |
508 | for (i = 0; i < nv40_graph_vs_count(ctx->device); i++) | 508 | for (i = 0; i < nv40_gr_vs_count(ctx->device); i++) |
509 | gr_def(ctx, 0x403420 + (i * 4), 0x00005555); | 509 | gr_def(ctx, 0x403420 + (i * 4), 0x00005555); |
510 | 510 | ||
511 | if (device->chipset != 0x40) { | 511 | if (device->chipset != 0x40) { |
@@ -533,9 +533,9 @@ nv40_graph_construct_state3d_2(struct nouveau_grctx *ctx) | |||
533 | } | 533 | } |
534 | 534 | ||
535 | static void | 535 | static void |
536 | nv40_graph_construct_state3d_3(struct nouveau_grctx *ctx) | 536 | nv40_gr_construct_state3d_3(struct nouveau_grctx *ctx) |
537 | { | 537 | { |
538 | int len = nv44_graph_class(ctx->device) ? 0x0084 : 0x0684; | 538 | int len = nv44_gr_class(ctx->device) ? 0x0084 : 0x0684; |
539 | 539 | ||
540 | cp_out (ctx, 0x300000); | 540 | cp_out (ctx, 0x300000); |
541 | cp_lsr (ctx, len - 4); | 541 | cp_lsr (ctx, len - 4); |
@@ -548,14 +548,14 @@ nv40_graph_construct_state3d_3(struct nouveau_grctx *ctx) | |||
548 | } | 548 | } |
549 | 549 | ||
550 | static void | 550 | static void |
551 | nv40_graph_construct_shader(struct nouveau_grctx *ctx) | 551 | nv40_gr_construct_shader(struct nouveau_grctx *ctx) |
552 | { | 552 | { |
553 | struct nouveau_device *device = ctx->device; | 553 | struct nouveau_device *device = ctx->device; |
554 | struct nouveau_gpuobj *obj = ctx->data; | 554 | struct nouveau_gpuobj *obj = ctx->data; |
555 | int vs, vs_nr, vs_len, vs_nr_b0, vs_nr_b1, b0_offset, b1_offset; | 555 | int vs, vs_nr, vs_len, vs_nr_b0, vs_nr_b1, b0_offset, b1_offset; |
556 | int offset, i; | 556 | int offset, i; |
557 | 557 | ||
558 | vs_nr = nv40_graph_vs_count(ctx->device); | 558 | vs_nr = nv40_gr_vs_count(ctx->device); |
559 | vs_nr_b0 = 363; | 559 | vs_nr_b0 = 363; |
560 | vs_nr_b1 = device->chipset == 0x40 ? 128 : 64; | 560 | vs_nr_b1 = device->chipset == 0x40 ? 128 : 64; |
561 | if (device->chipset == 0x40) { | 561 | if (device->chipset == 0x40) { |
@@ -570,11 +570,11 @@ nv40_graph_construct_shader(struct nouveau_grctx *ctx) | |||
570 | } else { | 570 | } else { |
571 | b0_offset = 0x1d40/4; /* 2200 */ | 571 | b0_offset = 0x1d40/4; /* 2200 */ |
572 | b1_offset = 0x3f40/4; /* 0b00 : 0a40 */ | 572 | b1_offset = 0x3f40/4; /* 0b00 : 0a40 */ |
573 | vs_len = nv44_graph_class(device) ? 0x4980/4 : 0x4a40/4; | 573 | vs_len = nv44_gr_class(device) ? 0x4980/4 : 0x4a40/4; |
574 | } | 574 | } |
575 | 575 | ||
576 | cp_lsr(ctx, vs_len * vs_nr + 0x300/4); | 576 | cp_lsr(ctx, vs_len * vs_nr + 0x300/4); |
577 | cp_out(ctx, nv44_graph_class(device) ? 0x800029 : 0x800041); | 577 | cp_out(ctx, nv44_gr_class(device) ? 0x800029 : 0x800041); |
578 | 578 | ||
579 | offset = ctx->ctxvals_pos; | 579 | offset = ctx->ctxvals_pos; |
580 | ctx->ctxvals_pos += (0x0300/4 + (vs_nr * vs_len)); | 580 | ctx->ctxvals_pos += (0x0300/4 + (vs_nr * vs_len)); |
@@ -629,23 +629,23 @@ nv40_grctx_generate(struct nouveau_grctx *ctx) | |||
629 | /* general PGRAPH state */ | 629 | /* general PGRAPH state */ |
630 | cp_name(ctx, cp_swap_state); | 630 | cp_name(ctx, cp_swap_state); |
631 | cp_pos (ctx, 0x00020/4); | 631 | cp_pos (ctx, 0x00020/4); |
632 | nv40_graph_construct_general(ctx); | 632 | nv40_gr_construct_general(ctx); |
633 | cp_wait(ctx, STATUS, IDLE); | 633 | cp_wait(ctx, STATUS, IDLE); |
634 | 634 | ||
635 | /* 3D state, block 1 */ | 635 | /* 3D state, block 1 */ |
636 | cp_bra (ctx, UNK54, CLEAR, cp_prepare_exit); | 636 | cp_bra (ctx, UNK54, CLEAR, cp_prepare_exit); |
637 | nv40_graph_construct_state3d(ctx); | 637 | nv40_gr_construct_state3d(ctx); |
638 | cp_wait(ctx, STATUS, IDLE); | 638 | cp_wait(ctx, STATUS, IDLE); |
639 | 639 | ||
640 | /* 3D state, block 2 */ | 640 | /* 3D state, block 2 */ |
641 | nv40_graph_construct_state3d_2(ctx); | 641 | nv40_gr_construct_state3d_2(ctx); |
642 | 642 | ||
643 | /* Some other block of "random" state */ | 643 | /* Some other block of "random" state */ |
644 | nv40_graph_construct_state3d_3(ctx); | 644 | nv40_gr_construct_state3d_3(ctx); |
645 | 645 | ||
646 | /* Per-vertex shader state */ | 646 | /* Per-vertex shader state */ |
647 | cp_pos (ctx, ctx->ctxvals_pos); | 647 | cp_pos (ctx, ctx->ctxvals_pos); |
648 | nv40_graph_construct_shader(ctx); | 648 | nv40_gr_construct_shader(ctx); |
649 | 649 | ||
650 | /* pre-exit state updates */ | 650 | /* pre-exit state updates */ |
651 | cp_name(ctx, cp_prepare_exit); | 651 | cp_name(ctx, cp_prepare_exit); |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c index 1d0e33fb5f61..8b7d879a7fa1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnv50.c | |||
@@ -169,9 +169,9 @@ enum cp_label { | |||
169 | cp_exit, | 169 | cp_exit, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | static void nv50_graph_construct_mmio(struct nouveau_grctx *ctx); | 172 | static void nv50_gr_construct_mmio(struct nouveau_grctx *ctx); |
173 | static void nv50_graph_construct_xfer1(struct nouveau_grctx *ctx); | 173 | static void nv50_gr_construct_xfer1(struct nouveau_grctx *ctx); |
174 | static void nv50_graph_construct_xfer2(struct nouveau_grctx *ctx); | 174 | static void nv50_gr_construct_xfer2(struct nouveau_grctx *ctx); |
175 | 175 | ||
176 | /* Main function: construct the ctxprog skeleton, call the other functions. */ | 176 | /* Main function: construct the ctxprog skeleton, call the other functions. */ |
177 | 177 | ||
@@ -219,9 +219,9 @@ nv50_grctx_generate(struct nouveau_grctx *ctx) | |||
219 | cp_pos (ctx, 0x00004/4); | 219 | cp_pos (ctx, 0x00004/4); |
220 | cp_ctx (ctx, 0x400828, 1); /* needed. otherwise, flickering happens. */ | 220 | cp_ctx (ctx, 0x400828, 1); /* needed. otherwise, flickering happens. */ |
221 | cp_pos (ctx, 0x00100/4); | 221 | cp_pos (ctx, 0x00100/4); |
222 | nv50_graph_construct_mmio(ctx); | 222 | nv50_gr_construct_mmio(ctx); |
223 | nv50_graph_construct_xfer1(ctx); | 223 | nv50_gr_construct_xfer1(ctx); |
224 | nv50_graph_construct_xfer2(ctx); | 224 | nv50_gr_construct_xfer2(ctx); |
225 | 225 | ||
226 | cp_bra (ctx, SWAP_DIRECTION, SAVE, cp_check_load); | 226 | cp_bra (ctx, SWAP_DIRECTION, SAVE, cp_check_load); |
227 | 227 | ||
@@ -293,10 +293,10 @@ nv50_grctx_init(struct nouveau_device *device, u32 *size) | |||
293 | */ | 293 | */ |
294 | 294 | ||
295 | static void | 295 | static void |
296 | nv50_graph_construct_mmio_ddata(struct nouveau_grctx *ctx); | 296 | nv50_gr_construct_mmio_ddata(struct nouveau_grctx *ctx); |
297 | 297 | ||
298 | static void | 298 | static void |
299 | nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | 299 | nv50_gr_construct_mmio(struct nouveau_grctx *ctx) |
300 | { | 300 | { |
301 | struct nouveau_device *device = ctx->device; | 301 | struct nouveau_device *device = ctx->device; |
302 | int i, j; | 302 | int i, j; |
@@ -334,7 +334,7 @@ nv50_graph_construct_mmio(struct nouveau_grctx *ctx) | |||
334 | gr_def(ctx, 0x400b20, 0x0001629d); | 334 | gr_def(ctx, 0x400b20, 0x0001629d); |
335 | } | 335 | } |
336 | 336 | ||
337 | nv50_graph_construct_mmio_ddata(ctx); | 337 | nv50_gr_construct_mmio_ddata(ctx); |
338 | 338 | ||
339 | /* 0C00: VFETCH */ | 339 | /* 0C00: VFETCH */ |
340 | cp_ctx(ctx, 0x400c08, 0x2); | 340 | cp_ctx(ctx, 0x400c08, 0x2); |
@@ -793,7 +793,7 @@ dd_emit(struct nouveau_grctx *ctx, int num, u32 val) { | |||
793 | } | 793 | } |
794 | 794 | ||
795 | static void | 795 | static void |
796 | nv50_graph_construct_mmio_ddata(struct nouveau_grctx *ctx) | 796 | nv50_gr_construct_mmio_ddata(struct nouveau_grctx *ctx) |
797 | { | 797 | { |
798 | struct nouveau_device *device = ctx->device; | 798 | struct nouveau_device *device = ctx->device; |
799 | int base, num; | 799 | int base, num; |
@@ -1166,27 +1166,27 @@ xf_emit(struct nouveau_grctx *ctx, int num, u32 val) { | |||
1166 | 1166 | ||
1167 | /* Gene declarations... */ | 1167 | /* Gene declarations... */ |
1168 | 1168 | ||
1169 | static void nv50_graph_construct_gene_dispatch(struct nouveau_grctx *ctx); | 1169 | static void nv50_gr_construct_gene_dispatch(struct nouveau_grctx *ctx); |
1170 | static void nv50_graph_construct_gene_m2mf(struct nouveau_grctx *ctx); | 1170 | static void nv50_gr_construct_gene_m2mf(struct nouveau_grctx *ctx); |
1171 | static void nv50_graph_construct_gene_ccache(struct nouveau_grctx *ctx); | 1171 | static void nv50_gr_construct_gene_ccache(struct nouveau_grctx *ctx); |
1172 | static void nv50_graph_construct_gene_unk10xx(struct nouveau_grctx *ctx); | 1172 | static void nv50_gr_construct_gene_unk10xx(struct nouveau_grctx *ctx); |
1173 | static void nv50_graph_construct_gene_unk14xx(struct nouveau_grctx *ctx); | 1173 | static void nv50_gr_construct_gene_unk14xx(struct nouveau_grctx *ctx); |
1174 | static void nv50_graph_construct_gene_zcull(struct nouveau_grctx *ctx); | 1174 | static void nv50_gr_construct_gene_zcull(struct nouveau_grctx *ctx); |
1175 | static void nv50_graph_construct_gene_clipid(struct nouveau_grctx *ctx); | 1175 | static void nv50_gr_construct_gene_clipid(struct nouveau_grctx *ctx); |
1176 | static void nv50_graph_construct_gene_unk24xx(struct nouveau_grctx *ctx); | 1176 | static void nv50_gr_construct_gene_unk24xx(struct nouveau_grctx *ctx); |
1177 | static void nv50_graph_construct_gene_vfetch(struct nouveau_grctx *ctx); | 1177 | static void nv50_gr_construct_gene_vfetch(struct nouveau_grctx *ctx); |
1178 | static void nv50_graph_construct_gene_eng2d(struct nouveau_grctx *ctx); | 1178 | static void nv50_gr_construct_gene_eng2d(struct nouveau_grctx *ctx); |
1179 | static void nv50_graph_construct_gene_csched(struct nouveau_grctx *ctx); | 1179 | static void nv50_gr_construct_gene_csched(struct nouveau_grctx *ctx); |
1180 | static void nv50_graph_construct_gene_unk1cxx(struct nouveau_grctx *ctx); | 1180 | static void nv50_gr_construct_gene_unk1cxx(struct nouveau_grctx *ctx); |
1181 | static void nv50_graph_construct_gene_strmout(struct nouveau_grctx *ctx); | 1181 | static void nv50_gr_construct_gene_strmout(struct nouveau_grctx *ctx); |
1182 | static void nv50_graph_construct_gene_unk34xx(struct nouveau_grctx *ctx); | 1182 | static void nv50_gr_construct_gene_unk34xx(struct nouveau_grctx *ctx); |
1183 | static void nv50_graph_construct_gene_ropm1(struct nouveau_grctx *ctx); | 1183 | static void nv50_gr_construct_gene_ropm1(struct nouveau_grctx *ctx); |
1184 | static void nv50_graph_construct_gene_ropm2(struct nouveau_grctx *ctx); | 1184 | static void nv50_gr_construct_gene_ropm2(struct nouveau_grctx *ctx); |
1185 | static void nv50_graph_construct_gene_ropc(struct nouveau_grctx *ctx); | 1185 | static void nv50_gr_construct_gene_ropc(struct nouveau_grctx *ctx); |
1186 | static void nv50_graph_construct_xfer_tp(struct nouveau_grctx *ctx); | 1186 | static void nv50_gr_construct_xfer_tp(struct nouveau_grctx *ctx); |
1187 | 1187 | ||
1188 | static void | 1188 | static void |
1189 | nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | 1189 | nv50_gr_construct_xfer1(struct nouveau_grctx *ctx) |
1190 | { | 1190 | { |
1191 | struct nouveau_device *device = ctx->device; | 1191 | struct nouveau_device *device = ctx->device; |
1192 | int i; | 1192 | int i; |
@@ -1200,32 +1200,32 @@ nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | |||
1200 | if (device->chipset < 0xa0) { | 1200 | if (device->chipset < 0xa0) { |
1201 | /* Strand 0 */ | 1201 | /* Strand 0 */ |
1202 | ctx->ctxvals_pos = offset; | 1202 | ctx->ctxvals_pos = offset; |
1203 | nv50_graph_construct_gene_dispatch(ctx); | 1203 | nv50_gr_construct_gene_dispatch(ctx); |
1204 | nv50_graph_construct_gene_m2mf(ctx); | 1204 | nv50_gr_construct_gene_m2mf(ctx); |
1205 | nv50_graph_construct_gene_unk24xx(ctx); | 1205 | nv50_gr_construct_gene_unk24xx(ctx); |
1206 | nv50_graph_construct_gene_clipid(ctx); | 1206 | nv50_gr_construct_gene_clipid(ctx); |
1207 | nv50_graph_construct_gene_zcull(ctx); | 1207 | nv50_gr_construct_gene_zcull(ctx); |
1208 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1208 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1209 | size = (ctx->ctxvals_pos-offset)/8; | 1209 | size = (ctx->ctxvals_pos-offset)/8; |
1210 | 1210 | ||
1211 | /* Strand 1 */ | 1211 | /* Strand 1 */ |
1212 | ctx->ctxvals_pos = offset + 0x1; | 1212 | ctx->ctxvals_pos = offset + 0x1; |
1213 | nv50_graph_construct_gene_vfetch(ctx); | 1213 | nv50_gr_construct_gene_vfetch(ctx); |
1214 | nv50_graph_construct_gene_eng2d(ctx); | 1214 | nv50_gr_construct_gene_eng2d(ctx); |
1215 | nv50_graph_construct_gene_csched(ctx); | 1215 | nv50_gr_construct_gene_csched(ctx); |
1216 | nv50_graph_construct_gene_ropm1(ctx); | 1216 | nv50_gr_construct_gene_ropm1(ctx); |
1217 | nv50_graph_construct_gene_ropm2(ctx); | 1217 | nv50_gr_construct_gene_ropm2(ctx); |
1218 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1218 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1219 | size = (ctx->ctxvals_pos-offset)/8; | 1219 | size = (ctx->ctxvals_pos-offset)/8; |
1220 | 1220 | ||
1221 | /* Strand 2 */ | 1221 | /* Strand 2 */ |
1222 | ctx->ctxvals_pos = offset + 0x2; | 1222 | ctx->ctxvals_pos = offset + 0x2; |
1223 | nv50_graph_construct_gene_ccache(ctx); | 1223 | nv50_gr_construct_gene_ccache(ctx); |
1224 | nv50_graph_construct_gene_unk1cxx(ctx); | 1224 | nv50_gr_construct_gene_unk1cxx(ctx); |
1225 | nv50_graph_construct_gene_strmout(ctx); | 1225 | nv50_gr_construct_gene_strmout(ctx); |
1226 | nv50_graph_construct_gene_unk14xx(ctx); | 1226 | nv50_gr_construct_gene_unk14xx(ctx); |
1227 | nv50_graph_construct_gene_unk10xx(ctx); | 1227 | nv50_gr_construct_gene_unk10xx(ctx); |
1228 | nv50_graph_construct_gene_unk34xx(ctx); | 1228 | nv50_gr_construct_gene_unk34xx(ctx); |
1229 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1229 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1230 | size = (ctx->ctxvals_pos-offset)/8; | 1230 | size = (ctx->ctxvals_pos-offset)/8; |
1231 | 1231 | ||
@@ -1233,7 +1233,7 @@ nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | |||
1233 | ctx->ctxvals_pos = offset + 3; | 1233 | ctx->ctxvals_pos = offset + 3; |
1234 | for (i = 0; i < 6; i++) | 1234 | for (i = 0; i < 6; i++) |
1235 | if (units & (1 << (i + 16))) | 1235 | if (units & (1 << (i + 16))) |
1236 | nv50_graph_construct_gene_ropc(ctx); | 1236 | nv50_gr_construct_gene_ropc(ctx); |
1237 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1237 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1238 | size = (ctx->ctxvals_pos-offset)/8; | 1238 | size = (ctx->ctxvals_pos-offset)/8; |
1239 | 1239 | ||
@@ -1241,74 +1241,74 @@ nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | |||
1241 | for (i = 0; i < 4; i++) { | 1241 | for (i = 0; i < 4; i++) { |
1242 | ctx->ctxvals_pos = offset + 4 + i; | 1242 | ctx->ctxvals_pos = offset + 4 + i; |
1243 | if (units & (1 << (2 * i))) | 1243 | if (units & (1 << (2 * i))) |
1244 | nv50_graph_construct_xfer_tp(ctx); | 1244 | nv50_gr_construct_xfer_tp(ctx); |
1245 | if (units & (1 << (2 * i + 1))) | 1245 | if (units & (1 << (2 * i + 1))) |
1246 | nv50_graph_construct_xfer_tp(ctx); | 1246 | nv50_gr_construct_xfer_tp(ctx); |
1247 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1247 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1248 | size = (ctx->ctxvals_pos-offset)/8; | 1248 | size = (ctx->ctxvals_pos-offset)/8; |
1249 | } | 1249 | } |
1250 | } else { | 1250 | } else { |
1251 | /* Strand 0 */ | 1251 | /* Strand 0 */ |
1252 | ctx->ctxvals_pos = offset; | 1252 | ctx->ctxvals_pos = offset; |
1253 | nv50_graph_construct_gene_dispatch(ctx); | 1253 | nv50_gr_construct_gene_dispatch(ctx); |
1254 | nv50_graph_construct_gene_m2mf(ctx); | 1254 | nv50_gr_construct_gene_m2mf(ctx); |
1255 | nv50_graph_construct_gene_unk34xx(ctx); | 1255 | nv50_gr_construct_gene_unk34xx(ctx); |
1256 | nv50_graph_construct_gene_csched(ctx); | 1256 | nv50_gr_construct_gene_csched(ctx); |
1257 | nv50_graph_construct_gene_unk1cxx(ctx); | 1257 | nv50_gr_construct_gene_unk1cxx(ctx); |
1258 | nv50_graph_construct_gene_strmout(ctx); | 1258 | nv50_gr_construct_gene_strmout(ctx); |
1259 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1259 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1260 | size = (ctx->ctxvals_pos-offset)/8; | 1260 | size = (ctx->ctxvals_pos-offset)/8; |
1261 | 1261 | ||
1262 | /* Strand 1 */ | 1262 | /* Strand 1 */ |
1263 | ctx->ctxvals_pos = offset + 1; | 1263 | ctx->ctxvals_pos = offset + 1; |
1264 | nv50_graph_construct_gene_unk10xx(ctx); | 1264 | nv50_gr_construct_gene_unk10xx(ctx); |
1265 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1265 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1266 | size = (ctx->ctxvals_pos-offset)/8; | 1266 | size = (ctx->ctxvals_pos-offset)/8; |
1267 | 1267 | ||
1268 | /* Strand 2 */ | 1268 | /* Strand 2 */ |
1269 | ctx->ctxvals_pos = offset + 2; | 1269 | ctx->ctxvals_pos = offset + 2; |
1270 | if (device->chipset == 0xa0) | 1270 | if (device->chipset == 0xa0) |
1271 | nv50_graph_construct_gene_unk14xx(ctx); | 1271 | nv50_gr_construct_gene_unk14xx(ctx); |
1272 | nv50_graph_construct_gene_unk24xx(ctx); | 1272 | nv50_gr_construct_gene_unk24xx(ctx); |
1273 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1273 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1274 | size = (ctx->ctxvals_pos-offset)/8; | 1274 | size = (ctx->ctxvals_pos-offset)/8; |
1275 | 1275 | ||
1276 | /* Strand 3 */ | 1276 | /* Strand 3 */ |
1277 | ctx->ctxvals_pos = offset + 3; | 1277 | ctx->ctxvals_pos = offset + 3; |
1278 | nv50_graph_construct_gene_vfetch(ctx); | 1278 | nv50_gr_construct_gene_vfetch(ctx); |
1279 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1279 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1280 | size = (ctx->ctxvals_pos-offset)/8; | 1280 | size = (ctx->ctxvals_pos-offset)/8; |
1281 | 1281 | ||
1282 | /* Strand 4 */ | 1282 | /* Strand 4 */ |
1283 | ctx->ctxvals_pos = offset + 4; | 1283 | ctx->ctxvals_pos = offset + 4; |
1284 | nv50_graph_construct_gene_ccache(ctx); | 1284 | nv50_gr_construct_gene_ccache(ctx); |
1285 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1285 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1286 | size = (ctx->ctxvals_pos-offset)/8; | 1286 | size = (ctx->ctxvals_pos-offset)/8; |
1287 | 1287 | ||
1288 | /* Strand 5 */ | 1288 | /* Strand 5 */ |
1289 | ctx->ctxvals_pos = offset + 5; | 1289 | ctx->ctxvals_pos = offset + 5; |
1290 | nv50_graph_construct_gene_ropm2(ctx); | 1290 | nv50_gr_construct_gene_ropm2(ctx); |
1291 | nv50_graph_construct_gene_ropm1(ctx); | 1291 | nv50_gr_construct_gene_ropm1(ctx); |
1292 | /* per-ROP context */ | 1292 | /* per-ROP context */ |
1293 | for (i = 0; i < 8; i++) | 1293 | for (i = 0; i < 8; i++) |
1294 | if (units & (1<<(i+16))) | 1294 | if (units & (1<<(i+16))) |
1295 | nv50_graph_construct_gene_ropc(ctx); | 1295 | nv50_gr_construct_gene_ropc(ctx); |
1296 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1296 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1297 | size = (ctx->ctxvals_pos-offset)/8; | 1297 | size = (ctx->ctxvals_pos-offset)/8; |
1298 | 1298 | ||
1299 | /* Strand 6 */ | 1299 | /* Strand 6 */ |
1300 | ctx->ctxvals_pos = offset + 6; | 1300 | ctx->ctxvals_pos = offset + 6; |
1301 | nv50_graph_construct_gene_zcull(ctx); | 1301 | nv50_gr_construct_gene_zcull(ctx); |
1302 | nv50_graph_construct_gene_clipid(ctx); | 1302 | nv50_gr_construct_gene_clipid(ctx); |
1303 | nv50_graph_construct_gene_eng2d(ctx); | 1303 | nv50_gr_construct_gene_eng2d(ctx); |
1304 | if (units & (1 << 0)) | 1304 | if (units & (1 << 0)) |
1305 | nv50_graph_construct_xfer_tp(ctx); | 1305 | nv50_gr_construct_xfer_tp(ctx); |
1306 | if (units & (1 << 1)) | 1306 | if (units & (1 << 1)) |
1307 | nv50_graph_construct_xfer_tp(ctx); | 1307 | nv50_gr_construct_xfer_tp(ctx); |
1308 | if (units & (1 << 2)) | 1308 | if (units & (1 << 2)) |
1309 | nv50_graph_construct_xfer_tp(ctx); | 1309 | nv50_gr_construct_xfer_tp(ctx); |
1310 | if (units & (1 << 3)) | 1310 | if (units & (1 << 3)) |
1311 | nv50_graph_construct_xfer_tp(ctx); | 1311 | nv50_gr_construct_xfer_tp(ctx); |
1312 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1312 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1313 | size = (ctx->ctxvals_pos-offset)/8; | 1313 | size = (ctx->ctxvals_pos-offset)/8; |
1314 | 1314 | ||
@@ -1316,19 +1316,19 @@ nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | |||
1316 | ctx->ctxvals_pos = offset + 7; | 1316 | ctx->ctxvals_pos = offset + 7; |
1317 | if (device->chipset == 0xa0) { | 1317 | if (device->chipset == 0xa0) { |
1318 | if (units & (1 << 4)) | 1318 | if (units & (1 << 4)) |
1319 | nv50_graph_construct_xfer_tp(ctx); | 1319 | nv50_gr_construct_xfer_tp(ctx); |
1320 | if (units & (1 << 5)) | 1320 | if (units & (1 << 5)) |
1321 | nv50_graph_construct_xfer_tp(ctx); | 1321 | nv50_gr_construct_xfer_tp(ctx); |
1322 | if (units & (1 << 6)) | 1322 | if (units & (1 << 6)) |
1323 | nv50_graph_construct_xfer_tp(ctx); | 1323 | nv50_gr_construct_xfer_tp(ctx); |
1324 | if (units & (1 << 7)) | 1324 | if (units & (1 << 7)) |
1325 | nv50_graph_construct_xfer_tp(ctx); | 1325 | nv50_gr_construct_xfer_tp(ctx); |
1326 | if (units & (1 << 8)) | 1326 | if (units & (1 << 8)) |
1327 | nv50_graph_construct_xfer_tp(ctx); | 1327 | nv50_gr_construct_xfer_tp(ctx); |
1328 | if (units & (1 << 9)) | 1328 | if (units & (1 << 9)) |
1329 | nv50_graph_construct_xfer_tp(ctx); | 1329 | nv50_gr_construct_xfer_tp(ctx); |
1330 | } else { | 1330 | } else { |
1331 | nv50_graph_construct_gene_unk14xx(ctx); | 1331 | nv50_gr_construct_gene_unk14xx(ctx); |
1332 | } | 1332 | } |
1333 | if ((ctx->ctxvals_pos-offset)/8 > size) | 1333 | if ((ctx->ctxvals_pos-offset)/8 > size) |
1334 | size = (ctx->ctxvals_pos-offset)/8; | 1334 | size = (ctx->ctxvals_pos-offset)/8; |
@@ -1349,7 +1349,7 @@ nv50_graph_construct_xfer1(struct nouveau_grctx *ctx) | |||
1349 | */ | 1349 | */ |
1350 | 1350 | ||
1351 | static void | 1351 | static void |
1352 | nv50_graph_construct_gene_dispatch(struct nouveau_grctx *ctx) | 1352 | nv50_gr_construct_gene_dispatch(struct nouveau_grctx *ctx) |
1353 | { | 1353 | { |
1354 | /* start of strand 0 */ | 1354 | /* start of strand 0 */ |
1355 | struct nouveau_device *device = ctx->device; | 1355 | struct nouveau_device *device = ctx->device; |
@@ -1405,7 +1405,7 @@ nv50_graph_construct_gene_dispatch(struct nouveau_grctx *ctx) | |||
1405 | } | 1405 | } |
1406 | 1406 | ||
1407 | static void | 1407 | static void |
1408 | nv50_graph_construct_gene_m2mf(struct nouveau_grctx *ctx) | 1408 | nv50_gr_construct_gene_m2mf(struct nouveau_grctx *ctx) |
1409 | { | 1409 | { |
1410 | /* Strand 0, right after dispatch */ | 1410 | /* Strand 0, right after dispatch */ |
1411 | struct nouveau_device *device = ctx->device; | 1411 | struct nouveau_device *device = ctx->device; |
@@ -1457,7 +1457,7 @@ nv50_graph_construct_gene_m2mf(struct nouveau_grctx *ctx) | |||
1457 | } | 1457 | } |
1458 | 1458 | ||
1459 | static void | 1459 | static void |
1460 | nv50_graph_construct_gene_ccache(struct nouveau_grctx *ctx) | 1460 | nv50_gr_construct_gene_ccache(struct nouveau_grctx *ctx) |
1461 | { | 1461 | { |
1462 | struct nouveau_device *device = ctx->device; | 1462 | struct nouveau_device *device = ctx->device; |
1463 | xf_emit(ctx, 2, 0); /* RO */ | 1463 | xf_emit(ctx, 2, 0); /* RO */ |
@@ -1525,7 +1525,7 @@ nv50_graph_construct_gene_ccache(struct nouveau_grctx *ctx) | |||
1525 | } | 1525 | } |
1526 | 1526 | ||
1527 | static void | 1527 | static void |
1528 | nv50_graph_construct_gene_unk10xx(struct nouveau_grctx *ctx) | 1528 | nv50_gr_construct_gene_unk10xx(struct nouveau_grctx *ctx) |
1529 | { | 1529 | { |
1530 | struct nouveau_device *device = ctx->device; | 1530 | struct nouveau_device *device = ctx->device; |
1531 | int i; | 1531 | int i; |
@@ -1585,7 +1585,7 @@ nv50_graph_construct_gene_unk10xx(struct nouveau_grctx *ctx) | |||
1585 | } | 1585 | } |
1586 | 1586 | ||
1587 | static void | 1587 | static void |
1588 | nv50_graph_construct_gene_unk34xx(struct nouveau_grctx *ctx) | 1588 | nv50_gr_construct_gene_unk34xx(struct nouveau_grctx *ctx) |
1589 | { | 1589 | { |
1590 | struct nouveau_device *device = ctx->device; | 1590 | struct nouveau_device *device = ctx->device; |
1591 | /* end of area 2 on pre-NVA0, area 1 on NVAx */ | 1591 | /* end of area 2 on pre-NVA0, area 1 on NVAx */ |
@@ -1610,7 +1610,7 @@ nv50_graph_construct_gene_unk34xx(struct nouveau_grctx *ctx) | |||
1610 | } | 1610 | } |
1611 | 1611 | ||
1612 | static void | 1612 | static void |
1613 | nv50_graph_construct_gene_unk14xx(struct nouveau_grctx *ctx) | 1613 | nv50_gr_construct_gene_unk14xx(struct nouveau_grctx *ctx) |
1614 | { | 1614 | { |
1615 | struct nouveau_device *device = ctx->device; | 1615 | struct nouveau_device *device = ctx->device; |
1616 | /* middle of area 2 on pre-NVA0, beginning of area 2 on NVA0, area 7 on >NVA0 */ | 1616 | /* middle of area 2 on pre-NVA0, beginning of area 2 on NVA0, area 7 on >NVA0 */ |
@@ -1721,7 +1721,7 @@ nv50_graph_construct_gene_unk14xx(struct nouveau_grctx *ctx) | |||
1721 | } | 1721 | } |
1722 | 1722 | ||
1723 | static void | 1723 | static void |
1724 | nv50_graph_construct_gene_zcull(struct nouveau_grctx *ctx) | 1724 | nv50_gr_construct_gene_zcull(struct nouveau_grctx *ctx) |
1725 | { | 1725 | { |
1726 | struct nouveau_device *device = ctx->device; | 1726 | struct nouveau_device *device = ctx->device; |
1727 | /* end of strand 0 on pre-NVA0, beginning of strand 6 on NVAx */ | 1727 | /* end of strand 0 on pre-NVA0, beginning of strand 6 on NVAx */ |
@@ -1782,7 +1782,7 @@ nv50_graph_construct_gene_zcull(struct nouveau_grctx *ctx) | |||
1782 | } | 1782 | } |
1783 | 1783 | ||
1784 | static void | 1784 | static void |
1785 | nv50_graph_construct_gene_clipid(struct nouveau_grctx *ctx) | 1785 | nv50_gr_construct_gene_clipid(struct nouveau_grctx *ctx) |
1786 | { | 1786 | { |
1787 | /* middle of strand 0 on pre-NVA0 [after 24xx], middle of area 6 on NVAx */ | 1787 | /* middle of strand 0 on pre-NVA0 [after 24xx], middle of area 6 on NVAx */ |
1788 | /* SEEK */ | 1788 | /* SEEK */ |
@@ -1802,7 +1802,7 @@ nv50_graph_construct_gene_clipid(struct nouveau_grctx *ctx) | |||
1802 | } | 1802 | } |
1803 | 1803 | ||
1804 | static void | 1804 | static void |
1805 | nv50_graph_construct_gene_unk24xx(struct nouveau_grctx *ctx) | 1805 | nv50_gr_construct_gene_unk24xx(struct nouveau_grctx *ctx) |
1806 | { | 1806 | { |
1807 | struct nouveau_device *device = ctx->device; | 1807 | struct nouveau_device *device = ctx->device; |
1808 | int i; | 1808 | int i; |
@@ -1885,7 +1885,7 @@ nv50_graph_construct_gene_unk24xx(struct nouveau_grctx *ctx) | |||
1885 | } | 1885 | } |
1886 | 1886 | ||
1887 | static void | 1887 | static void |
1888 | nv50_graph_construct_gene_vfetch(struct nouveau_grctx *ctx) | 1888 | nv50_gr_construct_gene_vfetch(struct nouveau_grctx *ctx) |
1889 | { | 1889 | { |
1890 | struct nouveau_device *device = ctx->device; | 1890 | struct nouveau_device *device = ctx->device; |
1891 | int acnt = 0x10, rep, i; | 1891 | int acnt = 0x10, rep, i; |
@@ -2071,7 +2071,7 @@ nv50_graph_construct_gene_vfetch(struct nouveau_grctx *ctx) | |||
2071 | } | 2071 | } |
2072 | 2072 | ||
2073 | static void | 2073 | static void |
2074 | nv50_graph_construct_gene_eng2d(struct nouveau_grctx *ctx) | 2074 | nv50_gr_construct_gene_eng2d(struct nouveau_grctx *ctx) |
2075 | { | 2075 | { |
2076 | struct nouveau_device *device = ctx->device; | 2076 | struct nouveau_device *device = ctx->device; |
2077 | /* middle of strand 1 on pre-NVA0 [after vfetch], middle of strand 6 on NVAx */ | 2077 | /* middle of strand 1 on pre-NVA0 [after vfetch], middle of strand 6 on NVAx */ |
@@ -2133,7 +2133,7 @@ nv50_graph_construct_gene_eng2d(struct nouveau_grctx *ctx) | |||
2133 | } | 2133 | } |
2134 | 2134 | ||
2135 | static void | 2135 | static void |
2136 | nv50_graph_construct_gene_csched(struct nouveau_grctx *ctx) | 2136 | nv50_gr_construct_gene_csched(struct nouveau_grctx *ctx) |
2137 | { | 2137 | { |
2138 | struct nouveau_device *device = ctx->device; | 2138 | struct nouveau_device *device = ctx->device; |
2139 | /* middle of strand 1 on pre-NVA0 [after eng2d], middle of strand 0 on NVAx */ | 2139 | /* middle of strand 1 on pre-NVA0 [after eng2d], middle of strand 0 on NVAx */ |
@@ -2232,7 +2232,7 @@ nv50_graph_construct_gene_csched(struct nouveau_grctx *ctx) | |||
2232 | } | 2232 | } |
2233 | 2233 | ||
2234 | static void | 2234 | static void |
2235 | nv50_graph_construct_gene_unk1cxx(struct nouveau_grctx *ctx) | 2235 | nv50_gr_construct_gene_unk1cxx(struct nouveau_grctx *ctx) |
2236 | { | 2236 | { |
2237 | struct nouveau_device *device = ctx->device; | 2237 | struct nouveau_device *device = ctx->device; |
2238 | xf_emit(ctx, 2, 0); /* 00007fff WINDOW_OFFSET_XY */ | 2238 | xf_emit(ctx, 2, 0); /* 00007fff WINDOW_OFFSET_XY */ |
@@ -2328,7 +2328,7 @@ nv50_graph_construct_gene_unk1cxx(struct nouveau_grctx *ctx) | |||
2328 | } | 2328 | } |
2329 | 2329 | ||
2330 | static void | 2330 | static void |
2331 | nv50_graph_construct_gene_strmout(struct nouveau_grctx *ctx) | 2331 | nv50_gr_construct_gene_strmout(struct nouveau_grctx *ctx) |
2332 | { | 2332 | { |
2333 | struct nouveau_device *device = ctx->device; | 2333 | struct nouveau_device *device = ctx->device; |
2334 | xf_emit(ctx, 1, 0x102); /* 0000ffff STRMOUT_BUFFER_CTRL */ | 2334 | xf_emit(ctx, 1, 0x102); /* 0000ffff STRMOUT_BUFFER_CTRL */ |
@@ -2370,7 +2370,7 @@ nv50_graph_construct_gene_strmout(struct nouveau_grctx *ctx) | |||
2370 | } | 2370 | } |
2371 | 2371 | ||
2372 | static void | 2372 | static void |
2373 | nv50_graph_construct_gene_ropm1(struct nouveau_grctx *ctx) | 2373 | nv50_gr_construct_gene_ropm1(struct nouveau_grctx *ctx) |
2374 | { | 2374 | { |
2375 | struct nouveau_device *device = ctx->device; | 2375 | struct nouveau_device *device = ctx->device; |
2376 | xf_emit(ctx, 1, 0x4e3bfdf); /* ffffffff UNK0D64 */ | 2376 | xf_emit(ctx, 1, 0x4e3bfdf); /* ffffffff UNK0D64 */ |
@@ -2383,7 +2383,7 @@ nv50_graph_construct_gene_ropm1(struct nouveau_grctx *ctx) | |||
2383 | } | 2383 | } |
2384 | 2384 | ||
2385 | static void | 2385 | static void |
2386 | nv50_graph_construct_gene_ropm2(struct nouveau_grctx *ctx) | 2386 | nv50_gr_construct_gene_ropm2(struct nouveau_grctx *ctx) |
2387 | { | 2387 | { |
2388 | struct nouveau_device *device = ctx->device; | 2388 | struct nouveau_device *device = ctx->device; |
2389 | /* SEEK */ | 2389 | /* SEEK */ |
@@ -2409,7 +2409,7 @@ nv50_graph_construct_gene_ropm2(struct nouveau_grctx *ctx) | |||
2409 | } | 2409 | } |
2410 | 2410 | ||
2411 | static void | 2411 | static void |
2412 | nv50_graph_construct_gene_ropc(struct nouveau_grctx *ctx) | 2412 | nv50_gr_construct_gene_ropc(struct nouveau_grctx *ctx) |
2413 | { | 2413 | { |
2414 | struct nouveau_device *device = ctx->device; | 2414 | struct nouveau_device *device = ctx->device; |
2415 | int magic2; | 2415 | int magic2; |
@@ -2644,7 +2644,7 @@ nv50_graph_construct_gene_ropc(struct nouveau_grctx *ctx) | |||
2644 | } | 2644 | } |
2645 | 2645 | ||
2646 | static void | 2646 | static void |
2647 | nv50_graph_construct_xfer_unk84xx(struct nouveau_grctx *ctx) | 2647 | nv50_gr_construct_xfer_unk84xx(struct nouveau_grctx *ctx) |
2648 | { | 2648 | { |
2649 | struct nouveau_device *device = ctx->device; | 2649 | struct nouveau_device *device = ctx->device; |
2650 | int magic3; | 2650 | int magic3; |
@@ -2736,7 +2736,7 @@ nv50_graph_construct_xfer_unk84xx(struct nouveau_grctx *ctx) | |||
2736 | } | 2736 | } |
2737 | 2737 | ||
2738 | static void | 2738 | static void |
2739 | nv50_graph_construct_xfer_tprop(struct nouveau_grctx *ctx) | 2739 | nv50_gr_construct_xfer_tprop(struct nouveau_grctx *ctx) |
2740 | { | 2740 | { |
2741 | struct nouveau_device *device = ctx->device; | 2741 | struct nouveau_device *device = ctx->device; |
2742 | int magic1, magic2; | 2742 | int magic1, magic2; |
@@ -3036,7 +3036,7 @@ nv50_graph_construct_xfer_tprop(struct nouveau_grctx *ctx) | |||
3036 | } | 3036 | } |
3037 | 3037 | ||
3038 | static void | 3038 | static void |
3039 | nv50_graph_construct_xfer_tex(struct nouveau_grctx *ctx) | 3039 | nv50_gr_construct_xfer_tex(struct nouveau_grctx *ctx) |
3040 | { | 3040 | { |
3041 | struct nouveau_device *device = ctx->device; | 3041 | struct nouveau_device *device = ctx->device; |
3042 | xf_emit(ctx, 2, 0); /* 1 LINKED_TSC. yes, 2. */ | 3042 | xf_emit(ctx, 2, 0); /* 1 LINKED_TSC. yes, 2. */ |
@@ -3082,7 +3082,7 @@ nv50_graph_construct_xfer_tex(struct nouveau_grctx *ctx) | |||
3082 | } | 3082 | } |
3083 | 3083 | ||
3084 | static void | 3084 | static void |
3085 | nv50_graph_construct_xfer_unk8cxx(struct nouveau_grctx *ctx) | 3085 | nv50_gr_construct_xfer_unk8cxx(struct nouveau_grctx *ctx) |
3086 | { | 3086 | { |
3087 | struct nouveau_device *device = ctx->device; | 3087 | struct nouveau_device *device = ctx->device; |
3088 | xf_emit(ctx, 1, 0); /* 00000001 UNK1534 */ | 3088 | xf_emit(ctx, 1, 0); /* 00000001 UNK1534 */ |
@@ -3121,24 +3121,24 @@ nv50_graph_construct_xfer_unk8cxx(struct nouveau_grctx *ctx) | |||
3121 | } | 3121 | } |
3122 | 3122 | ||
3123 | static void | 3123 | static void |
3124 | nv50_graph_construct_xfer_tp(struct nouveau_grctx *ctx) | 3124 | nv50_gr_construct_xfer_tp(struct nouveau_grctx *ctx) |
3125 | { | 3125 | { |
3126 | struct nouveau_device *device = ctx->device; | 3126 | struct nouveau_device *device = ctx->device; |
3127 | if (device->chipset < 0xa0) { | 3127 | if (device->chipset < 0xa0) { |
3128 | nv50_graph_construct_xfer_unk84xx(ctx); | 3128 | nv50_gr_construct_xfer_unk84xx(ctx); |
3129 | nv50_graph_construct_xfer_tprop(ctx); | 3129 | nv50_gr_construct_xfer_tprop(ctx); |
3130 | nv50_graph_construct_xfer_tex(ctx); | 3130 | nv50_gr_construct_xfer_tex(ctx); |
3131 | nv50_graph_construct_xfer_unk8cxx(ctx); | 3131 | nv50_gr_construct_xfer_unk8cxx(ctx); |
3132 | } else { | 3132 | } else { |
3133 | nv50_graph_construct_xfer_tex(ctx); | 3133 | nv50_gr_construct_xfer_tex(ctx); |
3134 | nv50_graph_construct_xfer_tprop(ctx); | 3134 | nv50_gr_construct_xfer_tprop(ctx); |
3135 | nv50_graph_construct_xfer_unk8cxx(ctx); | 3135 | nv50_gr_construct_xfer_unk8cxx(ctx); |
3136 | nv50_graph_construct_xfer_unk84xx(ctx); | 3136 | nv50_gr_construct_xfer_unk84xx(ctx); |
3137 | } | 3137 | } |
3138 | } | 3138 | } |
3139 | 3139 | ||
3140 | static void | 3140 | static void |
3141 | nv50_graph_construct_xfer_mpc(struct nouveau_grctx *ctx) | 3141 | nv50_gr_construct_xfer_mpc(struct nouveau_grctx *ctx) |
3142 | { | 3142 | { |
3143 | struct nouveau_device *device = ctx->device; | 3143 | struct nouveau_device *device = ctx->device; |
3144 | int i, mpcnt = 2; | 3144 | int i, mpcnt = 2; |
@@ -3270,7 +3270,7 @@ nv50_graph_construct_xfer_mpc(struct nouveau_grctx *ctx) | |||
3270 | } | 3270 | } |
3271 | 3271 | ||
3272 | static void | 3272 | static void |
3273 | nv50_graph_construct_xfer2(struct nouveau_grctx *ctx) | 3273 | nv50_gr_construct_xfer2(struct nouveau_grctx *ctx) |
3274 | { | 3274 | { |
3275 | struct nouveau_device *device = ctx->device; | 3275 | struct nouveau_device *device = ctx->device; |
3276 | int i; | 3276 | int i; |
@@ -3288,7 +3288,7 @@ nv50_graph_construct_xfer2(struct nouveau_grctx *ctx) | |||
3288 | if (i == 0) | 3288 | if (i == 0) |
3289 | xf_emit(ctx, 1, 0x08100c12); /* FP_INTERPOLANT_CTRL */ | 3289 | xf_emit(ctx, 1, 0x08100c12); /* FP_INTERPOLANT_CTRL */ |
3290 | if (units & (1 << i)) | 3290 | if (units & (1 << i)) |
3291 | nv50_graph_construct_xfer_mpc(ctx); | 3291 | nv50_gr_construct_xfer_mpc(ctx); |
3292 | if ((ctx->ctxvals_pos-offset)/8 > size) | 3292 | if ((ctx->ctxvals_pos-offset)/8 > size) |
3293 | size = (ctx->ctxvals_pos-offset)/8; | 3293 | size = (ctx->ctxvals_pos-offset)/8; |
3294 | } | 3294 | } |
@@ -3299,40 +3299,40 @@ nv50_graph_construct_xfer2(struct nouveau_grctx *ctx) | |||
3299 | * what it's doing here. */ | 3299 | * what it's doing here. */ |
3300 | xf_emit(ctx, 1, 0x08100c12); /* FP_INTERPOLANT_CTRL */ | 3300 | xf_emit(ctx, 1, 0x08100c12); /* FP_INTERPOLANT_CTRL */ |
3301 | if (units & (1 << 0)) | 3301 | if (units & (1 << 0)) |
3302 | nv50_graph_construct_xfer_mpc(ctx); | 3302 | nv50_gr_construct_xfer_mpc(ctx); |
3303 | if (units & (1 << 1)) | 3303 | if (units & (1 << 1)) |
3304 | nv50_graph_construct_xfer_mpc(ctx); | 3304 | nv50_gr_construct_xfer_mpc(ctx); |
3305 | if ((ctx->ctxvals_pos-offset)/8 > size) | 3305 | if ((ctx->ctxvals_pos-offset)/8 > size) |
3306 | size = (ctx->ctxvals_pos-offset)/8; | 3306 | size = (ctx->ctxvals_pos-offset)/8; |
3307 | 3307 | ||
3308 | /* Strand 1: TPs 2, 3 */ | 3308 | /* Strand 1: TPs 2, 3 */ |
3309 | ctx->ctxvals_pos = offset + 1; | 3309 | ctx->ctxvals_pos = offset + 1; |
3310 | if (units & (1 << 2)) | 3310 | if (units & (1 << 2)) |
3311 | nv50_graph_construct_xfer_mpc(ctx); | 3311 | nv50_gr_construct_xfer_mpc(ctx); |
3312 | if (units & (1 << 3)) | 3312 | if (units & (1 << 3)) |
3313 | nv50_graph_construct_xfer_mpc(ctx); | 3313 | nv50_gr_construct_xfer_mpc(ctx); |
3314 | if ((ctx->ctxvals_pos-offset)/8 > size) | 3314 | if ((ctx->ctxvals_pos-offset)/8 > size) |
3315 | size = (ctx->ctxvals_pos-offset)/8; | 3315 | size = (ctx->ctxvals_pos-offset)/8; |
3316 | 3316 | ||
3317 | /* Strand 2: TPs 4, 5, 6 */ | 3317 | /* Strand 2: TPs 4, 5, 6 */ |
3318 | ctx->ctxvals_pos = offset + 2; | 3318 | ctx->ctxvals_pos = offset + 2; |
3319 | if (units & (1 << 4)) | 3319 | if (units & (1 << 4)) |
3320 | nv50_graph_construct_xfer_mpc(ctx); | 3320 | nv50_gr_construct_xfer_mpc(ctx); |
3321 | if (units & (1 << 5)) | 3321 | if (units & (1 << 5)) |
3322 | nv50_graph_construct_xfer_mpc(ctx); | 3322 | nv50_gr_construct_xfer_mpc(ctx); |
3323 | if (units & (1 << 6)) | 3323 | if (units & (1 << 6)) |
3324 | nv50_graph_construct_xfer_mpc(ctx); | 3324 | nv50_gr_construct_xfer_mpc(ctx); |
3325 | if ((ctx->ctxvals_pos-offset)/8 > size) | 3325 | if ((ctx->ctxvals_pos-offset)/8 > size) |
3326 | size = (ctx->ctxvals_pos-offset)/8; | 3326 | size = (ctx->ctxvals_pos-offset)/8; |
3327 | 3327 | ||
3328 | /* Strand 3: TPs 7, 8, 9 */ | 3328 | /* Strand 3: TPs 7, 8, 9 */ |
3329 | ctx->ctxvals_pos = offset + 3; | 3329 | ctx->ctxvals_pos = offset + 3; |
3330 | if (units & (1 << 7)) | 3330 | if (units & (1 << 7)) |
3331 | nv50_graph_construct_xfer_mpc(ctx); | 3331 | nv50_gr_construct_xfer_mpc(ctx); |
3332 | if (units & (1 << 8)) | 3332 | if (units & (1 << 8)) |
3333 | nv50_graph_construct_xfer_mpc(ctx); | 3333 | nv50_gr_construct_xfer_mpc(ctx); |
3334 | if (units & (1 << 9)) | 3334 | if (units & (1 << 9)) |
3335 | nv50_graph_construct_xfer_mpc(ctx); | 3335 | nv50_gr_construct_xfer_mpc(ctx); |
3336 | if ((ctx->ctxvals_pos-offset)/8 > size) | 3336 | if ((ctx->ctxvals_pos-offset)/8 > size) |
3337 | size = (ctx->ctxvals_pos-offset)/8; | 3337 | size = (ctx->ctxvals_pos-offset)/8; |
3338 | } | 3338 | } |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc0.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc0.c index b8e5fe60a1eb..08a925efecf2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc0.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nvc0_grctx_init_icmd_0[] = { | 32 | nvc0_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, | 34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, |
@@ -266,13 +266,13 @@ nvc0_grctx_init_icmd_0[] = { | |||
266 | {} | 266 | {} |
267 | }; | 267 | }; |
268 | 268 | ||
269 | const struct nvc0_graph_pack | 269 | const struct nvc0_gr_pack |
270 | nvc0_grctx_pack_icmd[] = { | 270 | nvc0_grctx_pack_icmd[] = { |
271 | { nvc0_grctx_init_icmd_0 }, | 271 | { nvc0_grctx_init_icmd_0 }, |
272 | {} | 272 | {} |
273 | }; | 273 | }; |
274 | 274 | ||
275 | static const struct nvc0_graph_init | 275 | static const struct nvc0_gr_init |
276 | nvc0_grctx_init_9097_0[] = { | 276 | nvc0_grctx_init_9097_0[] = { |
277 | { 0x000800, 8, 0x40, 0x00000000 }, | 277 | { 0x000800, 8, 0x40, 0x00000000 }, |
278 | { 0x000804, 8, 0x40, 0x00000000 }, | 278 | { 0x000804, 8, 0x40, 0x00000000 }, |
@@ -575,7 +575,7 @@ nvc0_grctx_init_9097_0[] = { | |||
575 | {} | 575 | {} |
576 | }; | 576 | }; |
577 | 577 | ||
578 | const struct nvc0_graph_init | 578 | const struct nvc0_gr_init |
579 | nvc0_grctx_init_902d_0[] = { | 579 | nvc0_grctx_init_902d_0[] = { |
580 | { 0x000200, 1, 0x04, 0x000000cf }, | 580 | { 0x000200, 1, 0x04, 0x000000cf }, |
581 | { 0x000204, 1, 0x04, 0x00000001 }, | 581 | { 0x000204, 1, 0x04, 0x00000001 }, |
@@ -594,7 +594,7 @@ nvc0_grctx_init_902d_0[] = { | |||
594 | {} | 594 | {} |
595 | }; | 595 | }; |
596 | 596 | ||
597 | const struct nvc0_graph_init | 597 | const struct nvc0_gr_init |
598 | nvc0_grctx_init_9039_0[] = { | 598 | nvc0_grctx_init_9039_0[] = { |
599 | { 0x00030c, 3, 0x04, 0x00000000 }, | 599 | { 0x00030c, 3, 0x04, 0x00000000 }, |
600 | { 0x000320, 1, 0x04, 0x00000000 }, | 600 | { 0x000320, 1, 0x04, 0x00000000 }, |
@@ -603,7 +603,7 @@ nvc0_grctx_init_9039_0[] = { | |||
603 | {} | 603 | {} |
604 | }; | 604 | }; |
605 | 605 | ||
606 | const struct nvc0_graph_init | 606 | const struct nvc0_gr_init |
607 | nvc0_grctx_init_90c0_0[] = { | 607 | nvc0_grctx_init_90c0_0[] = { |
608 | { 0x00270c, 8, 0x20, 0x00000000 }, | 608 | { 0x00270c, 8, 0x20, 0x00000000 }, |
609 | { 0x00030c, 1, 0x04, 0x00000001 }, | 609 | { 0x00030c, 1, 0x04, 0x00000001 }, |
@@ -621,7 +621,7 @@ nvc0_grctx_init_90c0_0[] = { | |||
621 | {} | 621 | {} |
622 | }; | 622 | }; |
623 | 623 | ||
624 | const struct nvc0_graph_pack | 624 | const struct nvc0_gr_pack |
625 | nvc0_grctx_pack_mthd[] = { | 625 | nvc0_grctx_pack_mthd[] = { |
626 | { nvc0_grctx_init_9097_0, 0x9097 }, | 626 | { nvc0_grctx_init_9097_0, 0x9097 }, |
627 | { nvc0_grctx_init_902d_0, 0x902d }, | 627 | { nvc0_grctx_init_902d_0, 0x902d }, |
@@ -630,13 +630,13 @@ nvc0_grctx_pack_mthd[] = { | |||
630 | {} | 630 | {} |
631 | }; | 631 | }; |
632 | 632 | ||
633 | const struct nvc0_graph_init | 633 | const struct nvc0_gr_init |
634 | nvc0_grctx_init_main_0[] = { | 634 | nvc0_grctx_init_main_0[] = { |
635 | { 0x400204, 2, 0x04, 0x00000000 }, | 635 | { 0x400204, 2, 0x04, 0x00000000 }, |
636 | {} | 636 | {} |
637 | }; | 637 | }; |
638 | 638 | ||
639 | const struct nvc0_graph_init | 639 | const struct nvc0_gr_init |
640 | nvc0_grctx_init_fe_0[] = { | 640 | nvc0_grctx_init_fe_0[] = { |
641 | { 0x404004, 11, 0x04, 0x00000000 }, | 641 | { 0x404004, 11, 0x04, 0x00000000 }, |
642 | { 0x404044, 1, 0x04, 0x00000000 }, | 642 | { 0x404044, 1, 0x04, 0x00000000 }, |
@@ -657,7 +657,7 @@ nvc0_grctx_init_fe_0[] = { | |||
657 | {} | 657 | {} |
658 | }; | 658 | }; |
659 | 659 | ||
660 | const struct nvc0_graph_init | 660 | const struct nvc0_gr_init |
661 | nvc0_grctx_init_pri_0[] = { | 661 | nvc0_grctx_init_pri_0[] = { |
662 | { 0x404404, 14, 0x04, 0x00000000 }, | 662 | { 0x404404, 14, 0x04, 0x00000000 }, |
663 | { 0x404460, 2, 0x04, 0x00000000 }, | 663 | { 0x404460, 2, 0x04, 0x00000000 }, |
@@ -668,7 +668,7 @@ nvc0_grctx_init_pri_0[] = { | |||
668 | {} | 668 | {} |
669 | }; | 669 | }; |
670 | 670 | ||
671 | const struct nvc0_graph_init | 671 | const struct nvc0_gr_init |
672 | nvc0_grctx_init_memfmt_0[] = { | 672 | nvc0_grctx_init_memfmt_0[] = { |
673 | { 0x404604, 1, 0x04, 0x00000015 }, | 673 | { 0x404604, 1, 0x04, 0x00000015 }, |
674 | { 0x404608, 1, 0x04, 0x00000000 }, | 674 | { 0x404608, 1, 0x04, 0x00000000 }, |
@@ -690,7 +690,7 @@ nvc0_grctx_init_memfmt_0[] = { | |||
690 | {} | 690 | {} |
691 | }; | 691 | }; |
692 | 692 | ||
693 | static const struct nvc0_graph_init | 693 | static const struct nvc0_gr_init |
694 | nvc0_grctx_init_ds_0[] = { | 694 | nvc0_grctx_init_ds_0[] = { |
695 | { 0x405800, 1, 0x04, 0x078000bf }, | 695 | { 0x405800, 1, 0x04, 0x078000bf }, |
696 | { 0x405830, 1, 0x04, 0x02180000 }, | 696 | { 0x405830, 1, 0x04, 0x02180000 }, |
@@ -702,7 +702,7 @@ nvc0_grctx_init_ds_0[] = { | |||
702 | {} | 702 | {} |
703 | }; | 703 | }; |
704 | 704 | ||
705 | static const struct nvc0_graph_init | 705 | static const struct nvc0_gr_init |
706 | nvc0_grctx_init_pd_0[] = { | 706 | nvc0_grctx_init_pd_0[] = { |
707 | { 0x406020, 1, 0x04, 0x000103c1 }, | 707 | { 0x406020, 1, 0x04, 0x000103c1 }, |
708 | { 0x406028, 4, 0x04, 0x00000001 }, | 708 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -712,7 +712,7 @@ nvc0_grctx_init_pd_0[] = { | |||
712 | {} | 712 | {} |
713 | }; | 713 | }; |
714 | 714 | ||
715 | const struct nvc0_graph_init | 715 | const struct nvc0_gr_init |
716 | nvc0_grctx_init_rstr2d_0[] = { | 716 | nvc0_grctx_init_rstr2d_0[] = { |
717 | { 0x407804, 1, 0x04, 0x00000023 }, | 717 | { 0x407804, 1, 0x04, 0x00000023 }, |
718 | { 0x40780c, 1, 0x04, 0x0a418820 }, | 718 | { 0x40780c, 1, 0x04, 0x0a418820 }, |
@@ -725,7 +725,7 @@ nvc0_grctx_init_rstr2d_0[] = { | |||
725 | {} | 725 | {} |
726 | }; | 726 | }; |
727 | 727 | ||
728 | const struct nvc0_graph_init | 728 | const struct nvc0_gr_init |
729 | nvc0_grctx_init_scc_0[] = { | 729 | nvc0_grctx_init_scc_0[] = { |
730 | { 0x408000, 2, 0x04, 0x00000000 }, | 730 | { 0x408000, 2, 0x04, 0x00000000 }, |
731 | { 0x408008, 1, 0x04, 0x00000018 }, | 731 | { 0x408008, 1, 0x04, 0x00000018 }, |
@@ -736,7 +736,7 @@ nvc0_grctx_init_scc_0[] = { | |||
736 | {} | 736 | {} |
737 | }; | 737 | }; |
738 | 738 | ||
739 | static const struct nvc0_graph_init | 739 | static const struct nvc0_gr_init |
740 | nvc0_grctx_init_be_0[] = { | 740 | nvc0_grctx_init_be_0[] = { |
741 | { 0x408800, 1, 0x04, 0x02802a3c }, | 741 | { 0x408800, 1, 0x04, 0x02802a3c }, |
742 | { 0x408804, 1, 0x04, 0x00000040 }, | 742 | { 0x408804, 1, 0x04, 0x00000040 }, |
@@ -748,7 +748,7 @@ nvc0_grctx_init_be_0[] = { | |||
748 | {} | 748 | {} |
749 | }; | 749 | }; |
750 | 750 | ||
751 | const struct nvc0_graph_pack | 751 | const struct nvc0_gr_pack |
752 | nvc0_grctx_pack_hub[] = { | 752 | nvc0_grctx_pack_hub[] = { |
753 | { nvc0_grctx_init_main_0 }, | 753 | { nvc0_grctx_init_main_0 }, |
754 | { nvc0_grctx_init_fe_0 }, | 754 | { nvc0_grctx_init_fe_0 }, |
@@ -762,13 +762,13 @@ nvc0_grctx_pack_hub[] = { | |||
762 | {} | 762 | {} |
763 | }; | 763 | }; |
764 | 764 | ||
765 | const struct nvc0_graph_init | 765 | const struct nvc0_gr_init |
766 | nvc0_grctx_init_gpc_unk_0[] = { | 766 | nvc0_grctx_init_gpc_unk_0[] = { |
767 | { 0x418380, 1, 0x04, 0x00000016 }, | 767 | { 0x418380, 1, 0x04, 0x00000016 }, |
768 | {} | 768 | {} |
769 | }; | 769 | }; |
770 | 770 | ||
771 | const struct nvc0_graph_init | 771 | const struct nvc0_gr_init |
772 | nvc0_grctx_init_prop_0[] = { | 772 | nvc0_grctx_init_prop_0[] = { |
773 | { 0x418400, 1, 0x04, 0x38004e00 }, | 773 | { 0x418400, 1, 0x04, 0x38004e00 }, |
774 | { 0x418404, 1, 0x04, 0x71e0ffff }, | 774 | { 0x418404, 1, 0x04, 0x71e0ffff }, |
@@ -782,7 +782,7 @@ nvc0_grctx_init_prop_0[] = { | |||
782 | {} | 782 | {} |
783 | }; | 783 | }; |
784 | 784 | ||
785 | const struct nvc0_graph_init | 785 | const struct nvc0_gr_init |
786 | nvc0_grctx_init_gpc_unk_1[] = { | 786 | nvc0_grctx_init_gpc_unk_1[] = { |
787 | { 0x418600, 1, 0x04, 0x0000001f }, | 787 | { 0x418600, 1, 0x04, 0x0000001f }, |
788 | { 0x418684, 1, 0x04, 0x0000000f }, | 788 | { 0x418684, 1, 0x04, 0x0000000f }, |
@@ -794,7 +794,7 @@ nvc0_grctx_init_gpc_unk_1[] = { | |||
794 | {} | 794 | {} |
795 | }; | 795 | }; |
796 | 796 | ||
797 | static const struct nvc0_graph_init | 797 | static const struct nvc0_gr_init |
798 | nvc0_grctx_init_setup_0[] = { | 798 | nvc0_grctx_init_setup_0[] = { |
799 | { 0x418800, 1, 0x04, 0x0006860a }, | 799 | { 0x418800, 1, 0x04, 0x0006860a }, |
800 | { 0x418808, 3, 0x04, 0x00000000 }, | 800 | { 0x418808, 3, 0x04, 0x00000000 }, |
@@ -807,7 +807,7 @@ nvc0_grctx_init_setup_0[] = { | |||
807 | {} | 807 | {} |
808 | }; | 808 | }; |
809 | 809 | ||
810 | const struct nvc0_graph_init | 810 | const struct nvc0_gr_init |
811 | nvc0_grctx_init_zcull_0[] = { | 811 | nvc0_grctx_init_zcull_0[] = { |
812 | { 0x41891c, 1, 0x04, 0x00ff00ff }, | 812 | { 0x41891c, 1, 0x04, 0x00ff00ff }, |
813 | { 0x418924, 1, 0x04, 0x00000000 }, | 813 | { 0x418924, 1, 0x04, 0x00000000 }, |
@@ -816,7 +816,7 @@ nvc0_grctx_init_zcull_0[] = { | |||
816 | {} | 816 | {} |
817 | }; | 817 | }; |
818 | 818 | ||
819 | const struct nvc0_graph_init | 819 | const struct nvc0_gr_init |
820 | nvc0_grctx_init_crstr_0[] = { | 820 | nvc0_grctx_init_crstr_0[] = { |
821 | { 0x418b00, 1, 0x04, 0x00000000 }, | 821 | { 0x418b00, 1, 0x04, 0x00000000 }, |
822 | { 0x418b08, 1, 0x04, 0x0a418820 }, | 822 | { 0x418b08, 1, 0x04, 0x0a418820 }, |
@@ -829,7 +829,7 @@ nvc0_grctx_init_crstr_0[] = { | |||
829 | {} | 829 | {} |
830 | }; | 830 | }; |
831 | 831 | ||
832 | const struct nvc0_graph_init | 832 | const struct nvc0_gr_init |
833 | nvc0_grctx_init_gpm_0[] = { | 833 | nvc0_grctx_init_gpm_0[] = { |
834 | { 0x418c08, 1, 0x04, 0x00000001 }, | 834 | { 0x418c08, 1, 0x04, 0x00000001 }, |
835 | { 0x418c10, 8, 0x04, 0x00000000 }, | 835 | { 0x418c10, 8, 0x04, 0x00000000 }, |
@@ -838,7 +838,7 @@ nvc0_grctx_init_gpm_0[] = { | |||
838 | {} | 838 | {} |
839 | }; | 839 | }; |
840 | 840 | ||
841 | const struct nvc0_graph_init | 841 | const struct nvc0_gr_init |
842 | nvc0_grctx_init_gcc_0[] = { | 842 | nvc0_grctx_init_gcc_0[] = { |
843 | { 0x419000, 1, 0x04, 0x00000780 }, | 843 | { 0x419000, 1, 0x04, 0x00000780 }, |
844 | { 0x419004, 2, 0x04, 0x00000000 }, | 844 | { 0x419004, 2, 0x04, 0x00000000 }, |
@@ -846,7 +846,7 @@ nvc0_grctx_init_gcc_0[] = { | |||
846 | {} | 846 | {} |
847 | }; | 847 | }; |
848 | 848 | ||
849 | const struct nvc0_graph_pack | 849 | const struct nvc0_gr_pack |
850 | nvc0_grctx_pack_gpc[] = { | 850 | nvc0_grctx_pack_gpc[] = { |
851 | { nvc0_grctx_init_gpc_unk_0 }, | 851 | { nvc0_grctx_init_gpc_unk_0 }, |
852 | { nvc0_grctx_init_prop_0 }, | 852 | { nvc0_grctx_init_prop_0 }, |
@@ -859,7 +859,7 @@ nvc0_grctx_pack_gpc[] = { | |||
859 | {} | 859 | {} |
860 | }; | 860 | }; |
861 | 861 | ||
862 | static const struct nvc0_graph_init | 862 | static const struct nvc0_gr_init |
863 | nvc0_grctx_init_zcullr_0[] = { | 863 | nvc0_grctx_init_zcullr_0[] = { |
864 | { 0x418a00, 3, 0x04, 0x00000000 }, | 864 | { 0x418a00, 3, 0x04, 0x00000000 }, |
865 | { 0x418a0c, 1, 0x04, 0x00010000 }, | 865 | { 0x418a0c, 1, 0x04, 0x00010000 }, |
@@ -888,13 +888,13 @@ nvc0_grctx_init_zcullr_0[] = { | |||
888 | {} | 888 | {} |
889 | }; | 889 | }; |
890 | 890 | ||
891 | const struct nvc0_graph_pack | 891 | const struct nvc0_gr_pack |
892 | nvc0_grctx_pack_zcull[] = { | 892 | nvc0_grctx_pack_zcull[] = { |
893 | { nvc0_grctx_init_zcullr_0 }, | 893 | { nvc0_grctx_init_zcullr_0 }, |
894 | {} | 894 | {} |
895 | }; | 895 | }; |
896 | 896 | ||
897 | const struct nvc0_graph_init | 897 | const struct nvc0_gr_init |
898 | nvc0_grctx_init_pe_0[] = { | 898 | nvc0_grctx_init_pe_0[] = { |
899 | { 0x419818, 1, 0x04, 0x00000000 }, | 899 | { 0x419818, 1, 0x04, 0x00000000 }, |
900 | { 0x41983c, 1, 0x04, 0x00038bc7 }, | 900 | { 0x41983c, 1, 0x04, 0x00038bc7 }, |
@@ -904,7 +904,7 @@ nvc0_grctx_init_pe_0[] = { | |||
904 | {} | 904 | {} |
905 | }; | 905 | }; |
906 | 906 | ||
907 | static const struct nvc0_graph_init | 907 | static const struct nvc0_gr_init |
908 | nvc0_grctx_init_tex_0[] = { | 908 | nvc0_grctx_init_tex_0[] = { |
909 | { 0x419a00, 1, 0x04, 0x000001f0 }, | 909 | { 0x419a00, 1, 0x04, 0x000001f0 }, |
910 | { 0x419a04, 1, 0x04, 0x00000001 }, | 910 | { 0x419a04, 1, 0x04, 0x00000001 }, |
@@ -915,7 +915,7 @@ nvc0_grctx_init_tex_0[] = { | |||
915 | {} | 915 | {} |
916 | }; | 916 | }; |
917 | 917 | ||
918 | const struct nvc0_graph_init | 918 | const struct nvc0_gr_init |
919 | nvc0_grctx_init_wwdx_0[] = { | 919 | nvc0_grctx_init_wwdx_0[] = { |
920 | { 0x419b00, 1, 0x04, 0x0a418820 }, | 920 | { 0x419b00, 1, 0x04, 0x0a418820 }, |
921 | { 0x419b04, 1, 0x04, 0x062080e6 }, | 921 | { 0x419b04, 1, 0x04, 0x062080e6 }, |
@@ -929,7 +929,7 @@ nvc0_grctx_init_wwdx_0[] = { | |||
929 | {} | 929 | {} |
930 | }; | 930 | }; |
931 | 931 | ||
932 | const struct nvc0_graph_init | 932 | const struct nvc0_gr_init |
933 | nvc0_grctx_init_mpc_0[] = { | 933 | nvc0_grctx_init_mpc_0[] = { |
934 | { 0x419c00, 1, 0x04, 0x00000002 }, | 934 | { 0x419c00, 1, 0x04, 0x00000002 }, |
935 | { 0x419c04, 1, 0x04, 0x00000006 }, | 935 | { 0x419c04, 1, 0x04, 0x00000006 }, |
@@ -938,7 +938,7 @@ nvc0_grctx_init_mpc_0[] = { | |||
938 | {} | 938 | {} |
939 | }; | 939 | }; |
940 | 940 | ||
941 | static const struct nvc0_graph_init | 941 | static const struct nvc0_gr_init |
942 | nvc0_grctx_init_l1c_0[] = { | 942 | nvc0_grctx_init_l1c_0[] = { |
943 | { 0x419cb0, 1, 0x04, 0x00060048 }, | 943 | { 0x419cb0, 1, 0x04, 0x00060048 }, |
944 | { 0x419ce8, 1, 0x04, 0x00000000 }, | 944 | { 0x419ce8, 1, 0x04, 0x00000000 }, |
@@ -946,14 +946,14 @@ nvc0_grctx_init_l1c_0[] = { | |||
946 | {} | 946 | {} |
947 | }; | 947 | }; |
948 | 948 | ||
949 | const struct nvc0_graph_init | 949 | const struct nvc0_gr_init |
950 | nvc0_grctx_init_tpccs_0[] = { | 950 | nvc0_grctx_init_tpccs_0[] = { |
951 | { 0x419d20, 1, 0x04, 0x02180000 }, | 951 | { 0x419d20, 1, 0x04, 0x02180000 }, |
952 | { 0x419d24, 1, 0x04, 0x00001fff }, | 952 | { 0x419d24, 1, 0x04, 0x00001fff }, |
953 | {} | 953 | {} |
954 | }; | 954 | }; |
955 | 955 | ||
956 | static const struct nvc0_graph_init | 956 | static const struct nvc0_gr_init |
957 | nvc0_grctx_init_sm_0[] = { | 957 | nvc0_grctx_init_sm_0[] = { |
958 | { 0x419e04, 3, 0x04, 0x00000000 }, | 958 | { 0x419e04, 3, 0x04, 0x00000000 }, |
959 | { 0x419e10, 1, 0x04, 0x00000002 }, | 959 | { 0x419e10, 1, 0x04, 0x00000002 }, |
@@ -966,7 +966,7 @@ nvc0_grctx_init_sm_0[] = { | |||
966 | {} | 966 | {} |
967 | }; | 967 | }; |
968 | 968 | ||
969 | const struct nvc0_graph_pack | 969 | const struct nvc0_gr_pack |
970 | nvc0_grctx_pack_tpc[] = { | 970 | nvc0_grctx_pack_tpc[] = { |
971 | { nvc0_grctx_init_pe_0 }, | 971 | { nvc0_grctx_init_pe_0 }, |
972 | { nvc0_grctx_init_tex_0 }, | 972 | { nvc0_grctx_init_tex_0 }, |
@@ -1049,7 +1049,7 @@ nvc0_grctx_generate_pagepool(struct nvc0_grctx *info) | |||
1049 | void | 1049 | void |
1050 | nvc0_grctx_generate_attrib(struct nvc0_grctx *info) | 1050 | nvc0_grctx_generate_attrib(struct nvc0_grctx *info) |
1051 | { | 1051 | { |
1052 | struct nvc0_graph_priv *priv = info->priv; | 1052 | struct nvc0_gr_priv *priv = info->priv; |
1053 | const struct nvc0_grctx_oclass *impl = nvc0_grctx_impl(priv); | 1053 | const struct nvc0_grctx_oclass *impl = nvc0_grctx_impl(priv); |
1054 | const u32 attrib = impl->attrib_nr; | 1054 | const u32 attrib = impl->attrib_nr; |
1055 | const u32 size = 0x20 * (impl->attrib_nr_max + impl->alpha_nr_max); | 1055 | const u32 size = 0x20 * (impl->attrib_nr_max + impl->alpha_nr_max); |
@@ -1074,12 +1074,12 @@ nvc0_grctx_generate_attrib(struct nvc0_grctx *info) | |||
1074 | } | 1074 | } |
1075 | 1075 | ||
1076 | void | 1076 | void |
1077 | nvc0_grctx_generate_unkn(struct nvc0_graph_priv *priv) | 1077 | nvc0_grctx_generate_unkn(struct nvc0_gr_priv *priv) |
1078 | { | 1078 | { |
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | void | 1081 | void |
1082 | nvc0_grctx_generate_tpcid(struct nvc0_graph_priv *priv) | 1082 | nvc0_grctx_generate_tpcid(struct nvc0_gr_priv *priv) |
1083 | { | 1083 | { |
1084 | int gpc, tpc, id; | 1084 | int gpc, tpc, id; |
1085 | 1085 | ||
@@ -1100,7 +1100,7 @@ nvc0_grctx_generate_tpcid(struct nvc0_graph_priv *priv) | |||
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | void | 1102 | void |
1103 | nvc0_grctx_generate_r406028(struct nvc0_graph_priv *priv) | 1103 | nvc0_grctx_generate_r406028(struct nvc0_gr_priv *priv) |
1104 | { | 1104 | { |
1105 | u32 tmp[GPC_MAX / 8] = {}, i = 0; | 1105 | u32 tmp[GPC_MAX / 8] = {}, i = 0; |
1106 | for (i = 0; i < priv->gpc_nr; i++) | 1106 | for (i = 0; i < priv->gpc_nr; i++) |
@@ -1112,7 +1112,7 @@ nvc0_grctx_generate_r406028(struct nvc0_graph_priv *priv) | |||
1112 | } | 1112 | } |
1113 | 1113 | ||
1114 | void | 1114 | void |
1115 | nvc0_grctx_generate_r4060a8(struct nvc0_graph_priv *priv) | 1115 | nvc0_grctx_generate_r4060a8(struct nvc0_gr_priv *priv) |
1116 | { | 1116 | { |
1117 | u8 tpcnr[GPC_MAX], data[TPC_MAX]; | 1117 | u8 tpcnr[GPC_MAX], data[TPC_MAX]; |
1118 | int gpc, tpc, i; | 1118 | int gpc, tpc, i; |
@@ -1134,7 +1134,7 @@ nvc0_grctx_generate_r4060a8(struct nvc0_graph_priv *priv) | |||
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | void | 1136 | void |
1137 | nvc0_grctx_generate_r418bb8(struct nvc0_graph_priv *priv) | 1137 | nvc0_grctx_generate_r418bb8(struct nvc0_gr_priv *priv) |
1138 | { | 1138 | { |
1139 | u32 data[6] = {}, data2[2] = {}; | 1139 | u32 data[6] = {}, data2[2] = {}; |
1140 | u8 tpcnr[GPC_MAX]; | 1140 | u8 tpcnr[GPC_MAX]; |
@@ -1192,7 +1192,7 @@ nvc0_grctx_generate_r418bb8(struct nvc0_graph_priv *priv) | |||
1192 | } | 1192 | } |
1193 | 1193 | ||
1194 | void | 1194 | void |
1195 | nvc0_grctx_generate_r406800(struct nvc0_graph_priv *priv) | 1195 | nvc0_grctx_generate_r406800(struct nvc0_gr_priv *priv) |
1196 | { | 1196 | { |
1197 | u64 tpc_mask = 0, tpc_set = 0; | 1197 | u64 tpc_mask = 0, tpc_set = 0; |
1198 | u8 tpcnr[GPC_MAX]; | 1198 | u8 tpcnr[GPC_MAX]; |
@@ -1225,17 +1225,17 @@ nvc0_grctx_generate_r406800(struct nvc0_graph_priv *priv) | |||
1225 | } | 1225 | } |
1226 | 1226 | ||
1227 | void | 1227 | void |
1228 | nvc0_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | 1228 | nvc0_grctx_generate_main(struct nvc0_gr_priv *priv, struct nvc0_grctx *info) |
1229 | { | 1229 | { |
1230 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; | 1230 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; |
1231 | 1231 | ||
1232 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); | 1232 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); |
1233 | 1233 | ||
1234 | nvc0_graph_mmio(priv, oclass->hub); | 1234 | nvc0_gr_mmio(priv, oclass->hub); |
1235 | nvc0_graph_mmio(priv, oclass->gpc); | 1235 | nvc0_gr_mmio(priv, oclass->gpc); |
1236 | nvc0_graph_mmio(priv, oclass->zcull); | 1236 | nvc0_gr_mmio(priv, oclass->zcull); |
1237 | nvc0_graph_mmio(priv, oclass->tpc); | 1237 | nvc0_gr_mmio(priv, oclass->tpc); |
1238 | nvc0_graph_mmio(priv, oclass->ppc); | 1238 | nvc0_gr_mmio(priv, oclass->ppc); |
1239 | 1239 | ||
1240 | nv_wr32(priv, 0x404154, 0x00000000); | 1240 | nv_wr32(priv, 0x404154, 0x00000000); |
1241 | 1241 | ||
@@ -1250,14 +1250,14 @@ nvc0_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | |||
1250 | nvc0_grctx_generate_r418bb8(priv); | 1250 | nvc0_grctx_generate_r418bb8(priv); |
1251 | nvc0_grctx_generate_r406800(priv); | 1251 | nvc0_grctx_generate_r406800(priv); |
1252 | 1252 | ||
1253 | nvc0_graph_icmd(priv, oclass->icmd); | 1253 | nvc0_gr_icmd(priv, oclass->icmd); |
1254 | nv_wr32(priv, 0x404154, 0x00000400); | 1254 | nv_wr32(priv, 0x404154, 0x00000400); |
1255 | nvc0_graph_mthd(priv, oclass->mthd); | 1255 | nvc0_gr_mthd(priv, oclass->mthd); |
1256 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); | 1256 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); |
1257 | } | 1257 | } |
1258 | 1258 | ||
1259 | int | 1259 | int |
1260 | nvc0_grctx_generate(struct nvc0_graph_priv *priv) | 1260 | nvc0_grctx_generate(struct nvc0_gr_priv *priv) |
1261 | { | 1261 | { |
1262 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; | 1262 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; |
1263 | struct nouveau_bar *bar = nouveau_bar(priv); | 1263 | struct nouveau_bar *bar = nouveau_bar(priv); |
@@ -1361,12 +1361,12 @@ struct nouveau_oclass * | |||
1361 | nvc0_grctx_oclass = &(struct nvc0_grctx_oclass) { | 1361 | nvc0_grctx_oclass = &(struct nvc0_grctx_oclass) { |
1362 | .base.handle = NV_ENGCTX(GR, 0xc0), | 1362 | .base.handle = NV_ENGCTX(GR, 0xc0), |
1363 | .base.ofuncs = &(struct nouveau_ofuncs) { | 1363 | .base.ofuncs = &(struct nouveau_ofuncs) { |
1364 | .ctor = nvc0_graph_context_ctor, | 1364 | .ctor = nvc0_gr_context_ctor, |
1365 | .dtor = nvc0_graph_context_dtor, | 1365 | .dtor = nvc0_gr_context_dtor, |
1366 | .init = _nouveau_graph_context_init, | 1366 | .init = _nouveau_gr_context_init, |
1367 | .fini = _nouveau_graph_context_fini, | 1367 | .fini = _nouveau_gr_context_fini, |
1368 | .rd32 = _nouveau_graph_context_rd32, | 1368 | .rd32 = _nouveau_gr_context_rd32, |
1369 | .wr32 = _nouveau_graph_context_wr32, | 1369 | .wr32 = _nouveau_gr_context_wr32, |
1370 | }, | 1370 | }, |
1371 | .main = nvc0_grctx_generate_main, | 1371 | .main = nvc0_grctx_generate_main, |
1372 | .unkn = nvc0_grctx_generate_unkn, | 1372 | .unkn = nvc0_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc0.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc0.h new file mode 100644 index 000000000000..0dbcd5839252 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc0.h | |||
@@ -0,0 +1,202 @@ | |||
1 | #ifndef __NVKM_GRCTX_NVC0_H__ | ||
2 | #define __NVKM_GRCTX_NVC0_H__ | ||
3 | |||
4 | #include "nvc0.h" | ||
5 | |||
6 | struct nvc0_grctx { | ||
7 | struct nvc0_gr_priv *priv; | ||
8 | struct nvc0_gr_data *data; | ||
9 | struct nvc0_gr_mmio *mmio; | ||
10 | int buffer_nr; | ||
11 | u64 buffer[4]; | ||
12 | u64 addr; | ||
13 | }; | ||
14 | |||
15 | int nvc0_grctx_mmio_data(struct nvc0_grctx *, u32 size, u32 align, u32 access); | ||
16 | void nvc0_grctx_mmio_item(struct nvc0_grctx *, u32 addr, u32 data, int s, int); | ||
17 | |||
18 | #define mmio_vram(a,b,c,d) nvc0_grctx_mmio_data((a), (b), (c), (d)) | ||
19 | #define mmio_refn(a,b,c,d,e) nvc0_grctx_mmio_item((a), (b), (c), (d), (e)) | ||
20 | #define mmio_skip(a,b,c) mmio_refn((a), (b), (c), -1, -1) | ||
21 | #define mmio_wr32(a,b,c) mmio_refn((a), (b), (c), 0, -1) | ||
22 | |||
23 | struct nvc0_grctx_oclass { | ||
24 | struct nouveau_oclass base; | ||
25 | /* main context generation function */ | ||
26 | void (*main)(struct nvc0_gr_priv *, struct nvc0_grctx *); | ||
27 | /* context-specific modify-on-first-load list generation function */ | ||
28 | void (*unkn)(struct nvc0_gr_priv *); | ||
29 | /* mmio context data */ | ||
30 | const struct nvc0_gr_pack *hub; | ||
31 | const struct nvc0_gr_pack *gpc; | ||
32 | const struct nvc0_gr_pack *zcull; | ||
33 | const struct nvc0_gr_pack *tpc; | ||
34 | const struct nvc0_gr_pack *ppc; | ||
35 | /* indirect context data, generated with icmds/mthds */ | ||
36 | const struct nvc0_gr_pack *icmd; | ||
37 | const struct nvc0_gr_pack *mthd; | ||
38 | /* bundle circular buffer */ | ||
39 | void (*bundle)(struct nvc0_grctx *); | ||
40 | u32 bundle_size; | ||
41 | u32 bundle_min_gpm_fifo_depth; | ||
42 | u32 bundle_token_limit; | ||
43 | /* pagepool */ | ||
44 | void (*pagepool)(struct nvc0_grctx *); | ||
45 | u32 pagepool_size; | ||
46 | /* attribute(/alpha) circular buffer */ | ||
47 | void (*attrib)(struct nvc0_grctx *); | ||
48 | u32 attrib_nr_max; | ||
49 | u32 attrib_nr; | ||
50 | u32 alpha_nr_max; | ||
51 | u32 alpha_nr; | ||
52 | }; | ||
53 | |||
54 | static inline const struct nvc0_grctx_oclass * | ||
55 | nvc0_grctx_impl(struct nvc0_gr_priv *priv) | ||
56 | { | ||
57 | return (void *)nv_engine(priv)->cclass; | ||
58 | } | ||
59 | |||
60 | extern struct nouveau_oclass *nvc0_grctx_oclass; | ||
61 | int nvc0_grctx_generate(struct nvc0_gr_priv *); | ||
62 | void nvc0_grctx_generate_main(struct nvc0_gr_priv *, struct nvc0_grctx *); | ||
63 | void nvc0_grctx_generate_bundle(struct nvc0_grctx *); | ||
64 | void nvc0_grctx_generate_pagepool(struct nvc0_grctx *); | ||
65 | void nvc0_grctx_generate_attrib(struct nvc0_grctx *); | ||
66 | void nvc0_grctx_generate_unkn(struct nvc0_gr_priv *); | ||
67 | void nvc0_grctx_generate_tpcid(struct nvc0_gr_priv *); | ||
68 | void nvc0_grctx_generate_r406028(struct nvc0_gr_priv *); | ||
69 | void nvc0_grctx_generate_r4060a8(struct nvc0_gr_priv *); | ||
70 | void nvc0_grctx_generate_r418bb8(struct nvc0_gr_priv *); | ||
71 | void nvc0_grctx_generate_r406800(struct nvc0_gr_priv *); | ||
72 | |||
73 | extern struct nouveau_oclass *nvc1_grctx_oclass; | ||
74 | void nvc1_grctx_generate_attrib(struct nvc0_grctx *); | ||
75 | void nvc1_grctx_generate_unkn(struct nvc0_gr_priv *); | ||
76 | |||
77 | extern struct nouveau_oclass *nvc4_grctx_oclass; | ||
78 | extern struct nouveau_oclass *nvc8_grctx_oclass; | ||
79 | |||
80 | extern struct nouveau_oclass *nvd7_grctx_oclass; | ||
81 | void nvd7_grctx_generate_attrib(struct nvc0_grctx *); | ||
82 | |||
83 | extern struct nouveau_oclass *nvd9_grctx_oclass; | ||
84 | |||
85 | extern struct nouveau_oclass *nve4_grctx_oclass; | ||
86 | extern struct nouveau_oclass *gk20a_grctx_oclass; | ||
87 | void nve4_grctx_generate_main(struct nvc0_gr_priv *, struct nvc0_grctx *); | ||
88 | void nve4_grctx_generate_bundle(struct nvc0_grctx *); | ||
89 | void nve4_grctx_generate_pagepool(struct nvc0_grctx *); | ||
90 | void nve4_grctx_generate_unkn(struct nvc0_gr_priv *); | ||
91 | void nve4_grctx_generate_r418bb8(struct nvc0_gr_priv *); | ||
92 | |||
93 | extern struct nouveau_oclass *nvf0_grctx_oclass; | ||
94 | extern struct nouveau_oclass *gk110b_grctx_oclass; | ||
95 | extern struct nouveau_oclass *nv108_grctx_oclass; | ||
96 | extern struct nouveau_oclass *gm107_grctx_oclass; | ||
97 | |||
98 | /* context init value lists */ | ||
99 | |||
100 | extern const struct nvc0_gr_pack nvc0_grctx_pack_icmd[]; | ||
101 | |||
102 | extern const struct nvc0_gr_pack nvc0_grctx_pack_mthd[]; | ||
103 | extern const struct nvc0_gr_init nvc0_grctx_init_902d_0[]; | ||
104 | extern const struct nvc0_gr_init nvc0_grctx_init_9039_0[]; | ||
105 | extern const struct nvc0_gr_init nvc0_grctx_init_90c0_0[]; | ||
106 | |||
107 | extern const struct nvc0_gr_pack nvc0_grctx_pack_hub[]; | ||
108 | extern const struct nvc0_gr_init nvc0_grctx_init_main_0[]; | ||
109 | extern const struct nvc0_gr_init nvc0_grctx_init_fe_0[]; | ||
110 | extern const struct nvc0_gr_init nvc0_grctx_init_pri_0[]; | ||
111 | extern const struct nvc0_gr_init nvc0_grctx_init_memfmt_0[]; | ||
112 | extern const struct nvc0_gr_init nvc0_grctx_init_rstr2d_0[]; | ||
113 | extern const struct nvc0_gr_init nvc0_grctx_init_scc_0[]; | ||
114 | |||
115 | extern const struct nvc0_gr_pack nvc0_grctx_pack_gpc[]; | ||
116 | extern const struct nvc0_gr_init nvc0_grctx_init_gpc_unk_0[]; | ||
117 | extern const struct nvc0_gr_init nvc0_grctx_init_prop_0[]; | ||
118 | extern const struct nvc0_gr_init nvc0_grctx_init_gpc_unk_1[]; | ||
119 | extern const struct nvc0_gr_init nvc0_grctx_init_zcull_0[]; | ||
120 | extern const struct nvc0_gr_init nvc0_grctx_init_crstr_0[]; | ||
121 | extern const struct nvc0_gr_init nvc0_grctx_init_gpm_0[]; | ||
122 | extern const struct nvc0_gr_init nvc0_grctx_init_gcc_0[]; | ||
123 | |||
124 | extern const struct nvc0_gr_pack nvc0_grctx_pack_zcull[]; | ||
125 | |||
126 | extern const struct nvc0_gr_pack nvc0_grctx_pack_tpc[]; | ||
127 | extern const struct nvc0_gr_init nvc0_grctx_init_pe_0[]; | ||
128 | extern const struct nvc0_gr_init nvc0_grctx_init_wwdx_0[]; | ||
129 | extern const struct nvc0_gr_init nvc0_grctx_init_mpc_0[]; | ||
130 | extern const struct nvc0_gr_init nvc0_grctx_init_tpccs_0[]; | ||
131 | |||
132 | extern const struct nvc0_gr_init nvc4_grctx_init_tex_0[]; | ||
133 | extern const struct nvc0_gr_init nvc4_grctx_init_l1c_0[]; | ||
134 | extern const struct nvc0_gr_init nvc4_grctx_init_sm_0[]; | ||
135 | |||
136 | extern const struct nvc0_gr_init nvc1_grctx_init_9097_0[]; | ||
137 | |||
138 | extern const struct nvc0_gr_init nvc1_grctx_init_gpm_0[]; | ||
139 | |||
140 | extern const struct nvc0_gr_init nvc1_grctx_init_pe_0[]; | ||
141 | extern const struct nvc0_gr_init nvc1_grctx_init_wwdx_0[]; | ||
142 | extern const struct nvc0_gr_init nvc1_grctx_init_tpccs_0[]; | ||
143 | |||
144 | extern const struct nvc0_gr_init nvc8_grctx_init_9197_0[]; | ||
145 | extern const struct nvc0_gr_init nvc8_grctx_init_9297_0[]; | ||
146 | |||
147 | extern const struct nvc0_gr_pack nvd9_grctx_pack_icmd[]; | ||
148 | |||
149 | extern const struct nvc0_gr_pack nvd9_grctx_pack_mthd[]; | ||
150 | |||
151 | extern const struct nvc0_gr_init nvd9_grctx_init_fe_0[]; | ||
152 | extern const struct nvc0_gr_init nvd9_grctx_init_be_0[]; | ||
153 | |||
154 | extern const struct nvc0_gr_init nvd9_grctx_init_prop_0[]; | ||
155 | extern const struct nvc0_gr_init nvd9_grctx_init_gpc_unk_1[]; | ||
156 | extern const struct nvc0_gr_init nvd9_grctx_init_crstr_0[]; | ||
157 | |||
158 | extern const struct nvc0_gr_init nvd9_grctx_init_sm_0[]; | ||
159 | |||
160 | extern const struct nvc0_gr_init nvd7_grctx_init_pe_0[]; | ||
161 | |||
162 | extern const struct nvc0_gr_init nvd7_grctx_init_wwdx_0[]; | ||
163 | |||
164 | extern const struct nvc0_gr_init nve4_grctx_init_memfmt_0[]; | ||
165 | extern const struct nvc0_gr_init nve4_grctx_init_ds_0[]; | ||
166 | extern const struct nvc0_gr_init nve4_grctx_init_scc_0[]; | ||
167 | |||
168 | extern const struct nvc0_gr_init nve4_grctx_init_gpm_0[]; | ||
169 | |||
170 | extern const struct nvc0_gr_init nve4_grctx_init_pes_0[]; | ||
171 | |||
172 | extern const struct nvc0_gr_pack nve4_grctx_pack_hub[]; | ||
173 | extern const struct nvc0_gr_pack nve4_grctx_pack_gpc[]; | ||
174 | extern const struct nvc0_gr_pack nve4_grctx_pack_tpc[]; | ||
175 | extern const struct nvc0_gr_pack nve4_grctx_pack_ppc[]; | ||
176 | extern const struct nvc0_gr_pack nve4_grctx_pack_icmd[]; | ||
177 | extern const struct nvc0_gr_init nve4_grctx_init_a097_0[]; | ||
178 | |||
179 | extern const struct nvc0_gr_pack nvf0_grctx_pack_icmd[]; | ||
180 | |||
181 | extern const struct nvc0_gr_pack nvf0_grctx_pack_mthd[]; | ||
182 | |||
183 | extern const struct nvc0_gr_pack nvf0_grctx_pack_hub[]; | ||
184 | extern const struct nvc0_gr_init nvf0_grctx_init_pri_0[]; | ||
185 | extern const struct nvc0_gr_init nvf0_grctx_init_cwd_0[]; | ||
186 | |||
187 | extern const struct nvc0_gr_pack nvf0_grctx_pack_gpc[]; | ||
188 | extern const struct nvc0_gr_init nvf0_grctx_init_gpc_unk_2[]; | ||
189 | |||
190 | extern const struct nvc0_gr_init nvf0_grctx_init_tex_0[]; | ||
191 | extern const struct nvc0_gr_init nvf0_grctx_init_mpc_0[]; | ||
192 | extern const struct nvc0_gr_init nvf0_grctx_init_l1c_0[]; | ||
193 | |||
194 | extern const struct nvc0_gr_pack nvf0_grctx_pack_ppc[]; | ||
195 | |||
196 | extern const struct nvc0_gr_init nv108_grctx_init_rstr2d_0[]; | ||
197 | |||
198 | extern const struct nvc0_gr_init nv108_grctx_init_prop_0[]; | ||
199 | extern const struct nvc0_gr_init nv108_grctx_init_crstr_0[]; | ||
200 | |||
201 | |||
202 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc1.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc1.c index c6ba8fed18f1..b5ced99abce9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc1.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc1.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nvc1_grctx_init_icmd_0[] = { | 32 | nvc1_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, | 34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, |
@@ -267,13 +267,13 @@ nvc1_grctx_init_icmd_0[] = { | |||
267 | {} | 267 | {} |
268 | }; | 268 | }; |
269 | 269 | ||
270 | static const struct nvc0_graph_pack | 270 | static const struct nvc0_gr_pack |
271 | nvc1_grctx_pack_icmd[] = { | 271 | nvc1_grctx_pack_icmd[] = { |
272 | { nvc1_grctx_init_icmd_0 }, | 272 | { nvc1_grctx_init_icmd_0 }, |
273 | {} | 273 | {} |
274 | }; | 274 | }; |
275 | 275 | ||
276 | const struct nvc0_graph_init | 276 | const struct nvc0_gr_init |
277 | nvc1_grctx_init_9097_0[] = { | 277 | nvc1_grctx_init_9097_0[] = { |
278 | { 0x000800, 8, 0x40, 0x00000000 }, | 278 | { 0x000800, 8, 0x40, 0x00000000 }, |
279 | { 0x000804, 8, 0x40, 0x00000000 }, | 279 | { 0x000804, 8, 0x40, 0x00000000 }, |
@@ -575,14 +575,14 @@ nvc1_grctx_init_9097_0[] = { | |||
575 | {} | 575 | {} |
576 | }; | 576 | }; |
577 | 577 | ||
578 | static const struct nvc0_graph_init | 578 | static const struct nvc0_gr_init |
579 | nvc1_grctx_init_9197_0[] = { | 579 | nvc1_grctx_init_9197_0[] = { |
580 | { 0x003400, 128, 0x04, 0x00000000 }, | 580 | { 0x003400, 128, 0x04, 0x00000000 }, |
581 | { 0x0002e4, 1, 0x04, 0x0000b001 }, | 581 | { 0x0002e4, 1, 0x04, 0x0000b001 }, |
582 | {} | 582 | {} |
583 | }; | 583 | }; |
584 | 584 | ||
585 | static const struct nvc0_graph_pack | 585 | static const struct nvc0_gr_pack |
586 | nvc1_grctx_pack_mthd[] = { | 586 | nvc1_grctx_pack_mthd[] = { |
587 | { nvc1_grctx_init_9097_0, 0x9097 }, | 587 | { nvc1_grctx_init_9097_0, 0x9097 }, |
588 | { nvc1_grctx_init_9197_0, 0x9197 }, | 588 | { nvc1_grctx_init_9197_0, 0x9197 }, |
@@ -592,7 +592,7 @@ nvc1_grctx_pack_mthd[] = { | |||
592 | {} | 592 | {} |
593 | }; | 593 | }; |
594 | 594 | ||
595 | static const struct nvc0_graph_init | 595 | static const struct nvc0_gr_init |
596 | nvc1_grctx_init_ds_0[] = { | 596 | nvc1_grctx_init_ds_0[] = { |
597 | { 0x405800, 1, 0x04, 0x0f8000bf }, | 597 | { 0x405800, 1, 0x04, 0x0f8000bf }, |
598 | { 0x405830, 1, 0x04, 0x02180218 }, | 598 | { 0x405830, 1, 0x04, 0x02180218 }, |
@@ -604,7 +604,7 @@ nvc1_grctx_init_ds_0[] = { | |||
604 | {} | 604 | {} |
605 | }; | 605 | }; |
606 | 606 | ||
607 | static const struct nvc0_graph_init | 607 | static const struct nvc0_gr_init |
608 | nvc1_grctx_init_pd_0[] = { | 608 | nvc1_grctx_init_pd_0[] = { |
609 | { 0x406020, 1, 0x04, 0x000103c1 }, | 609 | { 0x406020, 1, 0x04, 0x000103c1 }, |
610 | { 0x406028, 4, 0x04, 0x00000001 }, | 610 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -616,7 +616,7 @@ nvc1_grctx_init_pd_0[] = { | |||
616 | {} | 616 | {} |
617 | }; | 617 | }; |
618 | 618 | ||
619 | static const struct nvc0_graph_init | 619 | static const struct nvc0_gr_init |
620 | nvc1_grctx_init_be_0[] = { | 620 | nvc1_grctx_init_be_0[] = { |
621 | { 0x408800, 1, 0x04, 0x02802a3c }, | 621 | { 0x408800, 1, 0x04, 0x02802a3c }, |
622 | { 0x408804, 1, 0x04, 0x00000040 }, | 622 | { 0x408804, 1, 0x04, 0x00000040 }, |
@@ -628,7 +628,7 @@ nvc1_grctx_init_be_0[] = { | |||
628 | {} | 628 | {} |
629 | }; | 629 | }; |
630 | 630 | ||
631 | static const struct nvc0_graph_pack | 631 | static const struct nvc0_gr_pack |
632 | nvc1_grctx_pack_hub[] = { | 632 | nvc1_grctx_pack_hub[] = { |
633 | { nvc0_grctx_init_main_0 }, | 633 | { nvc0_grctx_init_main_0 }, |
634 | { nvc0_grctx_init_fe_0 }, | 634 | { nvc0_grctx_init_fe_0 }, |
@@ -642,7 +642,7 @@ nvc1_grctx_pack_hub[] = { | |||
642 | {} | 642 | {} |
643 | }; | 643 | }; |
644 | 644 | ||
645 | static const struct nvc0_graph_init | 645 | static const struct nvc0_gr_init |
646 | nvc1_grctx_init_setup_0[] = { | 646 | nvc1_grctx_init_setup_0[] = { |
647 | { 0x418800, 1, 0x04, 0x0006860a }, | 647 | { 0x418800, 1, 0x04, 0x0006860a }, |
648 | { 0x418808, 3, 0x04, 0x00000000 }, | 648 | { 0x418808, 3, 0x04, 0x00000000 }, |
@@ -655,7 +655,7 @@ nvc1_grctx_init_setup_0[] = { | |||
655 | {} | 655 | {} |
656 | }; | 656 | }; |
657 | 657 | ||
658 | const struct nvc0_graph_init | 658 | const struct nvc0_gr_init |
659 | nvc1_grctx_init_gpm_0[] = { | 659 | nvc1_grctx_init_gpm_0[] = { |
660 | { 0x418c08, 1, 0x04, 0x00000001 }, | 660 | { 0x418c08, 1, 0x04, 0x00000001 }, |
661 | { 0x418c10, 8, 0x04, 0x00000000 }, | 661 | { 0x418c10, 8, 0x04, 0x00000000 }, |
@@ -665,7 +665,7 @@ nvc1_grctx_init_gpm_0[] = { | |||
665 | {} | 665 | {} |
666 | }; | 666 | }; |
667 | 667 | ||
668 | static const struct nvc0_graph_pack | 668 | static const struct nvc0_gr_pack |
669 | nvc1_grctx_pack_gpc[] = { | 669 | nvc1_grctx_pack_gpc[] = { |
670 | { nvc0_grctx_init_gpc_unk_0 }, | 670 | { nvc0_grctx_init_gpc_unk_0 }, |
671 | { nvc0_grctx_init_prop_0 }, | 671 | { nvc0_grctx_init_prop_0 }, |
@@ -678,7 +678,7 @@ nvc1_grctx_pack_gpc[] = { | |||
678 | {} | 678 | {} |
679 | }; | 679 | }; |
680 | 680 | ||
681 | const struct nvc0_graph_init | 681 | const struct nvc0_gr_init |
682 | nvc1_grctx_init_pe_0[] = { | 682 | nvc1_grctx_init_pe_0[] = { |
683 | { 0x419818, 1, 0x04, 0x00000000 }, | 683 | { 0x419818, 1, 0x04, 0x00000000 }, |
684 | { 0x41983c, 1, 0x04, 0x00038bc7 }, | 684 | { 0x41983c, 1, 0x04, 0x00038bc7 }, |
@@ -688,7 +688,7 @@ nvc1_grctx_init_pe_0[] = { | |||
688 | {} | 688 | {} |
689 | }; | 689 | }; |
690 | 690 | ||
691 | const struct nvc0_graph_init | 691 | const struct nvc0_gr_init |
692 | nvc1_grctx_init_wwdx_0[] = { | 692 | nvc1_grctx_init_wwdx_0[] = { |
693 | { 0x419b00, 1, 0x04, 0x0a418820 }, | 693 | { 0x419b00, 1, 0x04, 0x0a418820 }, |
694 | { 0x419b04, 1, 0x04, 0x062080e6 }, | 694 | { 0x419b04, 1, 0x04, 0x062080e6 }, |
@@ -702,7 +702,7 @@ nvc1_grctx_init_wwdx_0[] = { | |||
702 | {} | 702 | {} |
703 | }; | 703 | }; |
704 | 704 | ||
705 | const struct nvc0_graph_init | 705 | const struct nvc0_gr_init |
706 | nvc1_grctx_init_tpccs_0[] = { | 706 | nvc1_grctx_init_tpccs_0[] = { |
707 | { 0x419d20, 1, 0x04, 0x12180000 }, | 707 | { 0x419d20, 1, 0x04, 0x12180000 }, |
708 | { 0x419d24, 1, 0x04, 0x00001fff }, | 708 | { 0x419d24, 1, 0x04, 0x00001fff }, |
@@ -710,7 +710,7 @@ nvc1_grctx_init_tpccs_0[] = { | |||
710 | {} | 710 | {} |
711 | }; | 711 | }; |
712 | 712 | ||
713 | static const struct nvc0_graph_pack | 713 | static const struct nvc0_gr_pack |
714 | nvc1_grctx_pack_tpc[] = { | 714 | nvc1_grctx_pack_tpc[] = { |
715 | { nvc1_grctx_init_pe_0 }, | 715 | { nvc1_grctx_init_pe_0 }, |
716 | { nvc4_grctx_init_tex_0 }, | 716 | { nvc4_grctx_init_tex_0 }, |
@@ -729,7 +729,7 @@ nvc1_grctx_pack_tpc[] = { | |||
729 | void | 729 | void |
730 | nvc1_grctx_generate_attrib(struct nvc0_grctx *info) | 730 | nvc1_grctx_generate_attrib(struct nvc0_grctx *info) |
731 | { | 731 | { |
732 | struct nvc0_graph_priv *priv = info->priv; | 732 | struct nvc0_gr_priv *priv = info->priv; |
733 | const struct nvc0_grctx_oclass *impl = nvc0_grctx_impl(priv); | 733 | const struct nvc0_grctx_oclass *impl = nvc0_grctx_impl(priv); |
734 | const u32 alpha = impl->alpha_nr; | 734 | const u32 alpha = impl->alpha_nr; |
735 | const u32 beta = impl->attrib_nr; | 735 | const u32 beta = impl->attrib_nr; |
@@ -764,7 +764,7 @@ nvc1_grctx_generate_attrib(struct nvc0_grctx *info) | |||
764 | } | 764 | } |
765 | 765 | ||
766 | void | 766 | void |
767 | nvc1_grctx_generate_unkn(struct nvc0_graph_priv *priv) | 767 | nvc1_grctx_generate_unkn(struct nvc0_gr_priv *priv) |
768 | { | 768 | { |
769 | nv_mask(priv, 0x418c6c, 0x00000001, 0x00000001); | 769 | nv_mask(priv, 0x418c6c, 0x00000001, 0x00000001); |
770 | nv_mask(priv, 0x41980c, 0x00000010, 0x00000010); | 770 | nv_mask(priv, 0x41980c, 0x00000010, 0x00000010); |
@@ -778,12 +778,12 @@ struct nouveau_oclass * | |||
778 | nvc1_grctx_oclass = &(struct nvc0_grctx_oclass) { | 778 | nvc1_grctx_oclass = &(struct nvc0_grctx_oclass) { |
779 | .base.handle = NV_ENGCTX(GR, 0xc1), | 779 | .base.handle = NV_ENGCTX(GR, 0xc1), |
780 | .base.ofuncs = &(struct nouveau_ofuncs) { | 780 | .base.ofuncs = &(struct nouveau_ofuncs) { |
781 | .ctor = nvc0_graph_context_ctor, | 781 | .ctor = nvc0_gr_context_ctor, |
782 | .dtor = nvc0_graph_context_dtor, | 782 | .dtor = nvc0_gr_context_dtor, |
783 | .init = _nouveau_graph_context_init, | 783 | .init = _nouveau_gr_context_init, |
784 | .fini = _nouveau_graph_context_fini, | 784 | .fini = _nouveau_gr_context_fini, |
785 | .rd32 = _nouveau_graph_context_rd32, | 785 | .rd32 = _nouveau_gr_context_rd32, |
786 | .wr32 = _nouveau_graph_context_wr32, | 786 | .wr32 = _nouveau_gr_context_wr32, |
787 | }, | 787 | }, |
788 | .main = nvc0_grctx_generate_main, | 788 | .main = nvc0_grctx_generate_main, |
789 | .unkn = nvc1_grctx_generate_unkn, | 789 | .unkn = nvc1_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc4.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc4.c index 41705c60cc47..c883e7229fd5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc4.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc4.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | const struct nvc0_graph_init | 31 | const struct nvc0_gr_init |
32 | nvc4_grctx_init_tex_0[] = { | 32 | nvc4_grctx_init_tex_0[] = { |
33 | { 0x419a00, 1, 0x04, 0x000001f0 }, | 33 | { 0x419a00, 1, 0x04, 0x000001f0 }, |
34 | { 0x419a04, 1, 0x04, 0x00000001 }, | 34 | { 0x419a04, 1, 0x04, 0x00000001 }, |
@@ -42,7 +42,7 @@ nvc4_grctx_init_tex_0[] = { | |||
42 | {} | 42 | {} |
43 | }; | 43 | }; |
44 | 44 | ||
45 | const struct nvc0_graph_init | 45 | const struct nvc0_gr_init |
46 | nvc4_grctx_init_l1c_0[] = { | 46 | nvc4_grctx_init_l1c_0[] = { |
47 | { 0x419cb0, 1, 0x04, 0x00020048 }, | 47 | { 0x419cb0, 1, 0x04, 0x00020048 }, |
48 | { 0x419ce8, 1, 0x04, 0x00000000 }, | 48 | { 0x419ce8, 1, 0x04, 0x00000000 }, |
@@ -50,7 +50,7 @@ nvc4_grctx_init_l1c_0[] = { | |||
50 | {} | 50 | {} |
51 | }; | 51 | }; |
52 | 52 | ||
53 | const struct nvc0_graph_init | 53 | const struct nvc0_gr_init |
54 | nvc4_grctx_init_sm_0[] = { | 54 | nvc4_grctx_init_sm_0[] = { |
55 | { 0x419e04, 3, 0x04, 0x00000000 }, | 55 | { 0x419e04, 3, 0x04, 0x00000000 }, |
56 | { 0x419e10, 1, 0x04, 0x00000002 }, | 56 | { 0x419e10, 1, 0x04, 0x00000002 }, |
@@ -64,7 +64,7 @@ nvc4_grctx_init_sm_0[] = { | |||
64 | {} | 64 | {} |
65 | }; | 65 | }; |
66 | 66 | ||
67 | static const struct nvc0_graph_pack | 67 | static const struct nvc0_gr_pack |
68 | nvc4_grctx_pack_tpc[] = { | 68 | nvc4_grctx_pack_tpc[] = { |
69 | { nvc0_grctx_init_pe_0 }, | 69 | { nvc0_grctx_init_pe_0 }, |
70 | { nvc4_grctx_init_tex_0 }, | 70 | { nvc4_grctx_init_tex_0 }, |
@@ -84,12 +84,12 @@ struct nouveau_oclass * | |||
84 | nvc4_grctx_oclass = &(struct nvc0_grctx_oclass) { | 84 | nvc4_grctx_oclass = &(struct nvc0_grctx_oclass) { |
85 | .base.handle = NV_ENGCTX(GR, 0xc3), | 85 | .base.handle = NV_ENGCTX(GR, 0xc3), |
86 | .base.ofuncs = &(struct nouveau_ofuncs) { | 86 | .base.ofuncs = &(struct nouveau_ofuncs) { |
87 | .ctor = nvc0_graph_context_ctor, | 87 | .ctor = nvc0_gr_context_ctor, |
88 | .dtor = nvc0_graph_context_dtor, | 88 | .dtor = nvc0_gr_context_dtor, |
89 | .init = _nouveau_graph_context_init, | 89 | .init = _nouveau_gr_context_init, |
90 | .fini = _nouveau_graph_context_fini, | 90 | .fini = _nouveau_gr_context_fini, |
91 | .rd32 = _nouveau_graph_context_rd32, | 91 | .rd32 = _nouveau_gr_context_rd32, |
92 | .wr32 = _nouveau_graph_context_wr32, | 92 | .wr32 = _nouveau_gr_context_wr32, |
93 | }, | 93 | }, |
94 | .main = nvc0_grctx_generate_main, | 94 | .main = nvc0_grctx_generate_main, |
95 | .unkn = nvc0_grctx_generate_unkn, | 95 | .unkn = nvc0_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc8.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc8.c index 8f804cd8f9c7..4876a9375803 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc8.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvc8.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nvc8_grctx_init_icmd_0[] = { | 32 | nvc8_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, | 34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, |
@@ -268,19 +268,19 @@ nvc8_grctx_init_icmd_0[] = { | |||
268 | {} | 268 | {} |
269 | }; | 269 | }; |
270 | 270 | ||
271 | static const struct nvc0_graph_pack | 271 | static const struct nvc0_gr_pack |
272 | nvc8_grctx_pack_icmd[] = { | 272 | nvc8_grctx_pack_icmd[] = { |
273 | { nvc8_grctx_init_icmd_0 }, | 273 | { nvc8_grctx_init_icmd_0 }, |
274 | {} | 274 | {} |
275 | }; | 275 | }; |
276 | 276 | ||
277 | const struct nvc0_graph_init | 277 | const struct nvc0_gr_init |
278 | nvc8_grctx_init_9197_0[] = { | 278 | nvc8_grctx_init_9197_0[] = { |
279 | { 0x0002e4, 1, 0x04, 0x0000b001 }, | 279 | { 0x0002e4, 1, 0x04, 0x0000b001 }, |
280 | {} | 280 | {} |
281 | }; | 281 | }; |
282 | 282 | ||
283 | const struct nvc0_graph_init | 283 | const struct nvc0_gr_init |
284 | nvc8_grctx_init_9297_0[] = { | 284 | nvc8_grctx_init_9297_0[] = { |
285 | { 0x003400, 128, 0x04, 0x00000000 }, | 285 | { 0x003400, 128, 0x04, 0x00000000 }, |
286 | { 0x00036c, 2, 0x04, 0x00000000 }, | 286 | { 0x00036c, 2, 0x04, 0x00000000 }, |
@@ -290,7 +290,7 @@ nvc8_grctx_init_9297_0[] = { | |||
290 | {} | 290 | {} |
291 | }; | 291 | }; |
292 | 292 | ||
293 | static const struct nvc0_graph_pack | 293 | static const struct nvc0_gr_pack |
294 | nvc8_grctx_pack_mthd[] = { | 294 | nvc8_grctx_pack_mthd[] = { |
295 | { nvc1_grctx_init_9097_0, 0x9097 }, | 295 | { nvc1_grctx_init_9097_0, 0x9097 }, |
296 | { nvc8_grctx_init_9197_0, 0x9197 }, | 296 | { nvc8_grctx_init_9197_0, 0x9197 }, |
@@ -301,7 +301,7 @@ nvc8_grctx_pack_mthd[] = { | |||
301 | {} | 301 | {} |
302 | }; | 302 | }; |
303 | 303 | ||
304 | static const struct nvc0_graph_init | 304 | static const struct nvc0_gr_init |
305 | nvc8_grctx_init_setup_0[] = { | 305 | nvc8_grctx_init_setup_0[] = { |
306 | { 0x418800, 1, 0x04, 0x0006860a }, | 306 | { 0x418800, 1, 0x04, 0x0006860a }, |
307 | { 0x418808, 3, 0x04, 0x00000000 }, | 307 | { 0x418808, 3, 0x04, 0x00000000 }, |
@@ -314,7 +314,7 @@ nvc8_grctx_init_setup_0[] = { | |||
314 | {} | 314 | {} |
315 | }; | 315 | }; |
316 | 316 | ||
317 | static const struct nvc0_graph_pack | 317 | static const struct nvc0_gr_pack |
318 | nvc8_grctx_pack_gpc[] = { | 318 | nvc8_grctx_pack_gpc[] = { |
319 | { nvc0_grctx_init_gpc_unk_0 }, | 319 | { nvc0_grctx_init_gpc_unk_0 }, |
320 | { nvc0_grctx_init_prop_0 }, | 320 | { nvc0_grctx_init_prop_0 }, |
@@ -335,12 +335,12 @@ struct nouveau_oclass * | |||
335 | nvc8_grctx_oclass = &(struct nvc0_grctx_oclass) { | 335 | nvc8_grctx_oclass = &(struct nvc0_grctx_oclass) { |
336 | .base.handle = NV_ENGCTX(GR, 0xc8), | 336 | .base.handle = NV_ENGCTX(GR, 0xc8), |
337 | .base.ofuncs = &(struct nouveau_ofuncs) { | 337 | .base.ofuncs = &(struct nouveau_ofuncs) { |
338 | .ctor = nvc0_graph_context_ctor, | 338 | .ctor = nvc0_gr_context_ctor, |
339 | .dtor = nvc0_graph_context_dtor, | 339 | .dtor = nvc0_gr_context_dtor, |
340 | .init = _nouveau_graph_context_init, | 340 | .init = _nouveau_gr_context_init, |
341 | .fini = _nouveau_graph_context_fini, | 341 | .fini = _nouveau_gr_context_fini, |
342 | .rd32 = _nouveau_graph_context_rd32, | 342 | .rd32 = _nouveau_gr_context_rd32, |
343 | .wr32 = _nouveau_graph_context_wr32, | 343 | .wr32 = _nouveau_gr_context_wr32, |
344 | }, | 344 | }, |
345 | .main = nvc0_grctx_generate_main, | 345 | .main = nvc0_grctx_generate_main, |
346 | .unkn = nvc0_grctx_generate_unkn, | 346 | .unkn = nvc0_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvd7.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvd7.c index fcf534fd9e65..b53896c511d9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvd7.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvd7.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nvd7_grctx_init_ds_0[] = { | 32 | nvd7_grctx_init_ds_0[] = { |
33 | { 0x405800, 1, 0x04, 0x0f8000bf }, | 33 | { 0x405800, 1, 0x04, 0x0f8000bf }, |
34 | { 0x405830, 1, 0x04, 0x02180324 }, | 34 | { 0x405830, 1, 0x04, 0x02180324 }, |
@@ -41,7 +41,7 @@ nvd7_grctx_init_ds_0[] = { | |||
41 | {} | 41 | {} |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static const struct nvc0_graph_init | 44 | static const struct nvc0_gr_init |
45 | nvd7_grctx_init_pd_0[] = { | 45 | nvd7_grctx_init_pd_0[] = { |
46 | { 0x406020, 1, 0x04, 0x000103c1 }, | 46 | { 0x406020, 1, 0x04, 0x000103c1 }, |
47 | { 0x406028, 4, 0x04, 0x00000001 }, | 47 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -54,7 +54,7 @@ nvd7_grctx_init_pd_0[] = { | |||
54 | {} | 54 | {} |
55 | }; | 55 | }; |
56 | 56 | ||
57 | static const struct nvc0_graph_pack | 57 | static const struct nvc0_gr_pack |
58 | nvd7_grctx_pack_hub[] = { | 58 | nvd7_grctx_pack_hub[] = { |
59 | { nvc0_grctx_init_main_0 }, | 59 | { nvc0_grctx_init_main_0 }, |
60 | { nvd9_grctx_init_fe_0 }, | 60 | { nvd9_grctx_init_fe_0 }, |
@@ -68,7 +68,7 @@ nvd7_grctx_pack_hub[] = { | |||
68 | {} | 68 | {} |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static const struct nvc0_graph_init | 71 | static const struct nvc0_gr_init |
72 | nvd7_grctx_init_setup_0[] = { | 72 | nvd7_grctx_init_setup_0[] = { |
73 | { 0x418800, 1, 0x04, 0x7006860a }, | 73 | { 0x418800, 1, 0x04, 0x7006860a }, |
74 | { 0x418808, 3, 0x04, 0x00000000 }, | 74 | { 0x418808, 3, 0x04, 0x00000000 }, |
@@ -81,7 +81,7 @@ nvd7_grctx_init_setup_0[] = { | |||
81 | {} | 81 | {} |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static const struct nvc0_graph_pack | 84 | static const struct nvc0_gr_pack |
85 | nvd7_grctx_pack_gpc[] = { | 85 | nvd7_grctx_pack_gpc[] = { |
86 | { nvc0_grctx_init_gpc_unk_0 }, | 86 | { nvc0_grctx_init_gpc_unk_0 }, |
87 | { nvd9_grctx_init_prop_0 }, | 87 | { nvd9_grctx_init_prop_0 }, |
@@ -94,7 +94,7 @@ nvd7_grctx_pack_gpc[] = { | |||
94 | {} | 94 | {} |
95 | }; | 95 | }; |
96 | 96 | ||
97 | const struct nvc0_graph_init | 97 | const struct nvc0_gr_init |
98 | nvd7_grctx_init_pe_0[] = { | 98 | nvd7_grctx_init_pe_0[] = { |
99 | { 0x419848, 1, 0x04, 0x00000000 }, | 99 | { 0x419848, 1, 0x04, 0x00000000 }, |
100 | { 0x419864, 1, 0x04, 0x00000129 }, | 100 | { 0x419864, 1, 0x04, 0x00000129 }, |
@@ -102,7 +102,7 @@ nvd7_grctx_init_pe_0[] = { | |||
102 | {} | 102 | {} |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static const struct nvc0_graph_init | 105 | static const struct nvc0_gr_init |
106 | nvd7_grctx_init_tex_0[] = { | 106 | nvd7_grctx_init_tex_0[] = { |
107 | { 0x419a00, 1, 0x04, 0x000001f0 }, | 107 | { 0x419a00, 1, 0x04, 0x000001f0 }, |
108 | { 0x419a04, 1, 0x04, 0x00000001 }, | 108 | { 0x419a04, 1, 0x04, 0x00000001 }, |
@@ -116,7 +116,7 @@ nvd7_grctx_init_tex_0[] = { | |||
116 | {} | 116 | {} |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static const struct nvc0_graph_init | 119 | static const struct nvc0_gr_init |
120 | nvd7_grctx_init_mpc_0[] = { | 120 | nvd7_grctx_init_mpc_0[] = { |
121 | { 0x419c00, 1, 0x04, 0x0000000a }, | 121 | { 0x419c00, 1, 0x04, 0x0000000a }, |
122 | { 0x419c04, 1, 0x04, 0x00000006 }, | 122 | { 0x419c04, 1, 0x04, 0x00000006 }, |
@@ -127,7 +127,7 @@ nvd7_grctx_init_mpc_0[] = { | |||
127 | {} | 127 | {} |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static const struct nvc0_graph_pack | 130 | static const struct nvc0_gr_pack |
131 | nvd7_grctx_pack_tpc[] = { | 131 | nvd7_grctx_pack_tpc[] = { |
132 | { nvd7_grctx_init_pe_0 }, | 132 | { nvd7_grctx_init_pe_0 }, |
133 | { nvd7_grctx_init_tex_0 }, | 133 | { nvd7_grctx_init_tex_0 }, |
@@ -137,13 +137,13 @@ nvd7_grctx_pack_tpc[] = { | |||
137 | {} | 137 | {} |
138 | }; | 138 | }; |
139 | 139 | ||
140 | static const struct nvc0_graph_init | 140 | static const struct nvc0_gr_init |
141 | nvd7_grctx_init_pes_0[] = { | 141 | nvd7_grctx_init_pes_0[] = { |
142 | { 0x41be24, 1, 0x04, 0x00000002 }, | 142 | { 0x41be24, 1, 0x04, 0x00000002 }, |
143 | {} | 143 | {} |
144 | }; | 144 | }; |
145 | 145 | ||
146 | static const struct nvc0_graph_init | 146 | static const struct nvc0_gr_init |
147 | nvd7_grctx_init_cbm_0[] = { | 147 | nvd7_grctx_init_cbm_0[] = { |
148 | { 0x41bec0, 1, 0x04, 0x12180000 }, | 148 | { 0x41bec0, 1, 0x04, 0x12180000 }, |
149 | { 0x41bec4, 1, 0x04, 0x00003fff }, | 149 | { 0x41bec4, 1, 0x04, 0x00003fff }, |
@@ -151,7 +151,7 @@ nvd7_grctx_init_cbm_0[] = { | |||
151 | {} | 151 | {} |
152 | }; | 152 | }; |
153 | 153 | ||
154 | const struct nvc0_graph_init | 154 | const struct nvc0_gr_init |
155 | nvd7_grctx_init_wwdx_0[] = { | 155 | nvd7_grctx_init_wwdx_0[] = { |
156 | { 0x41bf00, 1, 0x04, 0x0a418820 }, | 156 | { 0x41bf00, 1, 0x04, 0x0a418820 }, |
157 | { 0x41bf04, 1, 0x04, 0x062080e6 }, | 157 | { 0x41bf04, 1, 0x04, 0x062080e6 }, |
@@ -165,7 +165,7 @@ nvd7_grctx_init_wwdx_0[] = { | |||
165 | {} | 165 | {} |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static const struct nvc0_graph_pack | 168 | static const struct nvc0_gr_pack |
169 | nvd7_grctx_pack_ppc[] = { | 169 | nvd7_grctx_pack_ppc[] = { |
170 | { nvd7_grctx_init_pes_0 }, | 170 | { nvd7_grctx_init_pes_0 }, |
171 | { nvd7_grctx_init_cbm_0 }, | 171 | { nvd7_grctx_init_cbm_0 }, |
@@ -180,7 +180,7 @@ nvd7_grctx_pack_ppc[] = { | |||
180 | void | 180 | void |
181 | nvd7_grctx_generate_attrib(struct nvc0_grctx *info) | 181 | nvd7_grctx_generate_attrib(struct nvc0_grctx *info) |
182 | { | 182 | { |
183 | struct nvc0_graph_priv *priv = info->priv; | 183 | struct nvc0_gr_priv *priv = info->priv; |
184 | const struct nvc0_grctx_oclass *impl = nvc0_grctx_impl(priv); | 184 | const struct nvc0_grctx_oclass *impl = nvc0_grctx_impl(priv); |
185 | const u32 alpha = impl->alpha_nr; | 185 | const u32 alpha = impl->alpha_nr; |
186 | const u32 beta = impl->attrib_nr; | 186 | const u32 beta = impl->attrib_nr; |
@@ -215,18 +215,18 @@ nvd7_grctx_generate_attrib(struct nvc0_grctx *info) | |||
215 | } | 215 | } |
216 | 216 | ||
217 | void | 217 | void |
218 | nvd7_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | 218 | nvd7_grctx_generate_main(struct nvc0_gr_priv *priv, struct nvc0_grctx *info) |
219 | { | 219 | { |
220 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; | 220 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; |
221 | int i; | 221 | int i; |
222 | 222 | ||
223 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); | 223 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); |
224 | 224 | ||
225 | nvc0_graph_mmio(priv, oclass->hub); | 225 | nvc0_gr_mmio(priv, oclass->hub); |
226 | nvc0_graph_mmio(priv, oclass->gpc); | 226 | nvc0_gr_mmio(priv, oclass->gpc); |
227 | nvc0_graph_mmio(priv, oclass->zcull); | 227 | nvc0_gr_mmio(priv, oclass->zcull); |
228 | nvc0_graph_mmio(priv, oclass->tpc); | 228 | nvc0_gr_mmio(priv, oclass->tpc); |
229 | nvc0_graph_mmio(priv, oclass->ppc); | 229 | nvc0_gr_mmio(priv, oclass->ppc); |
230 | 230 | ||
231 | nv_wr32(priv, 0x404154, 0x00000000); | 231 | nv_wr32(priv, 0x404154, 0x00000000); |
232 | 232 | ||
@@ -244,9 +244,9 @@ nvd7_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | |||
244 | for (i = 0; i < 8; i++) | 244 | for (i = 0; i < 8; i++) |
245 | nv_wr32(priv, 0x4064d0 + (i * 0x04), 0x00000000); | 245 | nv_wr32(priv, 0x4064d0 + (i * 0x04), 0x00000000); |
246 | 246 | ||
247 | nvc0_graph_icmd(priv, oclass->icmd); | 247 | nvc0_gr_icmd(priv, oclass->icmd); |
248 | nv_wr32(priv, 0x404154, 0x00000400); | 248 | nv_wr32(priv, 0x404154, 0x00000400); |
249 | nvc0_graph_mthd(priv, oclass->mthd); | 249 | nvc0_gr_mthd(priv, oclass->mthd); |
250 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); | 250 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); |
251 | } | 251 | } |
252 | 252 | ||
@@ -254,12 +254,12 @@ struct nouveau_oclass * | |||
254 | nvd7_grctx_oclass = &(struct nvc0_grctx_oclass) { | 254 | nvd7_grctx_oclass = &(struct nvc0_grctx_oclass) { |
255 | .base.handle = NV_ENGCTX(GR, 0xd7), | 255 | .base.handle = NV_ENGCTX(GR, 0xd7), |
256 | .base.ofuncs = &(struct nouveau_ofuncs) { | 256 | .base.ofuncs = &(struct nouveau_ofuncs) { |
257 | .ctor = nvc0_graph_context_ctor, | 257 | .ctor = nvc0_gr_context_ctor, |
258 | .dtor = nvc0_graph_context_dtor, | 258 | .dtor = nvc0_gr_context_dtor, |
259 | .init = _nouveau_graph_context_init, | 259 | .init = _nouveau_gr_context_init, |
260 | .fini = _nouveau_graph_context_fini, | 260 | .fini = _nouveau_gr_context_fini, |
261 | .rd32 = _nouveau_graph_context_rd32, | 261 | .rd32 = _nouveau_gr_context_rd32, |
262 | .wr32 = _nouveau_graph_context_wr32, | 262 | .wr32 = _nouveau_gr_context_wr32, |
263 | }, | 263 | }, |
264 | .main = nvd7_grctx_generate_main, | 264 | .main = nvd7_grctx_generate_main, |
265 | .unkn = nve4_grctx_generate_unkn, | 265 | .unkn = nve4_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvd9.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvd9.c index b9a301b6fd9f..adc69e247bf2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvd9.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvd9.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nvd9_grctx_init_icmd_0[] = { | 32 | nvd9_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, | 34 | { 0x0000a9, 1, 0x01, 0x0000ffff }, |
@@ -270,13 +270,13 @@ nvd9_grctx_init_icmd_0[] = { | |||
270 | {} | 270 | {} |
271 | }; | 271 | }; |
272 | 272 | ||
273 | const struct nvc0_graph_pack | 273 | const struct nvc0_gr_pack |
274 | nvd9_grctx_pack_icmd[] = { | 274 | nvd9_grctx_pack_icmd[] = { |
275 | { nvd9_grctx_init_icmd_0 }, | 275 | { nvd9_grctx_init_icmd_0 }, |
276 | {} | 276 | {} |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static const struct nvc0_graph_init | 279 | static const struct nvc0_gr_init |
280 | nvd9_grctx_init_90c0_0[] = { | 280 | nvd9_grctx_init_90c0_0[] = { |
281 | { 0x002700, 8, 0x20, 0x00000000 }, | 281 | { 0x002700, 8, 0x20, 0x00000000 }, |
282 | { 0x002704, 8, 0x20, 0x00000000 }, | 282 | { 0x002704, 8, 0x20, 0x00000000 }, |
@@ -299,7 +299,7 @@ nvd9_grctx_init_90c0_0[] = { | |||
299 | {} | 299 | {} |
300 | }; | 300 | }; |
301 | 301 | ||
302 | const struct nvc0_graph_pack | 302 | const struct nvc0_gr_pack |
303 | nvd9_grctx_pack_mthd[] = { | 303 | nvd9_grctx_pack_mthd[] = { |
304 | { nvc1_grctx_init_9097_0, 0x9097 }, | 304 | { nvc1_grctx_init_9097_0, 0x9097 }, |
305 | { nvc8_grctx_init_9197_0, 0x9197 }, | 305 | { nvc8_grctx_init_9197_0, 0x9197 }, |
@@ -310,7 +310,7 @@ nvd9_grctx_pack_mthd[] = { | |||
310 | {} | 310 | {} |
311 | }; | 311 | }; |
312 | 312 | ||
313 | const struct nvc0_graph_init | 313 | const struct nvc0_gr_init |
314 | nvd9_grctx_init_fe_0[] = { | 314 | nvd9_grctx_init_fe_0[] = { |
315 | { 0x404004, 10, 0x04, 0x00000000 }, | 315 | { 0x404004, 10, 0x04, 0x00000000 }, |
316 | { 0x404044, 1, 0x04, 0x00000000 }, | 316 | { 0x404044, 1, 0x04, 0x00000000 }, |
@@ -331,7 +331,7 @@ nvd9_grctx_init_fe_0[] = { | |||
331 | {} | 331 | {} |
332 | }; | 332 | }; |
333 | 333 | ||
334 | static const struct nvc0_graph_init | 334 | static const struct nvc0_gr_init |
335 | nvd9_grctx_init_ds_0[] = { | 335 | nvd9_grctx_init_ds_0[] = { |
336 | { 0x405800, 1, 0x04, 0x0f8000bf }, | 336 | { 0x405800, 1, 0x04, 0x0f8000bf }, |
337 | { 0x405830, 1, 0x04, 0x02180218 }, | 337 | { 0x405830, 1, 0x04, 0x02180218 }, |
@@ -344,7 +344,7 @@ nvd9_grctx_init_ds_0[] = { | |||
344 | {} | 344 | {} |
345 | }; | 345 | }; |
346 | 346 | ||
347 | static const struct nvc0_graph_init | 347 | static const struct nvc0_gr_init |
348 | nvd9_grctx_init_pd_0[] = { | 348 | nvd9_grctx_init_pd_0[] = { |
349 | { 0x406020, 1, 0x04, 0x000103c1 }, | 349 | { 0x406020, 1, 0x04, 0x000103c1 }, |
350 | { 0x406028, 4, 0x04, 0x00000001 }, | 350 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -356,7 +356,7 @@ nvd9_grctx_init_pd_0[] = { | |||
356 | {} | 356 | {} |
357 | }; | 357 | }; |
358 | 358 | ||
359 | const struct nvc0_graph_init | 359 | const struct nvc0_gr_init |
360 | nvd9_grctx_init_be_0[] = { | 360 | nvd9_grctx_init_be_0[] = { |
361 | { 0x408800, 1, 0x04, 0x02802a3c }, | 361 | { 0x408800, 1, 0x04, 0x02802a3c }, |
362 | { 0x408804, 1, 0x04, 0x00000040 }, | 362 | { 0x408804, 1, 0x04, 0x00000040 }, |
@@ -368,7 +368,7 @@ nvd9_grctx_init_be_0[] = { | |||
368 | {} | 368 | {} |
369 | }; | 369 | }; |
370 | 370 | ||
371 | static const struct nvc0_graph_pack | 371 | static const struct nvc0_gr_pack |
372 | nvd9_grctx_pack_hub[] = { | 372 | nvd9_grctx_pack_hub[] = { |
373 | { nvc0_grctx_init_main_0 }, | 373 | { nvc0_grctx_init_main_0 }, |
374 | { nvd9_grctx_init_fe_0 }, | 374 | { nvd9_grctx_init_fe_0 }, |
@@ -382,7 +382,7 @@ nvd9_grctx_pack_hub[] = { | |||
382 | {} | 382 | {} |
383 | }; | 383 | }; |
384 | 384 | ||
385 | const struct nvc0_graph_init | 385 | const struct nvc0_gr_init |
386 | nvd9_grctx_init_prop_0[] = { | 386 | nvd9_grctx_init_prop_0[] = { |
387 | { 0x418400, 1, 0x04, 0x38004e00 }, | 387 | { 0x418400, 1, 0x04, 0x38004e00 }, |
388 | { 0x418404, 1, 0x04, 0x71e0ffff }, | 388 | { 0x418404, 1, 0x04, 0x71e0ffff }, |
@@ -395,7 +395,7 @@ nvd9_grctx_init_prop_0[] = { | |||
395 | {} | 395 | {} |
396 | }; | 396 | }; |
397 | 397 | ||
398 | const struct nvc0_graph_init | 398 | const struct nvc0_gr_init |
399 | nvd9_grctx_init_gpc_unk_1[] = { | 399 | nvd9_grctx_init_gpc_unk_1[] = { |
400 | { 0x418600, 1, 0x04, 0x0000001f }, | 400 | { 0x418600, 1, 0x04, 0x0000001f }, |
401 | { 0x418684, 1, 0x04, 0x0000000f }, | 401 | { 0x418684, 1, 0x04, 0x0000000f }, |
@@ -405,7 +405,7 @@ nvd9_grctx_init_gpc_unk_1[] = { | |||
405 | {} | 405 | {} |
406 | }; | 406 | }; |
407 | 407 | ||
408 | static const struct nvc0_graph_init | 408 | static const struct nvc0_gr_init |
409 | nvd9_grctx_init_setup_0[] = { | 409 | nvd9_grctx_init_setup_0[] = { |
410 | { 0x418800, 1, 0x04, 0x7006860a }, | 410 | { 0x418800, 1, 0x04, 0x7006860a }, |
411 | { 0x418808, 3, 0x04, 0x00000000 }, | 411 | { 0x418808, 3, 0x04, 0x00000000 }, |
@@ -418,7 +418,7 @@ nvd9_grctx_init_setup_0[] = { | |||
418 | {} | 418 | {} |
419 | }; | 419 | }; |
420 | 420 | ||
421 | const struct nvc0_graph_init | 421 | const struct nvc0_gr_init |
422 | nvd9_grctx_init_crstr_0[] = { | 422 | nvd9_grctx_init_crstr_0[] = { |
423 | { 0x418b00, 1, 0x04, 0x00000006 }, | 423 | { 0x418b00, 1, 0x04, 0x00000006 }, |
424 | { 0x418b08, 1, 0x04, 0x0a418820 }, | 424 | { 0x418b08, 1, 0x04, 0x0a418820 }, |
@@ -431,7 +431,7 @@ nvd9_grctx_init_crstr_0[] = { | |||
431 | {} | 431 | {} |
432 | }; | 432 | }; |
433 | 433 | ||
434 | static const struct nvc0_graph_pack | 434 | static const struct nvc0_gr_pack |
435 | nvd9_grctx_pack_gpc[] = { | 435 | nvd9_grctx_pack_gpc[] = { |
436 | { nvc0_grctx_init_gpc_unk_0 }, | 436 | { nvc0_grctx_init_gpc_unk_0 }, |
437 | { nvd9_grctx_init_prop_0 }, | 437 | { nvd9_grctx_init_prop_0 }, |
@@ -444,7 +444,7 @@ nvd9_grctx_pack_gpc[] = { | |||
444 | {} | 444 | {} |
445 | }; | 445 | }; |
446 | 446 | ||
447 | static const struct nvc0_graph_init | 447 | static const struct nvc0_gr_init |
448 | nvd9_grctx_init_tex_0[] = { | 448 | nvd9_grctx_init_tex_0[] = { |
449 | { 0x419a00, 1, 0x04, 0x000001f0 }, | 449 | { 0x419a00, 1, 0x04, 0x000001f0 }, |
450 | { 0x419a04, 1, 0x04, 0x00000001 }, | 450 | { 0x419a04, 1, 0x04, 0x00000001 }, |
@@ -458,7 +458,7 @@ nvd9_grctx_init_tex_0[] = { | |||
458 | {} | 458 | {} |
459 | }; | 459 | }; |
460 | 460 | ||
461 | static const struct nvc0_graph_init | 461 | static const struct nvc0_gr_init |
462 | nvd9_grctx_init_mpc_0[] = { | 462 | nvd9_grctx_init_mpc_0[] = { |
463 | { 0x419c00, 1, 0x04, 0x0000000a }, | 463 | { 0x419c00, 1, 0x04, 0x0000000a }, |
464 | { 0x419c04, 1, 0x04, 0x00000006 }, | 464 | { 0x419c04, 1, 0x04, 0x00000006 }, |
@@ -469,7 +469,7 @@ nvd9_grctx_init_mpc_0[] = { | |||
469 | {} | 469 | {} |
470 | }; | 470 | }; |
471 | 471 | ||
472 | const struct nvc0_graph_init | 472 | const struct nvc0_gr_init |
473 | nvd9_grctx_init_sm_0[] = { | 473 | nvd9_grctx_init_sm_0[] = { |
474 | { 0x419e04, 3, 0x04, 0x00000000 }, | 474 | { 0x419e04, 3, 0x04, 0x00000000 }, |
475 | { 0x419e10, 1, 0x04, 0x00000002 }, | 475 | { 0x419e10, 1, 0x04, 0x00000002 }, |
@@ -483,7 +483,7 @@ nvd9_grctx_init_sm_0[] = { | |||
483 | {} | 483 | {} |
484 | }; | 484 | }; |
485 | 485 | ||
486 | static const struct nvc0_graph_pack | 486 | static const struct nvc0_gr_pack |
487 | nvd9_grctx_pack_tpc[] = { | 487 | nvd9_grctx_pack_tpc[] = { |
488 | { nvc1_grctx_init_pe_0 }, | 488 | { nvc1_grctx_init_pe_0 }, |
489 | { nvd9_grctx_init_tex_0 }, | 489 | { nvd9_grctx_init_tex_0 }, |
@@ -503,12 +503,12 @@ struct nouveau_oclass * | |||
503 | nvd9_grctx_oclass = &(struct nvc0_grctx_oclass) { | 503 | nvd9_grctx_oclass = &(struct nvc0_grctx_oclass) { |
504 | .base.handle = NV_ENGCTX(GR, 0xd9), | 504 | .base.handle = NV_ENGCTX(GR, 0xd9), |
505 | .base.ofuncs = &(struct nouveau_ofuncs) { | 505 | .base.ofuncs = &(struct nouveau_ofuncs) { |
506 | .ctor = nvc0_graph_context_ctor, | 506 | .ctor = nvc0_gr_context_ctor, |
507 | .dtor = nvc0_graph_context_dtor, | 507 | .dtor = nvc0_gr_context_dtor, |
508 | .init = _nouveau_graph_context_init, | 508 | .init = _nouveau_gr_context_init, |
509 | .fini = _nouveau_graph_context_fini, | 509 | .fini = _nouveau_gr_context_fini, |
510 | .rd32 = _nouveau_graph_context_rd32, | 510 | .rd32 = _nouveau_gr_context_rd32, |
511 | .wr32 = _nouveau_graph_context_wr32, | 511 | .wr32 = _nouveau_gr_context_wr32, |
512 | }, | 512 | }, |
513 | .main = nvc0_grctx_generate_main, | 513 | .main = nvc0_grctx_generate_main, |
514 | .unkn = nvc1_grctx_generate_unkn, | 514 | .unkn = nvc1_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnve4.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnve4.c index ccac2ee1a1cb..d78c7e7bbda0 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnve4.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnve4.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nve4_grctx_init_icmd_0[] = { | 32 | nve4_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x000039, 3, 0x01, 0x00000000 }, | 34 | { 0x000039, 3, 0x01, 0x00000000 }, |
@@ -272,13 +272,13 @@ nve4_grctx_init_icmd_0[] = { | |||
272 | {} | 272 | {} |
273 | }; | 273 | }; |
274 | 274 | ||
275 | const struct nvc0_graph_pack | 275 | const struct nvc0_gr_pack |
276 | nve4_grctx_pack_icmd[] = { | 276 | nve4_grctx_pack_icmd[] = { |
277 | { nve4_grctx_init_icmd_0 }, | 277 | { nve4_grctx_init_icmd_0 }, |
278 | {} | 278 | {} |
279 | }; | 279 | }; |
280 | 280 | ||
281 | const struct nvc0_graph_init | 281 | const struct nvc0_gr_init |
282 | nve4_grctx_init_a097_0[] = { | 282 | nve4_grctx_init_a097_0[] = { |
283 | { 0x000800, 8, 0x40, 0x00000000 }, | 283 | { 0x000800, 8, 0x40, 0x00000000 }, |
284 | { 0x000804, 8, 0x40, 0x00000000 }, | 284 | { 0x000804, 8, 0x40, 0x00000000 }, |
@@ -578,14 +578,14 @@ nve4_grctx_init_a097_0[] = { | |||
578 | {} | 578 | {} |
579 | }; | 579 | }; |
580 | 580 | ||
581 | static const struct nvc0_graph_pack | 581 | static const struct nvc0_gr_pack |
582 | nve4_grctx_pack_mthd[] = { | 582 | nve4_grctx_pack_mthd[] = { |
583 | { nve4_grctx_init_a097_0, 0xa097 }, | 583 | { nve4_grctx_init_a097_0, 0xa097 }, |
584 | { nvc0_grctx_init_902d_0, 0x902d }, | 584 | { nvc0_grctx_init_902d_0, 0x902d }, |
585 | {} | 585 | {} |
586 | }; | 586 | }; |
587 | 587 | ||
588 | static const struct nvc0_graph_init | 588 | static const struct nvc0_gr_init |
589 | nve4_grctx_init_fe_0[] = { | 589 | nve4_grctx_init_fe_0[] = { |
590 | { 0x404010, 5, 0x04, 0x00000000 }, | 590 | { 0x404010, 5, 0x04, 0x00000000 }, |
591 | { 0x404024, 1, 0x04, 0x0000e000 }, | 591 | { 0x404024, 1, 0x04, 0x0000e000 }, |
@@ -606,7 +606,7 @@ nve4_grctx_init_fe_0[] = { | |||
606 | {} | 606 | {} |
607 | }; | 607 | }; |
608 | 608 | ||
609 | const struct nvc0_graph_init | 609 | const struct nvc0_gr_init |
610 | nve4_grctx_init_memfmt_0[] = { | 610 | nve4_grctx_init_memfmt_0[] = { |
611 | { 0x404604, 1, 0x04, 0x00000014 }, | 611 | { 0x404604, 1, 0x04, 0x00000014 }, |
612 | { 0x404608, 1, 0x04, 0x00000000 }, | 612 | { 0x404608, 1, 0x04, 0x00000000 }, |
@@ -632,7 +632,7 @@ nve4_grctx_init_memfmt_0[] = { | |||
632 | {} | 632 | {} |
633 | }; | 633 | }; |
634 | 634 | ||
635 | const struct nvc0_graph_init | 635 | const struct nvc0_gr_init |
636 | nve4_grctx_init_ds_0[] = { | 636 | nve4_grctx_init_ds_0[] = { |
637 | { 0x405800, 1, 0x04, 0x0f8000bf }, | 637 | { 0x405800, 1, 0x04, 0x0f8000bf }, |
638 | { 0x405830, 1, 0x04, 0x02180648 }, | 638 | { 0x405830, 1, 0x04, 0x02180648 }, |
@@ -645,14 +645,14 @@ nve4_grctx_init_ds_0[] = { | |||
645 | {} | 645 | {} |
646 | }; | 646 | }; |
647 | 647 | ||
648 | static const struct nvc0_graph_init | 648 | static const struct nvc0_gr_init |
649 | nve4_grctx_init_cwd_0[] = { | 649 | nve4_grctx_init_cwd_0[] = { |
650 | { 0x405b00, 1, 0x04, 0x00000000 }, | 650 | { 0x405b00, 1, 0x04, 0x00000000 }, |
651 | { 0x405b10, 1, 0x04, 0x00001000 }, | 651 | { 0x405b10, 1, 0x04, 0x00001000 }, |
652 | {} | 652 | {} |
653 | }; | 653 | }; |
654 | 654 | ||
655 | static const struct nvc0_graph_init | 655 | static const struct nvc0_gr_init |
656 | nve4_grctx_init_pd_0[] = { | 656 | nve4_grctx_init_pd_0[] = { |
657 | { 0x406020, 1, 0x04, 0x004103c1 }, | 657 | { 0x406020, 1, 0x04, 0x004103c1 }, |
658 | { 0x406028, 4, 0x04, 0x00000001 }, | 658 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -667,13 +667,13 @@ nve4_grctx_init_pd_0[] = { | |||
667 | {} | 667 | {} |
668 | }; | 668 | }; |
669 | 669 | ||
670 | static const struct nvc0_graph_init | 670 | static const struct nvc0_gr_init |
671 | nve4_grctx_init_sked_0[] = { | 671 | nve4_grctx_init_sked_0[] = { |
672 | { 0x407040, 1, 0x04, 0x00000000 }, | 672 | { 0x407040, 1, 0x04, 0x00000000 }, |
673 | {} | 673 | {} |
674 | }; | 674 | }; |
675 | 675 | ||
676 | const struct nvc0_graph_init | 676 | const struct nvc0_gr_init |
677 | nve4_grctx_init_scc_0[] = { | 677 | nve4_grctx_init_scc_0[] = { |
678 | { 0x408000, 2, 0x04, 0x00000000 }, | 678 | { 0x408000, 2, 0x04, 0x00000000 }, |
679 | { 0x408008, 1, 0x04, 0x00000030 }, | 679 | { 0x408008, 1, 0x04, 0x00000030 }, |
@@ -684,7 +684,7 @@ nve4_grctx_init_scc_0[] = { | |||
684 | {} | 684 | {} |
685 | }; | 685 | }; |
686 | 686 | ||
687 | static const struct nvc0_graph_init | 687 | static const struct nvc0_gr_init |
688 | nve4_grctx_init_be_0[] = { | 688 | nve4_grctx_init_be_0[] = { |
689 | { 0x408800, 1, 0x04, 0x02802a3c }, | 689 | { 0x408800, 1, 0x04, 0x02802a3c }, |
690 | { 0x408804, 1, 0x04, 0x00000040 }, | 690 | { 0x408804, 1, 0x04, 0x00000040 }, |
@@ -697,7 +697,7 @@ nve4_grctx_init_be_0[] = { | |||
697 | {} | 697 | {} |
698 | }; | 698 | }; |
699 | 699 | ||
700 | const struct nvc0_graph_pack | 700 | const struct nvc0_gr_pack |
701 | nve4_grctx_pack_hub[] = { | 701 | nve4_grctx_pack_hub[] = { |
702 | { nvc0_grctx_init_main_0 }, | 702 | { nvc0_grctx_init_main_0 }, |
703 | { nve4_grctx_init_fe_0 }, | 703 | { nve4_grctx_init_fe_0 }, |
@@ -713,7 +713,7 @@ nve4_grctx_pack_hub[] = { | |||
713 | {} | 713 | {} |
714 | }; | 714 | }; |
715 | 715 | ||
716 | static const struct nvc0_graph_init | 716 | static const struct nvc0_gr_init |
717 | nve4_grctx_init_setup_0[] = { | 717 | nve4_grctx_init_setup_0[] = { |
718 | { 0x418800, 1, 0x04, 0x7006860a }, | 718 | { 0x418800, 1, 0x04, 0x7006860a }, |
719 | { 0x418808, 3, 0x04, 0x00000000 }, | 719 | { 0x418808, 3, 0x04, 0x00000000 }, |
@@ -726,7 +726,7 @@ nve4_grctx_init_setup_0[] = { | |||
726 | {} | 726 | {} |
727 | }; | 727 | }; |
728 | 728 | ||
729 | const struct nvc0_graph_init | 729 | const struct nvc0_gr_init |
730 | nve4_grctx_init_gpm_0[] = { | 730 | nve4_grctx_init_gpm_0[] = { |
731 | { 0x418c08, 1, 0x04, 0x00000001 }, | 731 | { 0x418c08, 1, 0x04, 0x00000001 }, |
732 | { 0x418c10, 8, 0x04, 0x00000000 }, | 732 | { 0x418c10, 8, 0x04, 0x00000000 }, |
@@ -737,7 +737,7 @@ nve4_grctx_init_gpm_0[] = { | |||
737 | {} | 737 | {} |
738 | }; | 738 | }; |
739 | 739 | ||
740 | const struct nvc0_graph_pack | 740 | const struct nvc0_gr_pack |
741 | nve4_grctx_pack_gpc[] = { | 741 | nve4_grctx_pack_gpc[] = { |
742 | { nvc0_grctx_init_gpc_unk_0 }, | 742 | { nvc0_grctx_init_gpc_unk_0 }, |
743 | { nvd9_grctx_init_prop_0 }, | 743 | { nvd9_grctx_init_prop_0 }, |
@@ -750,7 +750,7 @@ nve4_grctx_pack_gpc[] = { | |||
750 | {} | 750 | {} |
751 | }; | 751 | }; |
752 | 752 | ||
753 | static const struct nvc0_graph_init | 753 | static const struct nvc0_gr_init |
754 | nve4_grctx_init_tex_0[] = { | 754 | nve4_grctx_init_tex_0[] = { |
755 | { 0x419a00, 1, 0x04, 0x000000f0 }, | 755 | { 0x419a00, 1, 0x04, 0x000000f0 }, |
756 | { 0x419a04, 1, 0x04, 0x00000001 }, | 756 | { 0x419a04, 1, 0x04, 0x00000001 }, |
@@ -765,7 +765,7 @@ nve4_grctx_init_tex_0[] = { | |||
765 | {} | 765 | {} |
766 | }; | 766 | }; |
767 | 767 | ||
768 | static const struct nvc0_graph_init | 768 | static const struct nvc0_gr_init |
769 | nve4_grctx_init_mpc_0[] = { | 769 | nve4_grctx_init_mpc_0[] = { |
770 | { 0x419c00, 1, 0x04, 0x0000000a }, | 770 | { 0x419c00, 1, 0x04, 0x0000000a }, |
771 | { 0x419c04, 1, 0x04, 0x80000006 }, | 771 | { 0x419c04, 1, 0x04, 0x80000006 }, |
@@ -776,14 +776,14 @@ nve4_grctx_init_mpc_0[] = { | |||
776 | {} | 776 | {} |
777 | }; | 777 | }; |
778 | 778 | ||
779 | static const struct nvc0_graph_init | 779 | static const struct nvc0_gr_init |
780 | nve4_grctx_init_l1c_0[] = { | 780 | nve4_grctx_init_l1c_0[] = { |
781 | { 0x419ce8, 1, 0x04, 0x00000000 }, | 781 | { 0x419ce8, 1, 0x04, 0x00000000 }, |
782 | { 0x419cf4, 1, 0x04, 0x00003203 }, | 782 | { 0x419cf4, 1, 0x04, 0x00003203 }, |
783 | {} | 783 | {} |
784 | }; | 784 | }; |
785 | 785 | ||
786 | static const struct nvc0_graph_init | 786 | static const struct nvc0_gr_init |
787 | nve4_grctx_init_sm_0[] = { | 787 | nve4_grctx_init_sm_0[] = { |
788 | { 0x419e04, 3, 0x04, 0x00000000 }, | 788 | { 0x419e04, 3, 0x04, 0x00000000 }, |
789 | { 0x419e10, 1, 0x04, 0x00000402 }, | 789 | { 0x419e10, 1, 0x04, 0x00000402 }, |
@@ -802,7 +802,7 @@ nve4_grctx_init_sm_0[] = { | |||
802 | {} | 802 | {} |
803 | }; | 803 | }; |
804 | 804 | ||
805 | const struct nvc0_graph_pack | 805 | const struct nvc0_gr_pack |
806 | nve4_grctx_pack_tpc[] = { | 806 | nve4_grctx_pack_tpc[] = { |
807 | { nvd7_grctx_init_pe_0 }, | 807 | { nvd7_grctx_init_pe_0 }, |
808 | { nve4_grctx_init_tex_0 }, | 808 | { nve4_grctx_init_tex_0 }, |
@@ -812,13 +812,13 @@ nve4_grctx_pack_tpc[] = { | |||
812 | {} | 812 | {} |
813 | }; | 813 | }; |
814 | 814 | ||
815 | const struct nvc0_graph_init | 815 | const struct nvc0_gr_init |
816 | nve4_grctx_init_pes_0[] = { | 816 | nve4_grctx_init_pes_0[] = { |
817 | { 0x41be24, 1, 0x04, 0x00000006 }, | 817 | { 0x41be24, 1, 0x04, 0x00000006 }, |
818 | {} | 818 | {} |
819 | }; | 819 | }; |
820 | 820 | ||
821 | static const struct nvc0_graph_init | 821 | static const struct nvc0_gr_init |
822 | nve4_grctx_init_cbm_0[] = { | 822 | nve4_grctx_init_cbm_0[] = { |
823 | { 0x41bec0, 1, 0x04, 0x12180000 }, | 823 | { 0x41bec0, 1, 0x04, 0x12180000 }, |
824 | { 0x41bec4, 1, 0x04, 0x00037f7f }, | 824 | { 0x41bec4, 1, 0x04, 0x00037f7f }, |
@@ -826,7 +826,7 @@ nve4_grctx_init_cbm_0[] = { | |||
826 | {} | 826 | {} |
827 | }; | 827 | }; |
828 | 828 | ||
829 | const struct nvc0_graph_pack | 829 | const struct nvc0_gr_pack |
830 | nve4_grctx_pack_ppc[] = { | 830 | nve4_grctx_pack_ppc[] = { |
831 | { nve4_grctx_init_pes_0 }, | 831 | { nve4_grctx_init_pes_0 }, |
832 | { nve4_grctx_init_cbm_0 }, | 832 | { nve4_grctx_init_cbm_0 }, |
@@ -870,7 +870,7 @@ nve4_grctx_generate_pagepool(struct nvc0_grctx *info) | |||
870 | } | 870 | } |
871 | 871 | ||
872 | void | 872 | void |
873 | nve4_grctx_generate_unkn(struct nvc0_graph_priv *priv) | 873 | nve4_grctx_generate_unkn(struct nvc0_gr_priv *priv) |
874 | { | 874 | { |
875 | nv_mask(priv, 0x418c6c, 0x00000001, 0x00000001); | 875 | nv_mask(priv, 0x418c6c, 0x00000001, 0x00000001); |
876 | nv_mask(priv, 0x41980c, 0x00000010, 0x00000010); | 876 | nv_mask(priv, 0x41980c, 0x00000010, 0x00000010); |
@@ -881,7 +881,7 @@ nve4_grctx_generate_unkn(struct nvc0_graph_priv *priv) | |||
881 | } | 881 | } |
882 | 882 | ||
883 | void | 883 | void |
884 | nve4_grctx_generate_r418bb8(struct nvc0_graph_priv *priv) | 884 | nve4_grctx_generate_r418bb8(struct nvc0_gr_priv *priv) |
885 | { | 885 | { |
886 | u32 data[6] = {}, data2[2] = {}; | 886 | u32 data[6] = {}, data2[2] = {}; |
887 | u8 tpcnr[GPC_MAX]; | 887 | u8 tpcnr[GPC_MAX]; |
@@ -939,18 +939,18 @@ nve4_grctx_generate_r418bb8(struct nvc0_graph_priv *priv) | |||
939 | } | 939 | } |
940 | 940 | ||
941 | void | 941 | void |
942 | nve4_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | 942 | nve4_grctx_generate_main(struct nvc0_gr_priv *priv, struct nvc0_grctx *info) |
943 | { | 943 | { |
944 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; | 944 | struct nvc0_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; |
945 | int i; | 945 | int i; |
946 | 946 | ||
947 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); | 947 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); |
948 | 948 | ||
949 | nvc0_graph_mmio(priv, oclass->hub); | 949 | nvc0_gr_mmio(priv, oclass->hub); |
950 | nvc0_graph_mmio(priv, oclass->gpc); | 950 | nvc0_gr_mmio(priv, oclass->gpc); |
951 | nvc0_graph_mmio(priv, oclass->zcull); | 951 | nvc0_gr_mmio(priv, oclass->zcull); |
952 | nvc0_graph_mmio(priv, oclass->tpc); | 952 | nvc0_gr_mmio(priv, oclass->tpc); |
953 | nvc0_graph_mmio(priv, oclass->ppc); | 953 | nvc0_gr_mmio(priv, oclass->ppc); |
954 | 954 | ||
955 | nv_wr32(priv, 0x404154, 0x00000000); | 955 | nv_wr32(priv, 0x404154, 0x00000000); |
956 | 956 | ||
@@ -977,9 +977,9 @@ nve4_grctx_generate_main(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) | |||
977 | } | 977 | } |
978 | nv_mask(priv, 0x419f78, 0x00000001, 0x00000000); | 978 | nv_mask(priv, 0x419f78, 0x00000001, 0x00000000); |
979 | 979 | ||
980 | nvc0_graph_icmd(priv, oclass->icmd); | 980 | nvc0_gr_icmd(priv, oclass->icmd); |
981 | nv_wr32(priv, 0x404154, 0x00000400); | 981 | nv_wr32(priv, 0x404154, 0x00000400); |
982 | nvc0_graph_mthd(priv, oclass->mthd); | 982 | nvc0_gr_mthd(priv, oclass->mthd); |
983 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); | 983 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); |
984 | 984 | ||
985 | nv_mask(priv, 0x418800, 0x00200000, 0x00200000); | 985 | nv_mask(priv, 0x418800, 0x00200000, 0x00200000); |
@@ -990,12 +990,12 @@ struct nouveau_oclass * | |||
990 | nve4_grctx_oclass = &(struct nvc0_grctx_oclass) { | 990 | nve4_grctx_oclass = &(struct nvc0_grctx_oclass) { |
991 | .base.handle = NV_ENGCTX(GR, 0xe4), | 991 | .base.handle = NV_ENGCTX(GR, 0xe4), |
992 | .base.ofuncs = &(struct nouveau_ofuncs) { | 992 | .base.ofuncs = &(struct nouveau_ofuncs) { |
993 | .ctor = nvc0_graph_context_ctor, | 993 | .ctor = nvc0_gr_context_ctor, |
994 | .dtor = nvc0_graph_context_dtor, | 994 | .dtor = nvc0_gr_context_dtor, |
995 | .init = _nouveau_graph_context_init, | 995 | .init = _nouveau_gr_context_init, |
996 | .fini = _nouveau_graph_context_fini, | 996 | .fini = _nouveau_gr_context_fini, |
997 | .rd32 = _nouveau_graph_context_rd32, | 997 | .rd32 = _nouveau_gr_context_rd32, |
998 | .wr32 = _nouveau_graph_context_wr32, | 998 | .wr32 = _nouveau_gr_context_wr32, |
999 | }, | 999 | }, |
1000 | .main = nve4_grctx_generate_main, | 1000 | .main = nve4_grctx_generate_main, |
1001 | .unkn = nve4_grctx_generate_unkn, | 1001 | .unkn = nve4_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvf0.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvf0.c index e9b0dcf95a49..f7444690b4d4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvf0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxnvf0.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * PGRAPH context register lists | 28 | * PGRAPH context register lists |
29 | ******************************************************************************/ | 29 | ******************************************************************************/ |
30 | 30 | ||
31 | static const struct nvc0_graph_init | 31 | static const struct nvc0_gr_init |
32 | nvf0_grctx_init_icmd_0[] = { | 32 | nvf0_grctx_init_icmd_0[] = { |
33 | { 0x001000, 1, 0x01, 0x00000004 }, | 33 | { 0x001000, 1, 0x01, 0x00000004 }, |
34 | { 0x000039, 3, 0x01, 0x00000000 }, | 34 | { 0x000039, 3, 0x01, 0x00000000 }, |
@@ -279,13 +279,13 @@ nvf0_grctx_init_icmd_0[] = { | |||
279 | {} | 279 | {} |
280 | }; | 280 | }; |
281 | 281 | ||
282 | const struct nvc0_graph_pack | 282 | const struct nvc0_gr_pack |
283 | nvf0_grctx_pack_icmd[] = { | 283 | nvf0_grctx_pack_icmd[] = { |
284 | { nvf0_grctx_init_icmd_0 }, | 284 | { nvf0_grctx_init_icmd_0 }, |
285 | {} | 285 | {} |
286 | }; | 286 | }; |
287 | 287 | ||
288 | static const struct nvc0_graph_init | 288 | static const struct nvc0_gr_init |
289 | nvf0_grctx_init_a197_0[] = { | 289 | nvf0_grctx_init_a197_0[] = { |
290 | { 0x000800, 8, 0x40, 0x00000000 }, | 290 | { 0x000800, 8, 0x40, 0x00000000 }, |
291 | { 0x000804, 8, 0x40, 0x00000000 }, | 291 | { 0x000804, 8, 0x40, 0x00000000 }, |
@@ -587,14 +587,14 @@ nvf0_grctx_init_a197_0[] = { | |||
587 | {} | 587 | {} |
588 | }; | 588 | }; |
589 | 589 | ||
590 | const struct nvc0_graph_pack | 590 | const struct nvc0_gr_pack |
591 | nvf0_grctx_pack_mthd[] = { | 591 | nvf0_grctx_pack_mthd[] = { |
592 | { nvf0_grctx_init_a197_0, 0xa197 }, | 592 | { nvf0_grctx_init_a197_0, 0xa197 }, |
593 | { nvc0_grctx_init_902d_0, 0x902d }, | 593 | { nvc0_grctx_init_902d_0, 0x902d }, |
594 | {} | 594 | {} |
595 | }; | 595 | }; |
596 | 596 | ||
597 | static const struct nvc0_graph_init | 597 | static const struct nvc0_gr_init |
598 | nvf0_grctx_init_fe_0[] = { | 598 | nvf0_grctx_init_fe_0[] = { |
599 | { 0x404004, 8, 0x04, 0x00000000 }, | 599 | { 0x404004, 8, 0x04, 0x00000000 }, |
600 | { 0x404024, 1, 0x04, 0x0000e000 }, | 600 | { 0x404024, 1, 0x04, 0x0000e000 }, |
@@ -620,7 +620,7 @@ nvf0_grctx_init_fe_0[] = { | |||
620 | {} | 620 | {} |
621 | }; | 621 | }; |
622 | 622 | ||
623 | const struct nvc0_graph_init | 623 | const struct nvc0_gr_init |
624 | nvf0_grctx_init_pri_0[] = { | 624 | nvf0_grctx_init_pri_0[] = { |
625 | { 0x404404, 12, 0x04, 0x00000000 }, | 625 | { 0x404404, 12, 0x04, 0x00000000 }, |
626 | { 0x404438, 1, 0x04, 0x00000000 }, | 626 | { 0x404438, 1, 0x04, 0x00000000 }, |
@@ -632,7 +632,7 @@ nvf0_grctx_init_pri_0[] = { | |||
632 | {} | 632 | {} |
633 | }; | 633 | }; |
634 | 634 | ||
635 | const struct nvc0_graph_init | 635 | const struct nvc0_gr_init |
636 | nvf0_grctx_init_cwd_0[] = { | 636 | nvf0_grctx_init_cwd_0[] = { |
637 | { 0x405b00, 1, 0x04, 0x00000000 }, | 637 | { 0x405b00, 1, 0x04, 0x00000000 }, |
638 | { 0x405b10, 1, 0x04, 0x00001000 }, | 638 | { 0x405b10, 1, 0x04, 0x00001000 }, |
@@ -640,7 +640,7 @@ nvf0_grctx_init_cwd_0[] = { | |||
640 | {} | 640 | {} |
641 | }; | 641 | }; |
642 | 642 | ||
643 | static const struct nvc0_graph_init | 643 | static const struct nvc0_gr_init |
644 | nvf0_grctx_init_pd_0[] = { | 644 | nvf0_grctx_init_pd_0[] = { |
645 | { 0x406020, 1, 0x04, 0x034103c1 }, | 645 | { 0x406020, 1, 0x04, 0x034103c1 }, |
646 | { 0x406028, 4, 0x04, 0x00000001 }, | 646 | { 0x406028, 4, 0x04, 0x00000001 }, |
@@ -655,7 +655,7 @@ nvf0_grctx_init_pd_0[] = { | |||
655 | {} | 655 | {} |
656 | }; | 656 | }; |
657 | 657 | ||
658 | static const struct nvc0_graph_init | 658 | static const struct nvc0_gr_init |
659 | nvf0_grctx_init_be_0[] = { | 659 | nvf0_grctx_init_be_0[] = { |
660 | { 0x408800, 1, 0x04, 0x12802a3c }, | 660 | { 0x408800, 1, 0x04, 0x12802a3c }, |
661 | { 0x408804, 1, 0x04, 0x00000040 }, | 661 | { 0x408804, 1, 0x04, 0x00000040 }, |
@@ -668,7 +668,7 @@ nvf0_grctx_init_be_0[] = { | |||
668 | {} | 668 | {} |
669 | }; | 669 | }; |
670 | 670 | ||
671 | const struct nvc0_graph_pack | 671 | const struct nvc0_gr_pack |
672 | nvf0_grctx_pack_hub[] = { | 672 | nvf0_grctx_pack_hub[] = { |
673 | { nvc0_grctx_init_main_0 }, | 673 | { nvc0_grctx_init_main_0 }, |
674 | { nvf0_grctx_init_fe_0 }, | 674 | { nvf0_grctx_init_fe_0 }, |
@@ -683,7 +683,7 @@ nvf0_grctx_pack_hub[] = { | |||
683 | {} | 683 | {} |
684 | }; | 684 | }; |
685 | 685 | ||
686 | static const struct nvc0_graph_init | 686 | static const struct nvc0_gr_init |
687 | nvf0_grctx_init_setup_0[] = { | 687 | nvf0_grctx_init_setup_0[] = { |
688 | { 0x418800, 1, 0x04, 0x7006860a }, | 688 | { 0x418800, 1, 0x04, 0x7006860a }, |
689 | { 0x418808, 1, 0x04, 0x00000000 }, | 689 | { 0x418808, 1, 0x04, 0x00000000 }, |
@@ -698,13 +698,13 @@ nvf0_grctx_init_setup_0[] = { | |||
698 | {} | 698 | {} |
699 | }; | 699 | }; |
700 | 700 | ||
701 | const struct nvc0_graph_init | 701 | const struct nvc0_gr_init |
702 | nvf0_grctx_init_gpc_unk_2[] = { | 702 | nvf0_grctx_init_gpc_unk_2[] = { |
703 | { 0x418d24, 1, 0x04, 0x00000000 }, | 703 | { 0x418d24, 1, 0x04, 0x00000000 }, |
704 | {} | 704 | {} |
705 | }; | 705 | }; |
706 | 706 | ||
707 | const struct nvc0_graph_pack | 707 | const struct nvc0_gr_pack |
708 | nvf0_grctx_pack_gpc[] = { | 708 | nvf0_grctx_pack_gpc[] = { |
709 | { nvc0_grctx_init_gpc_unk_0 }, | 709 | { nvc0_grctx_init_gpc_unk_0 }, |
710 | { nvd9_grctx_init_prop_0 }, | 710 | { nvd9_grctx_init_prop_0 }, |
@@ -718,7 +718,7 @@ nvf0_grctx_pack_gpc[] = { | |||
718 | {} | 718 | {} |
719 | }; | 719 | }; |
720 | 720 | ||
721 | const struct nvc0_graph_init | 721 | const struct nvc0_gr_init |
722 | nvf0_grctx_init_tex_0[] = { | 722 | nvf0_grctx_init_tex_0[] = { |
723 | { 0x419a00, 1, 0x04, 0x000000f0 }, | 723 | { 0x419a00, 1, 0x04, 0x000000f0 }, |
724 | { 0x419a04, 1, 0x04, 0x00000001 }, | 724 | { 0x419a04, 1, 0x04, 0x00000001 }, |
@@ -733,7 +733,7 @@ nvf0_grctx_init_tex_0[] = { | |||
733 | {} | 733 | {} |
734 | }; | 734 | }; |
735 | 735 | ||
736 | const struct nvc0_graph_init | 736 | const struct nvc0_gr_init |
737 | nvf0_grctx_init_mpc_0[] = { | 737 | nvf0_grctx_init_mpc_0[] = { |
738 | { 0x419c00, 1, 0x04, 0x0000001a }, | 738 | { 0x419c00, 1, 0x04, 0x0000001a }, |
739 | { 0x419c04, 1, 0x04, 0x80000006 }, | 739 | { 0x419c04, 1, 0x04, 0x80000006 }, |
@@ -744,14 +744,14 @@ nvf0_grctx_init_mpc_0[] = { | |||
744 | {} | 744 | {} |
745 | }; | 745 | }; |
746 | 746 | ||
747 | const struct nvc0_graph_init | 747 | const struct nvc0_gr_init |
748 | nvf0_grctx_init_l1c_0[] = { | 748 | nvf0_grctx_init_l1c_0[] = { |
749 | { 0x419ce8, 1, 0x04, 0x00000000 }, | 749 | { 0x419ce8, 1, 0x04, 0x00000000 }, |
750 | { 0x419cf4, 1, 0x04, 0x00000203 }, | 750 | { 0x419cf4, 1, 0x04, 0x00000203 }, |
751 | {} | 751 | {} |
752 | }; | 752 | }; |
753 | 753 | ||
754 | static const struct nvc0_graph_init | 754 | static const struct nvc0_gr_init |
755 | nvf0_grctx_init_sm_0[] = { | 755 | nvf0_grctx_init_sm_0[] = { |
756 | { 0x419e04, 1, 0x04, 0x00000000 }, | 756 | { 0x419e04, 1, 0x04, 0x00000000 }, |
757 | { 0x419e08, 1, 0x04, 0x0000001d }, | 757 | { 0x419e08, 1, 0x04, 0x0000001d }, |
@@ -779,7 +779,7 @@ nvf0_grctx_init_sm_0[] = { | |||
779 | {} | 779 | {} |
780 | }; | 780 | }; |
781 | 781 | ||
782 | static const struct nvc0_graph_pack | 782 | static const struct nvc0_gr_pack |
783 | nvf0_grctx_pack_tpc[] = { | 783 | nvf0_grctx_pack_tpc[] = { |
784 | { nvd7_grctx_init_pe_0 }, | 784 | { nvd7_grctx_init_pe_0 }, |
785 | { nvf0_grctx_init_tex_0 }, | 785 | { nvf0_grctx_init_tex_0 }, |
@@ -789,7 +789,7 @@ nvf0_grctx_pack_tpc[] = { | |||
789 | {} | 789 | {} |
790 | }; | 790 | }; |
791 | 791 | ||
792 | static const struct nvc0_graph_init | 792 | static const struct nvc0_gr_init |
793 | nvf0_grctx_init_cbm_0[] = { | 793 | nvf0_grctx_init_cbm_0[] = { |
794 | { 0x41bec0, 1, 0x04, 0x10000000 }, | 794 | { 0x41bec0, 1, 0x04, 0x10000000 }, |
795 | { 0x41bec4, 1, 0x04, 0x00037f7f }, | 795 | { 0x41bec4, 1, 0x04, 0x00037f7f }, |
@@ -797,7 +797,7 @@ nvf0_grctx_init_cbm_0[] = { | |||
797 | {} | 797 | {} |
798 | }; | 798 | }; |
799 | 799 | ||
800 | const struct nvc0_graph_pack | 800 | const struct nvc0_gr_pack |
801 | nvf0_grctx_pack_ppc[] = { | 801 | nvf0_grctx_pack_ppc[] = { |
802 | { nve4_grctx_init_pes_0 }, | 802 | { nve4_grctx_init_pes_0 }, |
803 | { nvf0_grctx_init_cbm_0 }, | 803 | { nvf0_grctx_init_cbm_0 }, |
@@ -813,12 +813,12 @@ struct nouveau_oclass * | |||
813 | nvf0_grctx_oclass = &(struct nvc0_grctx_oclass) { | 813 | nvf0_grctx_oclass = &(struct nvc0_grctx_oclass) { |
814 | .base.handle = NV_ENGCTX(GR, 0xf0), | 814 | .base.handle = NV_ENGCTX(GR, 0xf0), |
815 | .base.ofuncs = &(struct nouveau_ofuncs) { | 815 | .base.ofuncs = &(struct nouveau_ofuncs) { |
816 | .ctor = nvc0_graph_context_ctor, | 816 | .ctor = nvc0_gr_context_ctor, |
817 | .dtor = nvc0_graph_context_dtor, | 817 | .dtor = nvc0_gr_context_dtor, |
818 | .init = _nouveau_graph_context_init, | 818 | .init = _nouveau_gr_context_init, |
819 | .fini = _nouveau_graph_context_fini, | 819 | .fini = _nouveau_gr_context_fini, |
820 | .rd32 = _nouveau_graph_context_rd32, | 820 | .rd32 = _nouveau_gr_context_rd32, |
821 | .wr32 = _nouveau_graph_context_wr32, | 821 | .wr32 = _nouveau_gr_context_wr32, |
822 | }, | 822 | }, |
823 | .main = nve4_grctx_generate_main, | 823 | .main = nve4_grctx_generate_main, |
824 | .unkn = nve4_grctx_generate_unkn, | 824 | .unkn = nve4_grctx_generate_unkn, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/com.fuc b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/com.fuc index e37d8106ae1a..e37d8106ae1a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/com.fuc +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/com.fuc | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpc.fuc b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc index 7445f12b1d9e..7445f12b1d9e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpc.fuc +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5 index e730603891d7..e730603891d7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h index 6d53b67dd3c4..6d53b67dd3c4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcgm107.fuc5.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnv108.fuc5 index bd30262d635b..bd30262d635b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnv108.fuc5 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnv108.fuc5.h index 31922707794f..31922707794f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnv108.fuc5.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnv108.fuc5.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvc0.fuc3 index 5ae06a2d64c9..5ae06a2d64c9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvc0.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvc0.fuc3.h index 325cc7b7b2fb..325cc7b7b2fb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvc0.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvc0.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvd7.fuc3 index c2f754edbd7d..c2f754edbd7d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvd7.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvd7.fuc3.h index d1504a4059c6..d1504a4059c6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvd7.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvd7.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnve0.fuc3 index 6b906cd2a31f..6b906cd2a31f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnve0.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnve0.fuc3.h index 855b220378f9..855b220378f9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnve0.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnve0.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvf0.fuc3 index 90bbe525b626..90bbe525b626 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvf0.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvf0.fuc3.h index 1b803197d28b..1b803197d28b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/gpcnvf0.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcnvf0.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hub.fuc b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hub.fuc index b4ad18bf5a26..b4ad18bf5a26 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hub.fuc +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hub.fuc | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5 index 27591b3086a5..27591b3086a5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h index 5f953c5c20b7..5f953c5c20b7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubgm107.fuc5.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnv108.fuc5 index 7c5d25630fa8..7c5d25630fa8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnv108.fuc5 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnv108.fuc5.h index e49b5a877ae4..e49b5a877ae4 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnv108.fuc5.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnv108.fuc5.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvc0.fuc3 index 3ff52badf932..3ff52badf932 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvc0.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvc0.fuc3.h index 92dfe6a4ac87..92dfe6a4ac87 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvc0.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvc0.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvd7.fuc3 index afbe03ac9077..afbe03ac9077 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvd7.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvd7.fuc3.h index 62b0c7601d8b..62b0c7601d8b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvd7.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvd7.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnve0.fuc3 index d4840f1879fd..d4840f1879fd 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnve0.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnve0.fuc3.h index 51c3797d8537..51c3797d8537 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnve0.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnve0.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3 b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvf0.fuc3 index ec42ed29b50d..ec42ed29b50d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvf0.fuc3 | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvf0.fuc3.h index a0af4b703a8e..a0af4b703a8e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/hubnvf0.fuc3.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubnvf0.fuc3.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/macros.fuc b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/macros.fuc index 2a0b0f844299..2a0b0f844299 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/macros.fuc +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/macros.fuc | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/os.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/os.h index 1718ae4e8224..1718ae4e8224 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/fuc/os.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/os.h | |||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/gk110b.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c index d07b19dc168d..59d7d9bf7bb5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/gk110b.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | |||
@@ -29,8 +29,8 @@ | |||
29 | * PGRAPH register lists | 29 | * PGRAPH register lists |
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | static const struct nvc0_graph_init | 32 | static const struct nvc0_gr_init |
33 | gk110b_graph_init_l1c_0[] = { | 33 | gk110b_gr_init_l1c_0[] = { |
34 | { 0x419c98, 1, 0x04, 0x00000000 }, | 34 | { 0x419c98, 1, 0x04, 0x00000000 }, |
35 | { 0x419ca8, 1, 0x04, 0x00000000 }, | 35 | { 0x419ca8, 1, 0x04, 0x00000000 }, |
36 | { 0x419cb0, 1, 0x04, 0x09000000 }, | 36 | { 0x419cb0, 1, 0x04, 0x09000000 }, |
@@ -44,8 +44,8 @@ gk110b_graph_init_l1c_0[] = { | |||
44 | {} | 44 | {} |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static const struct nvc0_graph_init | 47 | static const struct nvc0_gr_init |
48 | gk110b_graph_init_sm_0[] = { | 48 | gk110b_gr_init_sm_0[] = { |
49 | { 0x419e00, 1, 0x04, 0x00000080 }, | 49 | { 0x419e00, 1, 0x04, 0x00000080 }, |
50 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 50 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
51 | { 0x419ee4, 1, 0x04, 0x00000000 }, | 51 | { 0x419ee4, 1, 0x04, 0x00000000 }, |
@@ -61,37 +61,37 @@ gk110b_graph_init_sm_0[] = { | |||
61 | {} | 61 | {} |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static const struct nvc0_graph_pack | 64 | static const struct nvc0_gr_pack |
65 | gk110b_graph_pack_mmio[] = { | 65 | gk110b_gr_pack_mmio[] = { |
66 | { nve4_graph_init_main_0 }, | 66 | { nve4_gr_init_main_0 }, |
67 | { nvf0_graph_init_fe_0 }, | 67 | { nvf0_gr_init_fe_0 }, |
68 | { nvc0_graph_init_pri_0 }, | 68 | { nvc0_gr_init_pri_0 }, |
69 | { nvc0_graph_init_rstr2d_0 }, | 69 | { nvc0_gr_init_rstr2d_0 }, |
70 | { nvd9_graph_init_pd_0 }, | 70 | { nvd9_gr_init_pd_0 }, |
71 | { nvf0_graph_init_ds_0 }, | 71 | { nvf0_gr_init_ds_0 }, |
72 | { nvc0_graph_init_scc_0 }, | 72 | { nvc0_gr_init_scc_0 }, |
73 | { nvf0_graph_init_sked_0 }, | 73 | { nvf0_gr_init_sked_0 }, |
74 | { nvf0_graph_init_cwd_0 }, | 74 | { nvf0_gr_init_cwd_0 }, |
75 | { nvd9_graph_init_prop_0 }, | 75 | { nvd9_gr_init_prop_0 }, |
76 | { nvc1_graph_init_gpc_unk_0 }, | 76 | { nvc1_gr_init_gpc_unk_0 }, |
77 | { nvc0_graph_init_setup_0 }, | 77 | { nvc0_gr_init_setup_0 }, |
78 | { nvc0_graph_init_crstr_0 }, | 78 | { nvc0_gr_init_crstr_0 }, |
79 | { nvc1_graph_init_setup_1 }, | 79 | { nvc1_gr_init_setup_1 }, |
80 | { nvc0_graph_init_zcull_0 }, | 80 | { nvc0_gr_init_zcull_0 }, |
81 | { nvd9_graph_init_gpm_0 }, | 81 | { nvd9_gr_init_gpm_0 }, |
82 | { nvf0_graph_init_gpc_unk_1 }, | 82 | { nvf0_gr_init_gpc_unk_1 }, |
83 | { nvc0_graph_init_gcc_0 }, | 83 | { nvc0_gr_init_gcc_0 }, |
84 | { nve4_graph_init_tpccs_0 }, | 84 | { nve4_gr_init_tpccs_0 }, |
85 | { nvf0_graph_init_tex_0 }, | 85 | { nvf0_gr_init_tex_0 }, |
86 | { nve4_graph_init_pe_0 }, | 86 | { nve4_gr_init_pe_0 }, |
87 | { gk110b_graph_init_l1c_0 }, | 87 | { gk110b_gr_init_l1c_0 }, |
88 | { nvc0_graph_init_mpc_0 }, | 88 | { nvc0_gr_init_mpc_0 }, |
89 | { gk110b_graph_init_sm_0 }, | 89 | { gk110b_gr_init_sm_0 }, |
90 | { nvd7_graph_init_pes_0 }, | 90 | { nvd7_gr_init_pes_0 }, |
91 | { nvd7_graph_init_wwdx_0 }, | 91 | { nvd7_gr_init_wwdx_0 }, |
92 | { nvd7_graph_init_cbm_0 }, | 92 | { nvd7_gr_init_cbm_0 }, |
93 | { nve4_graph_init_be_0 }, | 93 | { nve4_gr_init_be_0 }, |
94 | { nvc0_graph_init_fe_1 }, | 94 | { nvc0_gr_init_fe_1 }, |
95 | {} | 95 | {} |
96 | }; | 96 | }; |
97 | 97 | ||
@@ -100,18 +100,18 @@ gk110b_graph_pack_mmio[] = { | |||
100 | ******************************************************************************/ | 100 | ******************************************************************************/ |
101 | 101 | ||
102 | struct nouveau_oclass * | 102 | struct nouveau_oclass * |
103 | gk110b_graph_oclass = &(struct nvc0_graph_oclass) { | 103 | gk110b_gr_oclass = &(struct nvc0_gr_oclass) { |
104 | .base.handle = NV_ENGINE(GR, 0xf1), | 104 | .base.handle = NV_ENGINE(GR, 0xf1), |
105 | .base.ofuncs = &(struct nouveau_ofuncs) { | 105 | .base.ofuncs = &(struct nouveau_ofuncs) { |
106 | .ctor = nvc0_graph_ctor, | 106 | .ctor = nvc0_gr_ctor, |
107 | .dtor = nvc0_graph_dtor, | 107 | .dtor = nvc0_gr_dtor, |
108 | .init = nve4_graph_init, | 108 | .init = nve4_gr_init, |
109 | .fini = nvf0_graph_fini, | 109 | .fini = nvf0_gr_fini, |
110 | }, | 110 | }, |
111 | .cclass = &gk110b_grctx_oclass, | 111 | .cclass = &gk110b_grctx_oclass, |
112 | .sclass = nvf0_graph_sclass, | 112 | .sclass = nvf0_gr_sclass, |
113 | .mmio = gk110b_graph_pack_mmio, | 113 | .mmio = gk110b_gr_pack_mmio, |
114 | .fecs.ucode = &nvf0_graph_fecs_ucode, | 114 | .fecs.ucode = &nvf0_gr_fecs_ucode, |
115 | .gpccs.ucode = &nvf0_graph_gpccs_ucode, | 115 | .gpccs.ucode = &nvf0_gr_gpccs_ucode, |
116 | .ppc_nr = 2, | 116 | .ppc_nr = 2, |
117 | }.base; | 117 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c index 7d0abe9f3fe7..082ea9f08e1c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/gk20a.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | |||
@@ -24,25 +24,25 @@ | |||
24 | #include "ctxnvc0.h" | 24 | #include "ctxnvc0.h" |
25 | 25 | ||
26 | static struct nouveau_oclass | 26 | static struct nouveau_oclass |
27 | gk20a_graph_sclass[] = { | 27 | gk20a_gr_sclass[] = { |
28 | { 0x902d, &nouveau_object_ofuncs }, | 28 | { 0x902d, &nouveau_object_ofuncs }, |
29 | { 0xa040, &nouveau_object_ofuncs }, | 29 | { 0xa040, &nouveau_object_ofuncs }, |
30 | { KEPLER_C, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 30 | { KEPLER_C, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
31 | { KEPLER_COMPUTE_A, &nouveau_object_ofuncs, nvc0_graph_90c0_omthds }, | 31 | { KEPLER_COMPUTE_A, &nouveau_object_ofuncs, nvc0_gr_90c0_omthds }, |
32 | {} | 32 | {} |
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct nouveau_oclass * | 35 | struct nouveau_oclass * |
36 | gk20a_graph_oclass = &(struct nvc0_graph_oclass) { | 36 | gk20a_gr_oclass = &(struct nvc0_gr_oclass) { |
37 | .base.handle = NV_ENGINE(GR, 0xea), | 37 | .base.handle = NV_ENGINE(GR, 0xea), |
38 | .base.ofuncs = &(struct nouveau_ofuncs) { | 38 | .base.ofuncs = &(struct nouveau_ofuncs) { |
39 | .ctor = nvc0_graph_ctor, | 39 | .ctor = nvc0_gr_ctor, |
40 | .dtor = nvc0_graph_dtor, | 40 | .dtor = nvc0_gr_dtor, |
41 | .init = nve4_graph_init, | 41 | .init = nve4_gr_init, |
42 | .fini = _nouveau_graph_fini, | 42 | .fini = _nouveau_gr_fini, |
43 | }, | 43 | }, |
44 | .cclass = &gk20a_grctx_oclass, | 44 | .cclass = &gk20a_grctx_oclass, |
45 | .sclass = gk20a_graph_sclass, | 45 | .sclass = gk20a_gr_sclass, |
46 | .mmio = nve4_graph_pack_mmio, | 46 | .mmio = nve4_gr_pack_mmio, |
47 | .ppc_nr = 1, | 47 | .ppc_nr = 1, |
48 | }.base; | 48 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/gm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c index 4bdbdab2fd9a..5a4669087a17 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/gm107.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | |||
@@ -33,11 +33,11 @@ | |||
33 | ******************************************************************************/ | 33 | ******************************************************************************/ |
34 | 34 | ||
35 | static struct nouveau_oclass | 35 | static struct nouveau_oclass |
36 | gm107_graph_sclass[] = { | 36 | gm107_gr_sclass[] = { |
37 | { 0x902d, &nouveau_object_ofuncs }, | 37 | { 0x902d, &nouveau_object_ofuncs }, |
38 | { 0xa140, &nouveau_object_ofuncs }, | 38 | { 0xa140, &nouveau_object_ofuncs }, |
39 | { MAXWELL_A, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 39 | { MAXWELL_A, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
40 | { MAXWELL_COMPUTE_A, &nouveau_object_ofuncs, nvc0_graph_90c0_omthds }, | 40 | { MAXWELL_COMPUTE_A, &nouveau_object_ofuncs, nvc0_gr_90c0_omthds }, |
41 | {} | 41 | {} |
42 | }; | 42 | }; |
43 | 43 | ||
@@ -45,8 +45,8 @@ gm107_graph_sclass[] = { | |||
45 | * PGRAPH register lists | 45 | * PGRAPH register lists |
46 | ******************************************************************************/ | 46 | ******************************************************************************/ |
47 | 47 | ||
48 | static const struct nvc0_graph_init | 48 | static const struct nvc0_gr_init |
49 | gm107_graph_init_main_0[] = { | 49 | gm107_gr_init_main_0[] = { |
50 | { 0x400080, 1, 0x04, 0x003003c2 }, | 50 | { 0x400080, 1, 0x04, 0x003003c2 }, |
51 | { 0x400088, 1, 0x04, 0x0001bfe7 }, | 51 | { 0x400088, 1, 0x04, 0x0001bfe7 }, |
52 | { 0x40008c, 1, 0x04, 0x00060000 }, | 52 | { 0x40008c, 1, 0x04, 0x00060000 }, |
@@ -61,8 +61,8 @@ gm107_graph_init_main_0[] = { | |||
61 | {} | 61 | {} |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static const struct nvc0_graph_init | 64 | static const struct nvc0_gr_init |
65 | gm107_graph_init_ds_0[] = { | 65 | gm107_gr_init_ds_0[] = { |
66 | { 0x405844, 1, 0x04, 0x00ffffff }, | 66 | { 0x405844, 1, 0x04, 0x00ffffff }, |
67 | { 0x405850, 1, 0x04, 0x00000000 }, | 67 | { 0x405850, 1, 0x04, 0x00000000 }, |
68 | { 0x405900, 1, 0x04, 0x00000000 }, | 68 | { 0x405900, 1, 0x04, 0x00000000 }, |
@@ -70,37 +70,37 @@ gm107_graph_init_ds_0[] = { | |||
70 | {} | 70 | {} |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static const struct nvc0_graph_init | 73 | static const struct nvc0_gr_init |
74 | gm107_graph_init_scc_0[] = { | 74 | gm107_gr_init_scc_0[] = { |
75 | { 0x40803c, 1, 0x04, 0x00000010 }, | 75 | { 0x40803c, 1, 0x04, 0x00000010 }, |
76 | {} | 76 | {} |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static const struct nvc0_graph_init | 79 | static const struct nvc0_gr_init |
80 | gm107_graph_init_sked_0[] = { | 80 | gm107_gr_init_sked_0[] = { |
81 | { 0x407010, 1, 0x04, 0x00000000 }, | 81 | { 0x407010, 1, 0x04, 0x00000000 }, |
82 | { 0x407040, 1, 0x04, 0x40440424 }, | 82 | { 0x407040, 1, 0x04, 0x40440424 }, |
83 | { 0x407048, 1, 0x04, 0x0000000a }, | 83 | { 0x407048, 1, 0x04, 0x0000000a }, |
84 | {} | 84 | {} |
85 | }; | 85 | }; |
86 | 86 | ||
87 | static const struct nvc0_graph_init | 87 | static const struct nvc0_gr_init |
88 | gm107_graph_init_prop_0[] = { | 88 | gm107_gr_init_prop_0[] = { |
89 | { 0x418408, 1, 0x04, 0x00000000 }, | 89 | { 0x418408, 1, 0x04, 0x00000000 }, |
90 | { 0x4184a0, 1, 0x04, 0x00000000 }, | 90 | { 0x4184a0, 1, 0x04, 0x00000000 }, |
91 | {} | 91 | {} |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static const struct nvc0_graph_init | 94 | static const struct nvc0_gr_init |
95 | gm107_graph_init_setup_1[] = { | 95 | gm107_gr_init_setup_1[] = { |
96 | { 0x4188c8, 2, 0x04, 0x00000000 }, | 96 | { 0x4188c8, 2, 0x04, 0x00000000 }, |
97 | { 0x4188d0, 1, 0x04, 0x00010000 }, | 97 | { 0x4188d0, 1, 0x04, 0x00010000 }, |
98 | { 0x4188d4, 1, 0x04, 0x00010201 }, | 98 | { 0x4188d4, 1, 0x04, 0x00010201 }, |
99 | {} | 99 | {} |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static const struct nvc0_graph_init | 102 | static const struct nvc0_gr_init |
103 | gm107_graph_init_zcull_0[] = { | 103 | gm107_gr_init_zcull_0[] = { |
104 | { 0x418910, 1, 0x04, 0x00010001 }, | 104 | { 0x418910, 1, 0x04, 0x00010001 }, |
105 | { 0x418914, 1, 0x04, 0x00000301 }, | 105 | { 0x418914, 1, 0x04, 0x00000301 }, |
106 | { 0x418918, 1, 0x04, 0x00800000 }, | 106 | { 0x418918, 1, 0x04, 0x00800000 }, |
@@ -110,8 +110,8 @@ gm107_graph_init_zcull_0[] = { | |||
110 | {} | 110 | {} |
111 | }; | 111 | }; |
112 | 112 | ||
113 | static const struct nvc0_graph_init | 113 | static const struct nvc0_gr_init |
114 | gm107_graph_init_gpc_unk_1[] = { | 114 | gm107_gr_init_gpc_unk_1[] = { |
115 | { 0x418d00, 1, 0x04, 0x00000000 }, | 115 | { 0x418d00, 1, 0x04, 0x00000000 }, |
116 | { 0x418f00, 1, 0x04, 0x00000400 }, | 116 | { 0x418f00, 1, 0x04, 0x00000400 }, |
117 | { 0x418f08, 1, 0x04, 0x00000000 }, | 117 | { 0x418f08, 1, 0x04, 0x00000000 }, |
@@ -119,8 +119,8 @@ gm107_graph_init_gpc_unk_1[] = { | |||
119 | {} | 119 | {} |
120 | }; | 120 | }; |
121 | 121 | ||
122 | static const struct nvc0_graph_init | 122 | static const struct nvc0_gr_init |
123 | gm107_graph_init_tpccs_0[] = { | 123 | gm107_gr_init_tpccs_0[] = { |
124 | { 0x419dc4, 1, 0x04, 0x00000000 }, | 124 | { 0x419dc4, 1, 0x04, 0x00000000 }, |
125 | { 0x419dc8, 1, 0x04, 0x00000501 }, | 125 | { 0x419dc8, 1, 0x04, 0x00000501 }, |
126 | { 0x419dd0, 1, 0x04, 0x00000000 }, | 126 | { 0x419dd0, 1, 0x04, 0x00000000 }, |
@@ -133,8 +133,8 @@ gm107_graph_init_tpccs_0[] = { | |||
133 | {} | 133 | {} |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static const struct nvc0_graph_init | 136 | static const struct nvc0_gr_init |
137 | gm107_graph_init_tex_0[] = { | 137 | gm107_gr_init_tex_0[] = { |
138 | { 0x419ab0, 1, 0x04, 0x00000000 }, | 138 | { 0x419ab0, 1, 0x04, 0x00000000 }, |
139 | { 0x419ab8, 1, 0x04, 0x000000e7 }, | 139 | { 0x419ab8, 1, 0x04, 0x000000e7 }, |
140 | { 0x419abc, 1, 0x04, 0x00000000 }, | 140 | { 0x419abc, 1, 0x04, 0x00000000 }, |
@@ -147,8 +147,8 @@ gm107_graph_init_tex_0[] = { | |||
147 | {} | 147 | {} |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static const struct nvc0_graph_init | 150 | static const struct nvc0_gr_init |
151 | gm107_graph_init_pe_0[] = { | 151 | gm107_gr_init_pe_0[] = { |
152 | { 0x419900, 1, 0x04, 0x000000ff }, | 152 | { 0x419900, 1, 0x04, 0x000000ff }, |
153 | { 0x41980c, 1, 0x04, 0x00000010 }, | 153 | { 0x41980c, 1, 0x04, 0x00000010 }, |
154 | { 0x419844, 1, 0x04, 0x00000000 }, | 154 | { 0x419844, 1, 0x04, 0x00000000 }, |
@@ -159,15 +159,15 @@ gm107_graph_init_pe_0[] = { | |||
159 | {} | 159 | {} |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static const struct nvc0_graph_init | 162 | static const struct nvc0_gr_init |
163 | gm107_graph_init_l1c_0[] = { | 163 | gm107_gr_init_l1c_0[] = { |
164 | { 0x419c98, 1, 0x04, 0x00000000 }, | 164 | { 0x419c98, 1, 0x04, 0x00000000 }, |
165 | { 0x419cc0, 2, 0x04, 0x00000000 }, | 165 | { 0x419cc0, 2, 0x04, 0x00000000 }, |
166 | {} | 166 | {} |
167 | }; | 167 | }; |
168 | 168 | ||
169 | static const struct nvc0_graph_init | 169 | static const struct nvc0_gr_init |
170 | gm107_graph_init_sm_0[] = { | 170 | gm107_gr_init_sm_0[] = { |
171 | { 0x419e30, 1, 0x04, 0x000000ff }, | 171 | { 0x419e30, 1, 0x04, 0x000000ff }, |
172 | { 0x419e00, 1, 0x04, 0x00000000 }, | 172 | { 0x419e00, 1, 0x04, 0x00000000 }, |
173 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 173 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
@@ -185,16 +185,16 @@ gm107_graph_init_sm_0[] = { | |||
185 | {} | 185 | {} |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static const struct nvc0_graph_init | 188 | static const struct nvc0_gr_init |
189 | gm107_graph_init_l1c_1[] = { | 189 | gm107_gr_init_l1c_1[] = { |
190 | { 0x419ccc, 2, 0x04, 0x00000000 }, | 190 | { 0x419ccc, 2, 0x04, 0x00000000 }, |
191 | { 0x419c80, 1, 0x04, 0x3f006022 }, | 191 | { 0x419c80, 1, 0x04, 0x3f006022 }, |
192 | { 0x419c88, 1, 0x04, 0x00000000 }, | 192 | { 0x419c88, 1, 0x04, 0x00000000 }, |
193 | {} | 193 | {} |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static const struct nvc0_graph_init | 196 | static const struct nvc0_gr_init |
197 | gm107_graph_init_pes_0[] = { | 197 | gm107_gr_init_pes_0[] = { |
198 | { 0x41be50, 1, 0x04, 0x000000ff }, | 198 | { 0x41be50, 1, 0x04, 0x000000ff }, |
199 | { 0x41be04, 1, 0x04, 0x00000000 }, | 199 | { 0x41be04, 1, 0x04, 0x00000000 }, |
200 | { 0x41be08, 1, 0x04, 0x00000004 }, | 200 | { 0x41be08, 1, 0x04, 0x00000004 }, |
@@ -205,21 +205,21 @@ gm107_graph_init_pes_0[] = { | |||
205 | {} | 205 | {} |
206 | }; | 206 | }; |
207 | 207 | ||
208 | static const struct nvc0_graph_init | 208 | static const struct nvc0_gr_init |
209 | gm107_graph_init_wwdx_0[] = { | 209 | gm107_gr_init_wwdx_0[] = { |
210 | { 0x41bfd4, 1, 0x04, 0x00800000 }, | 210 | { 0x41bfd4, 1, 0x04, 0x00800000 }, |
211 | { 0x41bfdc, 1, 0x04, 0x00000000 }, | 211 | { 0x41bfdc, 1, 0x04, 0x00000000 }, |
212 | {} | 212 | {} |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static const struct nvc0_graph_init | 215 | static const struct nvc0_gr_init |
216 | gm107_graph_init_cbm_0[] = { | 216 | gm107_gr_init_cbm_0[] = { |
217 | { 0x41becc, 1, 0x04, 0x00000000 }, | 217 | { 0x41becc, 1, 0x04, 0x00000000 }, |
218 | {} | 218 | {} |
219 | }; | 219 | }; |
220 | 220 | ||
221 | static const struct nvc0_graph_init | 221 | static const struct nvc0_gr_init |
222 | gm107_graph_init_be_0[] = { | 222 | gm107_gr_init_be_0[] = { |
223 | { 0x408890, 1, 0x04, 0x000000ff }, | 223 | { 0x408890, 1, 0x04, 0x000000ff }, |
224 | { 0x40880c, 1, 0x04, 0x00000000 }, | 224 | { 0x40880c, 1, 0x04, 0x00000000 }, |
225 | { 0x408850, 1, 0x04, 0x00000004 }, | 225 | { 0x408850, 1, 0x04, 0x00000004 }, |
@@ -244,45 +244,45 @@ gm107_graph_init_be_0[] = { | |||
244 | {} | 244 | {} |
245 | }; | 245 | }; |
246 | 246 | ||
247 | static const struct nvc0_graph_init | 247 | static const struct nvc0_gr_init |
248 | gm107_graph_init_sm_1[] = { | 248 | gm107_gr_init_sm_1[] = { |
249 | { 0x419e5c, 1, 0x04, 0x00000000 }, | 249 | { 0x419e5c, 1, 0x04, 0x00000000 }, |
250 | { 0x419e58, 1, 0x04, 0x00000000 }, | 250 | { 0x419e58, 1, 0x04, 0x00000000 }, |
251 | {} | 251 | {} |
252 | }; | 252 | }; |
253 | 253 | ||
254 | static const struct nvc0_graph_pack | 254 | static const struct nvc0_gr_pack |
255 | gm107_graph_pack_mmio[] = { | 255 | gm107_gr_pack_mmio[] = { |
256 | { gm107_graph_init_main_0 }, | 256 | { gm107_gr_init_main_0 }, |
257 | { nvf0_graph_init_fe_0 }, | 257 | { nvf0_gr_init_fe_0 }, |
258 | { nvc0_graph_init_pri_0 }, | 258 | { nvc0_gr_init_pri_0 }, |
259 | { nvc0_graph_init_rstr2d_0 }, | 259 | { nvc0_gr_init_rstr2d_0 }, |
260 | { nvc0_graph_init_pd_0 }, | 260 | { nvc0_gr_init_pd_0 }, |
261 | { gm107_graph_init_ds_0 }, | 261 | { gm107_gr_init_ds_0 }, |
262 | { gm107_graph_init_scc_0 }, | 262 | { gm107_gr_init_scc_0 }, |
263 | { gm107_graph_init_sked_0 }, | 263 | { gm107_gr_init_sked_0 }, |
264 | { nvf0_graph_init_cwd_0 }, | 264 | { nvf0_gr_init_cwd_0 }, |
265 | { gm107_graph_init_prop_0 }, | 265 | { gm107_gr_init_prop_0 }, |
266 | { nv108_graph_init_gpc_unk_0 }, | 266 | { nv108_gr_init_gpc_unk_0 }, |
267 | { nvc0_graph_init_setup_0 }, | 267 | { nvc0_gr_init_setup_0 }, |
268 | { nvc0_graph_init_crstr_0 }, | 268 | { nvc0_gr_init_crstr_0 }, |
269 | { gm107_graph_init_setup_1 }, | 269 | { gm107_gr_init_setup_1 }, |
270 | { gm107_graph_init_zcull_0 }, | 270 | { gm107_gr_init_zcull_0 }, |
271 | { nvc0_graph_init_gpm_0 }, | 271 | { nvc0_gr_init_gpm_0 }, |
272 | { gm107_graph_init_gpc_unk_1 }, | 272 | { gm107_gr_init_gpc_unk_1 }, |
273 | { nvc0_graph_init_gcc_0 }, | 273 | { nvc0_gr_init_gcc_0 }, |
274 | { gm107_graph_init_tpccs_0 }, | 274 | { gm107_gr_init_tpccs_0 }, |
275 | { gm107_graph_init_tex_0 }, | 275 | { gm107_gr_init_tex_0 }, |
276 | { gm107_graph_init_pe_0 }, | 276 | { gm107_gr_init_pe_0 }, |
277 | { gm107_graph_init_l1c_0 }, | 277 | { gm107_gr_init_l1c_0 }, |
278 | { nvc0_graph_init_mpc_0 }, | 278 | { nvc0_gr_init_mpc_0 }, |
279 | { gm107_graph_init_sm_0 }, | 279 | { gm107_gr_init_sm_0 }, |
280 | { gm107_graph_init_l1c_1 }, | 280 | { gm107_gr_init_l1c_1 }, |
281 | { gm107_graph_init_pes_0 }, | 281 | { gm107_gr_init_pes_0 }, |
282 | { gm107_graph_init_wwdx_0 }, | 282 | { gm107_gr_init_wwdx_0 }, |
283 | { gm107_graph_init_cbm_0 }, | 283 | { gm107_gr_init_cbm_0 }, |
284 | { gm107_graph_init_be_0 }, | 284 | { gm107_gr_init_be_0 }, |
285 | { gm107_graph_init_sm_1 }, | 285 | { gm107_gr_init_sm_1 }, |
286 | {} | 286 | {} |
287 | }; | 287 | }; |
288 | 288 | ||
@@ -291,7 +291,7 @@ gm107_graph_pack_mmio[] = { | |||
291 | ******************************************************************************/ | 291 | ******************************************************************************/ |
292 | 292 | ||
293 | static void | 293 | static void |
294 | gm107_graph_init_bios(struct nvc0_graph_priv *priv) | 294 | gm107_gr_init_bios(struct nvc0_gr_priv *priv) |
295 | { | 295 | { |
296 | static const struct { | 296 | static const struct { |
297 | u32 ctrl; | 297 | u32 ctrl; |
@@ -319,17 +319,17 @@ gm107_graph_init_bios(struct nvc0_graph_priv *priv) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | int | 321 | int |
322 | gm107_graph_init(struct nouveau_object *object) | 322 | gm107_gr_init(struct nouveau_object *object) |
323 | { | 323 | { |
324 | struct nvc0_graph_oclass *oclass = (void *)object->oclass; | 324 | struct nvc0_gr_oclass *oclass = (void *)object->oclass; |
325 | struct nvc0_graph_priv *priv = (void *)object; | 325 | struct nvc0_gr_priv *priv = (void *)object; |
326 | const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tpc_total); | 326 | const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tpc_total); |
327 | u32 data[TPC_MAX / 8] = {}; | 327 | u32 data[TPC_MAX / 8] = {}; |
328 | u8 tpcnr[GPC_MAX]; | 328 | u8 tpcnr[GPC_MAX]; |
329 | int gpc, tpc, ppc, rop; | 329 | int gpc, tpc, ppc, rop; |
330 | int ret, i; | 330 | int ret, i; |
331 | 331 | ||
332 | ret = nouveau_graph_init(&priv->base); | 332 | ret = nouveau_gr_init(&priv->base); |
333 | if (ret) | 333 | if (ret) |
334 | return ret; | 334 | return ret; |
335 | 335 | ||
@@ -339,9 +339,9 @@ gm107_graph_init(struct nouveau_object *object) | |||
339 | nv_wr32(priv, GPC_BCAST(0x08b4), priv->unk4188b4->addr >> 8); | 339 | nv_wr32(priv, GPC_BCAST(0x08b4), priv->unk4188b4->addr >> 8); |
340 | nv_wr32(priv, GPC_BCAST(0x08b8), priv->unk4188b8->addr >> 8); | 340 | nv_wr32(priv, GPC_BCAST(0x08b8), priv->unk4188b8->addr >> 8); |
341 | 341 | ||
342 | nvc0_graph_mmio(priv, oclass->mmio); | 342 | nvc0_gr_mmio(priv, oclass->mmio); |
343 | 343 | ||
344 | gm107_graph_init_bios(priv); | 344 | gm107_gr_init_bios(priv); |
345 | 345 | ||
346 | nv_wr32(priv, GPC_UNIT(0, 0x3018), 0x00000001); | 346 | nv_wr32(priv, GPC_UNIT(0, 0x3018), 0x00000001); |
347 | 347 | ||
@@ -426,15 +426,15 @@ gm107_graph_init(struct nouveau_object *object) | |||
426 | 426 | ||
427 | nv_wr32(priv, 0x400054, 0x2c350f63); | 427 | nv_wr32(priv, 0x400054, 0x2c350f63); |
428 | 428 | ||
429 | nvc0_graph_zbc_init(priv); | 429 | nvc0_gr_zbc_init(priv); |
430 | 430 | ||
431 | return nvc0_graph_init_ctxctl(priv); | 431 | return nvc0_gr_init_ctxctl(priv); |
432 | } | 432 | } |
433 | 433 | ||
434 | #include "fuc/hubgm107.fuc5.h" | 434 | #include "fuc/hubgm107.fuc5.h" |
435 | 435 | ||
436 | static struct nvc0_graph_ucode | 436 | static struct nvc0_gr_ucode |
437 | gm107_graph_fecs_ucode = { | 437 | gm107_gr_fecs_ucode = { |
438 | .code.data = gm107_grhub_code, | 438 | .code.data = gm107_grhub_code, |
439 | .code.size = sizeof(gm107_grhub_code), | 439 | .code.size = sizeof(gm107_grhub_code), |
440 | .data.data = gm107_grhub_data, | 440 | .data.data = gm107_grhub_data, |
@@ -443,8 +443,8 @@ gm107_graph_fecs_ucode = { | |||
443 | 443 | ||
444 | #include "fuc/gpcgm107.fuc5.h" | 444 | #include "fuc/gpcgm107.fuc5.h" |
445 | 445 | ||
446 | static struct nvc0_graph_ucode | 446 | static struct nvc0_gr_ucode |
447 | gm107_graph_gpccs_ucode = { | 447 | gm107_gr_gpccs_ucode = { |
448 | .code.data = gm107_grgpc_code, | 448 | .code.data = gm107_grgpc_code, |
449 | .code.size = sizeof(gm107_grgpc_code), | 449 | .code.size = sizeof(gm107_grgpc_code), |
450 | .data.data = gm107_grgpc_data, | 450 | .data.data = gm107_grgpc_data, |
@@ -452,18 +452,18 @@ gm107_graph_gpccs_ucode = { | |||
452 | }; | 452 | }; |
453 | 453 | ||
454 | struct nouveau_oclass * | 454 | struct nouveau_oclass * |
455 | gm107_graph_oclass = &(struct nvc0_graph_oclass) { | 455 | gm107_gr_oclass = &(struct nvc0_gr_oclass) { |
456 | .base.handle = NV_ENGINE(GR, 0x07), | 456 | .base.handle = NV_ENGINE(GR, 0x07), |
457 | .base.ofuncs = &(struct nouveau_ofuncs) { | 457 | .base.ofuncs = &(struct nouveau_ofuncs) { |
458 | .ctor = nvc0_graph_ctor, | 458 | .ctor = nvc0_gr_ctor, |
459 | .dtor = nvc0_graph_dtor, | 459 | .dtor = nvc0_gr_dtor, |
460 | .init = gm107_graph_init, | 460 | .init = gm107_gr_init, |
461 | .fini = _nouveau_graph_fini, | 461 | .fini = _nouveau_gr_fini, |
462 | }, | 462 | }, |
463 | .cclass = &gm107_grctx_oclass, | 463 | .cclass = &gm107_grctx_oclass, |
464 | .sclass = gm107_graph_sclass, | 464 | .sclass = gm107_gr_sclass, |
465 | .mmio = gm107_graph_pack_mmio, | 465 | .mmio = gm107_gr_pack_mmio, |
466 | .fecs.ucode = 0 ? &gm107_graph_fecs_ucode : NULL, | 466 | .fecs.ucode = 0 ? &gm107_gr_fecs_ucode : NULL, |
467 | .gpccs.ucode = &gm107_graph_gpccs_ucode, | 467 | .gpccs.ucode = &gm107_gr_gpccs_ucode, |
468 | .ppc_nr = 2, | 468 | .ppc_nr = 2, |
469 | }.base; | 469 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c index f70e2f67a4dd..4d25c9532b2b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * Software is furnished to do so, subject to the following conditions: | 10 | * Software is furnished to do so, subject to the following conditions: |
11 | * | 11 | * |
12 | * The above copyright notice and this permission notice (including the next | 12 | * The above copyright notice and this permission notice (including the next |
13 | * paragraph) shall be included in all copies or substantial portions of the | 13 | * paragr) shall be included in all copies or substantial portions of the |
14 | * Software. | 14 | * Software. |
15 | * | 15 | * |
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
@@ -32,12 +32,12 @@ | |||
32 | #include <subdev/timer.h> | 32 | #include <subdev/timer.h> |
33 | 33 | ||
34 | #include <engine/fifo.h> | 34 | #include <engine/fifo.h> |
35 | #include <engine/graph.h> | 35 | #include <engine/gr.h> |
36 | 36 | ||
37 | #include "regs.h" | 37 | #include "regs.h" |
38 | 38 | ||
39 | static u32 | 39 | static u32 |
40 | nv04_graph_ctx_regs[] = { | 40 | nv04_gr_ctx_regs[] = { |
41 | 0x0040053c, | 41 | 0x0040053c, |
42 | 0x00400544, | 42 | 0x00400544, |
43 | 0x00400540, | 43 | 0x00400540, |
@@ -351,21 +351,21 @@ nv04_graph_ctx_regs[] = { | |||
351 | NV04_PGRAPH_DEBUG_3 | 351 | NV04_PGRAPH_DEBUG_3 |
352 | }; | 352 | }; |
353 | 353 | ||
354 | struct nv04_graph_priv { | 354 | struct nv04_gr_priv { |
355 | struct nouveau_graph base; | 355 | struct nouveau_gr base; |
356 | struct nv04_graph_chan *chan[16]; | 356 | struct nv04_gr_chan *chan[16]; |
357 | spinlock_t lock; | 357 | spinlock_t lock; |
358 | }; | 358 | }; |
359 | 359 | ||
360 | struct nv04_graph_chan { | 360 | struct nv04_gr_chan { |
361 | struct nouveau_object base; | 361 | struct nouveau_object base; |
362 | int chid; | 362 | int chid; |
363 | u32 nv04[ARRAY_SIZE(nv04_graph_ctx_regs)]; | 363 | u32 nv04[ARRAY_SIZE(nv04_gr_ctx_regs)]; |
364 | }; | 364 | }; |
365 | 365 | ||
366 | 366 | ||
367 | static inline struct nv04_graph_priv * | 367 | static inline struct nv04_gr_priv * |
368 | nv04_graph_priv(struct nv04_graph_chan *chan) | 368 | nv04_gr_priv(struct nv04_gr_chan *chan) |
369 | { | 369 | { |
370 | return (void *)nv_object(chan)->engine; | 370 | return (void *)nv_object(chan)->engine; |
371 | } | 371 | } |
@@ -449,9 +449,9 @@ nv04_graph_priv(struct nv04_graph_chan *chan) | |||
449 | */ | 449 | */ |
450 | 450 | ||
451 | static void | 451 | static void |
452 | nv04_graph_set_ctx1(struct nouveau_object *object, u32 mask, u32 value) | 452 | nv04_gr_set_ctx1(struct nouveau_object *object, u32 mask, u32 value) |
453 | { | 453 | { |
454 | struct nv04_graph_priv *priv = (void *)object->engine; | 454 | struct nv04_gr_priv *priv = (void *)object->engine; |
455 | int subc = (nv_rd32(priv, NV04_PGRAPH_TRAPPED_ADDR) >> 13) & 0x7; | 455 | int subc = (nv_rd32(priv, NV04_PGRAPH_TRAPPED_ADDR) >> 13) & 0x7; |
456 | u32 tmp; | 456 | u32 tmp; |
457 | 457 | ||
@@ -465,7 +465,7 @@ nv04_graph_set_ctx1(struct nouveau_object *object, u32 mask, u32 value) | |||
465 | } | 465 | } |
466 | 466 | ||
467 | static void | 467 | static void |
468 | nv04_graph_set_ctx_val(struct nouveau_object *object, u32 mask, u32 value) | 468 | nv04_gr_set_ctx_val(struct nouveau_object *object, u32 mask, u32 value) |
469 | { | 469 | { |
470 | int class, op, valid = 1; | 470 | int class, op, valid = 1; |
471 | u32 tmp, ctx1; | 471 | u32 tmp, ctx1; |
@@ -509,11 +509,11 @@ nv04_graph_set_ctx_val(struct nouveau_object *object, u32 mask, u32 value) | |||
509 | break; | 509 | break; |
510 | } | 510 | } |
511 | 511 | ||
512 | nv04_graph_set_ctx1(object, 0x01000000, valid << 24); | 512 | nv04_gr_set_ctx1(object, 0x01000000, valid << 24); |
513 | } | 513 | } |
514 | 514 | ||
515 | static int | 515 | static int |
516 | nv04_graph_mthd_set_operation(struct nouveau_object *object, u32 mthd, | 516 | nv04_gr_mthd_set_operation(struct nouveau_object *object, u32 mthd, |
517 | void *args, u32 size) | 517 | void *args, u32 size) |
518 | { | 518 | { |
519 | u32 class = nv_ro32(object, 0) & 0xff; | 519 | u32 class = nv_ro32(object, 0) & 0xff; |
@@ -523,17 +523,17 @@ nv04_graph_mthd_set_operation(struct nouveau_object *object, u32 mthd, | |||
523 | /* Old versions of the objects only accept first three operations. */ | 523 | /* Old versions of the objects only accept first three operations. */ |
524 | if (data > 2 && class < 0x40) | 524 | if (data > 2 && class < 0x40) |
525 | return 1; | 525 | return 1; |
526 | nv04_graph_set_ctx1(object, 0x00038000, data << 15); | 526 | nv04_gr_set_ctx1(object, 0x00038000, data << 15); |
527 | /* changing operation changes set of objects needed for validation */ | 527 | /* changing operation changes set of objects needed for validation */ |
528 | nv04_graph_set_ctx_val(object, 0, 0); | 528 | nv04_gr_set_ctx_val(object, 0, 0); |
529 | return 0; | 529 | return 0; |
530 | } | 530 | } |
531 | 531 | ||
532 | static int | 532 | static int |
533 | nv04_graph_mthd_surf3d_clip_h(struct nouveau_object *object, u32 mthd, | 533 | nv04_gr_mthd_surf3d_clip_h(struct nouveau_object *object, u32 mthd, |
534 | void *args, u32 size) | 534 | void *args, u32 size) |
535 | { | 535 | { |
536 | struct nv04_graph_priv *priv = (void *)object->engine; | 536 | struct nv04_gr_priv *priv = (void *)object->engine; |
537 | u32 data = *(u32 *)args; | 537 | u32 data = *(u32 *)args; |
538 | u32 min = data & 0xffff, max; | 538 | u32 min = data & 0xffff, max; |
539 | u32 w = data >> 16; | 539 | u32 w = data >> 16; |
@@ -551,10 +551,10 @@ nv04_graph_mthd_surf3d_clip_h(struct nouveau_object *object, u32 mthd, | |||
551 | } | 551 | } |
552 | 552 | ||
553 | static int | 553 | static int |
554 | nv04_graph_mthd_surf3d_clip_v(struct nouveau_object *object, u32 mthd, | 554 | nv04_gr_mthd_surf3d_clip_v(struct nouveau_object *object, u32 mthd, |
555 | void *args, u32 size) | 555 | void *args, u32 size) |
556 | { | 556 | { |
557 | struct nv04_graph_priv *priv = (void *)object->engine; | 557 | struct nv04_gr_priv *priv = (void *)object->engine; |
558 | u32 data = *(u32 *)args; | 558 | u32 data = *(u32 *)args; |
559 | u32 min = data & 0xffff, max; | 559 | u32 min = data & 0xffff, max; |
560 | u32 w = data >> 16; | 560 | u32 w = data >> 16; |
@@ -572,7 +572,7 @@ nv04_graph_mthd_surf3d_clip_v(struct nouveau_object *object, u32 mthd, | |||
572 | } | 572 | } |
573 | 573 | ||
574 | static u16 | 574 | static u16 |
575 | nv04_graph_mthd_bind_class(struct nouveau_object *object, u32 *args, u32 size) | 575 | nv04_gr_mthd_bind_class(struct nouveau_object *object, u32 *args, u32 size) |
576 | { | 576 | { |
577 | struct nouveau_instmem *imem = nouveau_instmem(object); | 577 | struct nouveau_instmem *imem = nouveau_instmem(object); |
578 | u32 inst = *(u32 *)args << 4; | 578 | u32 inst = *(u32 *)args << 4; |
@@ -580,380 +580,380 @@ nv04_graph_mthd_bind_class(struct nouveau_object *object, u32 *args, u32 size) | |||
580 | } | 580 | } |
581 | 581 | ||
582 | static int | 582 | static int |
583 | nv04_graph_mthd_bind_surf2d(struct nouveau_object *object, u32 mthd, | 583 | nv04_gr_mthd_bind_surf2d(struct nouveau_object *object, u32 mthd, |
584 | void *args, u32 size) | 584 | void *args, u32 size) |
585 | { | 585 | { |
586 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 586 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
587 | case 0x30: | 587 | case 0x30: |
588 | nv04_graph_set_ctx1(object, 0x00004000, 0); | 588 | nv04_gr_set_ctx1(object, 0x00004000, 0); |
589 | nv04_graph_set_ctx_val(object, 0x02000000, 0); | 589 | nv04_gr_set_ctx_val(object, 0x02000000, 0); |
590 | return 0; | 590 | return 0; |
591 | case 0x42: | 591 | case 0x42: |
592 | nv04_graph_set_ctx1(object, 0x00004000, 0); | 592 | nv04_gr_set_ctx1(object, 0x00004000, 0); |
593 | nv04_graph_set_ctx_val(object, 0x02000000, 0x02000000); | 593 | nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); |
594 | return 0; | 594 | return 0; |
595 | } | 595 | } |
596 | return 1; | 596 | return 1; |
597 | } | 597 | } |
598 | 598 | ||
599 | static int | 599 | static int |
600 | nv04_graph_mthd_bind_surf2d_swzsurf(struct nouveau_object *object, u32 mthd, | 600 | nv04_gr_mthd_bind_surf2d_swzsurf(struct nouveau_object *object, u32 mthd, |
601 | void *args, u32 size) | 601 | void *args, u32 size) |
602 | { | 602 | { |
603 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 603 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
604 | case 0x30: | 604 | case 0x30: |
605 | nv04_graph_set_ctx1(object, 0x00004000, 0); | 605 | nv04_gr_set_ctx1(object, 0x00004000, 0); |
606 | nv04_graph_set_ctx_val(object, 0x02000000, 0); | 606 | nv04_gr_set_ctx_val(object, 0x02000000, 0); |
607 | return 0; | 607 | return 0; |
608 | case 0x42: | 608 | case 0x42: |
609 | nv04_graph_set_ctx1(object, 0x00004000, 0); | 609 | nv04_gr_set_ctx1(object, 0x00004000, 0); |
610 | nv04_graph_set_ctx_val(object, 0x02000000, 0x02000000); | 610 | nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); |
611 | return 0; | 611 | return 0; |
612 | case 0x52: | 612 | case 0x52: |
613 | nv04_graph_set_ctx1(object, 0x00004000, 0x00004000); | 613 | nv04_gr_set_ctx1(object, 0x00004000, 0x00004000); |
614 | nv04_graph_set_ctx_val(object, 0x02000000, 0x02000000); | 614 | nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); |
615 | return 0; | 615 | return 0; |
616 | } | 616 | } |
617 | return 1; | 617 | return 1; |
618 | } | 618 | } |
619 | 619 | ||
620 | static int | 620 | static int |
621 | nv01_graph_mthd_bind_patt(struct nouveau_object *object, u32 mthd, | 621 | nv01_gr_mthd_bind_patt(struct nouveau_object *object, u32 mthd, |
622 | void *args, u32 size) | 622 | void *args, u32 size) |
623 | { | 623 | { |
624 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 624 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
625 | case 0x30: | 625 | case 0x30: |
626 | nv04_graph_set_ctx_val(object, 0x08000000, 0); | 626 | nv04_gr_set_ctx_val(object, 0x08000000, 0); |
627 | return 0; | 627 | return 0; |
628 | case 0x18: | 628 | case 0x18: |
629 | nv04_graph_set_ctx_val(object, 0x08000000, 0x08000000); | 629 | nv04_gr_set_ctx_val(object, 0x08000000, 0x08000000); |
630 | return 0; | 630 | return 0; |
631 | } | 631 | } |
632 | return 1; | 632 | return 1; |
633 | } | 633 | } |
634 | 634 | ||
635 | static int | 635 | static int |
636 | nv04_graph_mthd_bind_patt(struct nouveau_object *object, u32 mthd, | 636 | nv04_gr_mthd_bind_patt(struct nouveau_object *object, u32 mthd, |
637 | void *args, u32 size) | 637 | void *args, u32 size) |
638 | { | 638 | { |
639 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 639 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
640 | case 0x30: | 640 | case 0x30: |
641 | nv04_graph_set_ctx_val(object, 0x08000000, 0); | 641 | nv04_gr_set_ctx_val(object, 0x08000000, 0); |
642 | return 0; | 642 | return 0; |
643 | case 0x44: | 643 | case 0x44: |
644 | nv04_graph_set_ctx_val(object, 0x08000000, 0x08000000); | 644 | nv04_gr_set_ctx_val(object, 0x08000000, 0x08000000); |
645 | return 0; | 645 | return 0; |
646 | } | 646 | } |
647 | return 1; | 647 | return 1; |
648 | } | 648 | } |
649 | 649 | ||
650 | static int | 650 | static int |
651 | nv04_graph_mthd_bind_rop(struct nouveau_object *object, u32 mthd, | 651 | nv04_gr_mthd_bind_rop(struct nouveau_object *object, u32 mthd, |
652 | void *args, u32 size) | 652 | void *args, u32 size) |
653 | { | 653 | { |
654 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 654 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
655 | case 0x30: | 655 | case 0x30: |
656 | nv04_graph_set_ctx_val(object, 0x10000000, 0); | 656 | nv04_gr_set_ctx_val(object, 0x10000000, 0); |
657 | return 0; | 657 | return 0; |
658 | case 0x43: | 658 | case 0x43: |
659 | nv04_graph_set_ctx_val(object, 0x10000000, 0x10000000); | 659 | nv04_gr_set_ctx_val(object, 0x10000000, 0x10000000); |
660 | return 0; | 660 | return 0; |
661 | } | 661 | } |
662 | return 1; | 662 | return 1; |
663 | } | 663 | } |
664 | 664 | ||
665 | static int | 665 | static int |
666 | nv04_graph_mthd_bind_beta1(struct nouveau_object *object, u32 mthd, | 666 | nv04_gr_mthd_bind_beta1(struct nouveau_object *object, u32 mthd, |
667 | void *args, u32 size) | 667 | void *args, u32 size) |
668 | { | 668 | { |
669 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 669 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
670 | case 0x30: | 670 | case 0x30: |
671 | nv04_graph_set_ctx_val(object, 0x20000000, 0); | 671 | nv04_gr_set_ctx_val(object, 0x20000000, 0); |
672 | return 0; | 672 | return 0; |
673 | case 0x12: | 673 | case 0x12: |
674 | nv04_graph_set_ctx_val(object, 0x20000000, 0x20000000); | 674 | nv04_gr_set_ctx_val(object, 0x20000000, 0x20000000); |
675 | return 0; | 675 | return 0; |
676 | } | 676 | } |
677 | return 1; | 677 | return 1; |
678 | } | 678 | } |
679 | 679 | ||
680 | static int | 680 | static int |
681 | nv04_graph_mthd_bind_beta4(struct nouveau_object *object, u32 mthd, | 681 | nv04_gr_mthd_bind_beta4(struct nouveau_object *object, u32 mthd, |
682 | void *args, u32 size) | 682 | void *args, u32 size) |
683 | { | 683 | { |
684 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 684 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
685 | case 0x30: | 685 | case 0x30: |
686 | nv04_graph_set_ctx_val(object, 0x40000000, 0); | 686 | nv04_gr_set_ctx_val(object, 0x40000000, 0); |
687 | return 0; | 687 | return 0; |
688 | case 0x72: | 688 | case 0x72: |
689 | nv04_graph_set_ctx_val(object, 0x40000000, 0x40000000); | 689 | nv04_gr_set_ctx_val(object, 0x40000000, 0x40000000); |
690 | return 0; | 690 | return 0; |
691 | } | 691 | } |
692 | return 1; | 692 | return 1; |
693 | } | 693 | } |
694 | 694 | ||
695 | static int | 695 | static int |
696 | nv04_graph_mthd_bind_surf_dst(struct nouveau_object *object, u32 mthd, | 696 | nv04_gr_mthd_bind_surf_dst(struct nouveau_object *object, u32 mthd, |
697 | void *args, u32 size) | 697 | void *args, u32 size) |
698 | { | 698 | { |
699 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 699 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
700 | case 0x30: | 700 | case 0x30: |
701 | nv04_graph_set_ctx_val(object, 0x02000000, 0); | 701 | nv04_gr_set_ctx_val(object, 0x02000000, 0); |
702 | return 0; | 702 | return 0; |
703 | case 0x58: | 703 | case 0x58: |
704 | nv04_graph_set_ctx_val(object, 0x02000000, 0x02000000); | 704 | nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); |
705 | return 0; | 705 | return 0; |
706 | } | 706 | } |
707 | return 1; | 707 | return 1; |
708 | } | 708 | } |
709 | 709 | ||
710 | static int | 710 | static int |
711 | nv04_graph_mthd_bind_surf_src(struct nouveau_object *object, u32 mthd, | 711 | nv04_gr_mthd_bind_surf_src(struct nouveau_object *object, u32 mthd, |
712 | void *args, u32 size) | 712 | void *args, u32 size) |
713 | { | 713 | { |
714 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 714 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
715 | case 0x30: | 715 | case 0x30: |
716 | nv04_graph_set_ctx_val(object, 0x04000000, 0); | 716 | nv04_gr_set_ctx_val(object, 0x04000000, 0); |
717 | return 0; | 717 | return 0; |
718 | case 0x59: | 718 | case 0x59: |
719 | nv04_graph_set_ctx_val(object, 0x04000000, 0x04000000); | 719 | nv04_gr_set_ctx_val(object, 0x04000000, 0x04000000); |
720 | return 0; | 720 | return 0; |
721 | } | 721 | } |
722 | return 1; | 722 | return 1; |
723 | } | 723 | } |
724 | 724 | ||
725 | static int | 725 | static int |
726 | nv04_graph_mthd_bind_surf_color(struct nouveau_object *object, u32 mthd, | 726 | nv04_gr_mthd_bind_surf_color(struct nouveau_object *object, u32 mthd, |
727 | void *args, u32 size) | 727 | void *args, u32 size) |
728 | { | 728 | { |
729 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 729 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
730 | case 0x30: | 730 | case 0x30: |
731 | nv04_graph_set_ctx_val(object, 0x02000000, 0); | 731 | nv04_gr_set_ctx_val(object, 0x02000000, 0); |
732 | return 0; | 732 | return 0; |
733 | case 0x5a: | 733 | case 0x5a: |
734 | nv04_graph_set_ctx_val(object, 0x02000000, 0x02000000); | 734 | nv04_gr_set_ctx_val(object, 0x02000000, 0x02000000); |
735 | return 0; | 735 | return 0; |
736 | } | 736 | } |
737 | return 1; | 737 | return 1; |
738 | } | 738 | } |
739 | 739 | ||
740 | static int | 740 | static int |
741 | nv04_graph_mthd_bind_surf_zeta(struct nouveau_object *object, u32 mthd, | 741 | nv04_gr_mthd_bind_surf_zeta(struct nouveau_object *object, u32 mthd, |
742 | void *args, u32 size) | 742 | void *args, u32 size) |
743 | { | 743 | { |
744 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 744 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
745 | case 0x30: | 745 | case 0x30: |
746 | nv04_graph_set_ctx_val(object, 0x04000000, 0); | 746 | nv04_gr_set_ctx_val(object, 0x04000000, 0); |
747 | return 0; | 747 | return 0; |
748 | case 0x5b: | 748 | case 0x5b: |
749 | nv04_graph_set_ctx_val(object, 0x04000000, 0x04000000); | 749 | nv04_gr_set_ctx_val(object, 0x04000000, 0x04000000); |
750 | return 0; | 750 | return 0; |
751 | } | 751 | } |
752 | return 1; | 752 | return 1; |
753 | } | 753 | } |
754 | 754 | ||
755 | static int | 755 | static int |
756 | nv01_graph_mthd_bind_clip(struct nouveau_object *object, u32 mthd, | 756 | nv01_gr_mthd_bind_clip(struct nouveau_object *object, u32 mthd, |
757 | void *args, u32 size) | 757 | void *args, u32 size) |
758 | { | 758 | { |
759 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 759 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
760 | case 0x30: | 760 | case 0x30: |
761 | nv04_graph_set_ctx1(object, 0x2000, 0); | 761 | nv04_gr_set_ctx1(object, 0x2000, 0); |
762 | return 0; | 762 | return 0; |
763 | case 0x19: | 763 | case 0x19: |
764 | nv04_graph_set_ctx1(object, 0x2000, 0x2000); | 764 | nv04_gr_set_ctx1(object, 0x2000, 0x2000); |
765 | return 0; | 765 | return 0; |
766 | } | 766 | } |
767 | return 1; | 767 | return 1; |
768 | } | 768 | } |
769 | 769 | ||
770 | static int | 770 | static int |
771 | nv01_graph_mthd_bind_chroma(struct nouveau_object *object, u32 mthd, | 771 | nv01_gr_mthd_bind_chroma(struct nouveau_object *object, u32 mthd, |
772 | void *args, u32 size) | 772 | void *args, u32 size) |
773 | { | 773 | { |
774 | switch (nv04_graph_mthd_bind_class(object, args, size)) { | 774 | switch (nv04_gr_mthd_bind_class(object, args, size)) { |
775 | case 0x30: | 775 | case 0x30: |
776 | nv04_graph_set_ctx1(object, 0x1000, 0); | 776 | nv04_gr_set_ctx1(object, 0x1000, 0); |
777 | return 0; | 777 | return 0; |
778 | /* Yes, for some reason even the old versions of objects | 778 | /* Yes, for some reason even the old versions of objects |
779 | * accept 0x57 and not 0x17. Consistency be damned. | 779 | * accept 0x57 and not 0x17. Consistency be damned. |
780 | */ | 780 | */ |
781 | case 0x57: | 781 | case 0x57: |
782 | nv04_graph_set_ctx1(object, 0x1000, 0x1000); | 782 | nv04_gr_set_ctx1(object, 0x1000, 0x1000); |
783 | return 0; | 783 | return 0; |
784 | } | 784 | } |
785 | return 1; | 785 | return 1; |
786 | } | 786 | } |
787 | 787 | ||
788 | static struct nouveau_omthds | 788 | static struct nouveau_omthds |
789 | nv03_graph_gdi_omthds[] = { | 789 | nv03_gr_gdi_omthds[] = { |
790 | { 0x0184, 0x0184, nv01_graph_mthd_bind_patt }, | 790 | { 0x0184, 0x0184, nv01_gr_mthd_bind_patt }, |
791 | { 0x0188, 0x0188, nv04_graph_mthd_bind_rop }, | 791 | { 0x0188, 0x0188, nv04_gr_mthd_bind_rop }, |
792 | { 0x018c, 0x018c, nv04_graph_mthd_bind_beta1 }, | 792 | { 0x018c, 0x018c, nv04_gr_mthd_bind_beta1 }, |
793 | { 0x0190, 0x0190, nv04_graph_mthd_bind_surf_dst }, | 793 | { 0x0190, 0x0190, nv04_gr_mthd_bind_surf_dst }, |
794 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 794 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
795 | {} | 795 | {} |
796 | }; | 796 | }; |
797 | 797 | ||
798 | static struct nouveau_omthds | 798 | static struct nouveau_omthds |
799 | nv04_graph_gdi_omthds[] = { | 799 | nv04_gr_gdi_omthds[] = { |
800 | { 0x0188, 0x0188, nv04_graph_mthd_bind_patt }, | 800 | { 0x0188, 0x0188, nv04_gr_mthd_bind_patt }, |
801 | { 0x018c, 0x018c, nv04_graph_mthd_bind_rop }, | 801 | { 0x018c, 0x018c, nv04_gr_mthd_bind_rop }, |
802 | { 0x0190, 0x0190, nv04_graph_mthd_bind_beta1 }, | 802 | { 0x0190, 0x0190, nv04_gr_mthd_bind_beta1 }, |
803 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta4 }, | 803 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta4 }, |
804 | { 0x0198, 0x0198, nv04_graph_mthd_bind_surf2d }, | 804 | { 0x0198, 0x0198, nv04_gr_mthd_bind_surf2d }, |
805 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 805 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
806 | {} | 806 | {} |
807 | }; | 807 | }; |
808 | 808 | ||
809 | static struct nouveau_omthds | 809 | static struct nouveau_omthds |
810 | nv01_graph_blit_omthds[] = { | 810 | nv01_gr_blit_omthds[] = { |
811 | { 0x0184, 0x0184, nv01_graph_mthd_bind_chroma }, | 811 | { 0x0184, 0x0184, nv01_gr_mthd_bind_chroma }, |
812 | { 0x0188, 0x0188, nv01_graph_mthd_bind_clip }, | 812 | { 0x0188, 0x0188, nv01_gr_mthd_bind_clip }, |
813 | { 0x018c, 0x018c, nv01_graph_mthd_bind_patt }, | 813 | { 0x018c, 0x018c, nv01_gr_mthd_bind_patt }, |
814 | { 0x0190, 0x0190, nv04_graph_mthd_bind_rop }, | 814 | { 0x0190, 0x0190, nv04_gr_mthd_bind_rop }, |
815 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta1 }, | 815 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta1 }, |
816 | { 0x0198, 0x0198, nv04_graph_mthd_bind_surf_dst }, | 816 | { 0x0198, 0x0198, nv04_gr_mthd_bind_surf_dst }, |
817 | { 0x019c, 0x019c, nv04_graph_mthd_bind_surf_src }, | 817 | { 0x019c, 0x019c, nv04_gr_mthd_bind_surf_src }, |
818 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 818 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
819 | {} | 819 | {} |
820 | }; | 820 | }; |
821 | 821 | ||
822 | static struct nouveau_omthds | 822 | static struct nouveau_omthds |
823 | nv04_graph_blit_omthds[] = { | 823 | nv04_gr_blit_omthds[] = { |
824 | { 0x0184, 0x0184, nv01_graph_mthd_bind_chroma }, | 824 | { 0x0184, 0x0184, nv01_gr_mthd_bind_chroma }, |
825 | { 0x0188, 0x0188, nv01_graph_mthd_bind_clip }, | 825 | { 0x0188, 0x0188, nv01_gr_mthd_bind_clip }, |
826 | { 0x018c, 0x018c, nv04_graph_mthd_bind_patt }, | 826 | { 0x018c, 0x018c, nv04_gr_mthd_bind_patt }, |
827 | { 0x0190, 0x0190, nv04_graph_mthd_bind_rop }, | 827 | { 0x0190, 0x0190, nv04_gr_mthd_bind_rop }, |
828 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta1 }, | 828 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta1 }, |
829 | { 0x0198, 0x0198, nv04_graph_mthd_bind_beta4 }, | 829 | { 0x0198, 0x0198, nv04_gr_mthd_bind_beta4 }, |
830 | { 0x019c, 0x019c, nv04_graph_mthd_bind_surf2d }, | 830 | { 0x019c, 0x019c, nv04_gr_mthd_bind_surf2d }, |
831 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 831 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
832 | {} | 832 | {} |
833 | }; | 833 | }; |
834 | 834 | ||
835 | static struct nouveau_omthds | 835 | static struct nouveau_omthds |
836 | nv04_graph_iifc_omthds[] = { | 836 | nv04_gr_iifc_omthds[] = { |
837 | { 0x0188, 0x0188, nv01_graph_mthd_bind_chroma }, | 837 | { 0x0188, 0x0188, nv01_gr_mthd_bind_chroma }, |
838 | { 0x018c, 0x018c, nv01_graph_mthd_bind_clip }, | 838 | { 0x018c, 0x018c, nv01_gr_mthd_bind_clip }, |
839 | { 0x0190, 0x0190, nv04_graph_mthd_bind_patt }, | 839 | { 0x0190, 0x0190, nv04_gr_mthd_bind_patt }, |
840 | { 0x0194, 0x0194, nv04_graph_mthd_bind_rop }, | 840 | { 0x0194, 0x0194, nv04_gr_mthd_bind_rop }, |
841 | { 0x0198, 0x0198, nv04_graph_mthd_bind_beta1 }, | 841 | { 0x0198, 0x0198, nv04_gr_mthd_bind_beta1 }, |
842 | { 0x019c, 0x019c, nv04_graph_mthd_bind_beta4 }, | 842 | { 0x019c, 0x019c, nv04_gr_mthd_bind_beta4 }, |
843 | { 0x01a0, 0x01a0, nv04_graph_mthd_bind_surf2d_swzsurf }, | 843 | { 0x01a0, 0x01a0, nv04_gr_mthd_bind_surf2d_swzsurf }, |
844 | { 0x03e4, 0x03e4, nv04_graph_mthd_set_operation }, | 844 | { 0x03e4, 0x03e4, nv04_gr_mthd_set_operation }, |
845 | {} | 845 | {} |
846 | }; | 846 | }; |
847 | 847 | ||
848 | static struct nouveau_omthds | 848 | static struct nouveau_omthds |
849 | nv01_graph_ifc_omthds[] = { | 849 | nv01_gr_ifc_omthds[] = { |
850 | { 0x0184, 0x0184, nv01_graph_mthd_bind_chroma }, | 850 | { 0x0184, 0x0184, nv01_gr_mthd_bind_chroma }, |
851 | { 0x0188, 0x0188, nv01_graph_mthd_bind_clip }, | 851 | { 0x0188, 0x0188, nv01_gr_mthd_bind_clip }, |
852 | { 0x018c, 0x018c, nv01_graph_mthd_bind_patt }, | 852 | { 0x018c, 0x018c, nv01_gr_mthd_bind_patt }, |
853 | { 0x0190, 0x0190, nv04_graph_mthd_bind_rop }, | 853 | { 0x0190, 0x0190, nv04_gr_mthd_bind_rop }, |
854 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta1 }, | 854 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta1 }, |
855 | { 0x0198, 0x0198, nv04_graph_mthd_bind_surf_dst }, | 855 | { 0x0198, 0x0198, nv04_gr_mthd_bind_surf_dst }, |
856 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 856 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
857 | {} | 857 | {} |
858 | }; | 858 | }; |
859 | 859 | ||
860 | static struct nouveau_omthds | 860 | static struct nouveau_omthds |
861 | nv04_graph_ifc_omthds[] = { | 861 | nv04_gr_ifc_omthds[] = { |
862 | { 0x0184, 0x0184, nv01_graph_mthd_bind_chroma }, | 862 | { 0x0184, 0x0184, nv01_gr_mthd_bind_chroma }, |
863 | { 0x0188, 0x0188, nv01_graph_mthd_bind_clip }, | 863 | { 0x0188, 0x0188, nv01_gr_mthd_bind_clip }, |
864 | { 0x018c, 0x018c, nv04_graph_mthd_bind_patt }, | 864 | { 0x018c, 0x018c, nv04_gr_mthd_bind_patt }, |
865 | { 0x0190, 0x0190, nv04_graph_mthd_bind_rop }, | 865 | { 0x0190, 0x0190, nv04_gr_mthd_bind_rop }, |
866 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta1 }, | 866 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta1 }, |
867 | { 0x0198, 0x0198, nv04_graph_mthd_bind_beta4 }, | 867 | { 0x0198, 0x0198, nv04_gr_mthd_bind_beta4 }, |
868 | { 0x019c, 0x019c, nv04_graph_mthd_bind_surf2d }, | 868 | { 0x019c, 0x019c, nv04_gr_mthd_bind_surf2d }, |
869 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 869 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
870 | {} | 870 | {} |
871 | }; | 871 | }; |
872 | 872 | ||
873 | static struct nouveau_omthds | 873 | static struct nouveau_omthds |
874 | nv03_graph_sifc_omthds[] = { | 874 | nv03_gr_sifc_omthds[] = { |
875 | { 0x0184, 0x0184, nv01_graph_mthd_bind_chroma }, | 875 | { 0x0184, 0x0184, nv01_gr_mthd_bind_chroma }, |
876 | { 0x0188, 0x0188, nv01_graph_mthd_bind_patt }, | 876 | { 0x0188, 0x0188, nv01_gr_mthd_bind_patt }, |
877 | { 0x018c, 0x018c, nv04_graph_mthd_bind_rop }, | 877 | { 0x018c, 0x018c, nv04_gr_mthd_bind_rop }, |
878 | { 0x0190, 0x0190, nv04_graph_mthd_bind_beta1 }, | 878 | { 0x0190, 0x0190, nv04_gr_mthd_bind_beta1 }, |
879 | { 0x0194, 0x0194, nv04_graph_mthd_bind_surf_dst }, | 879 | { 0x0194, 0x0194, nv04_gr_mthd_bind_surf_dst }, |
880 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 880 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
881 | {} | 881 | {} |
882 | }; | 882 | }; |
883 | 883 | ||
884 | static struct nouveau_omthds | 884 | static struct nouveau_omthds |
885 | nv04_graph_sifc_omthds[] = { | 885 | nv04_gr_sifc_omthds[] = { |
886 | { 0x0184, 0x0184, nv01_graph_mthd_bind_chroma }, | 886 | { 0x0184, 0x0184, nv01_gr_mthd_bind_chroma }, |
887 | { 0x0188, 0x0188, nv04_graph_mthd_bind_patt }, | 887 | { 0x0188, 0x0188, nv04_gr_mthd_bind_patt }, |
888 | { 0x018c, 0x018c, nv04_graph_mthd_bind_rop }, | 888 | { 0x018c, 0x018c, nv04_gr_mthd_bind_rop }, |
889 | { 0x0190, 0x0190, nv04_graph_mthd_bind_beta1 }, | 889 | { 0x0190, 0x0190, nv04_gr_mthd_bind_beta1 }, |
890 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta4 }, | 890 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta4 }, |
891 | { 0x0198, 0x0198, nv04_graph_mthd_bind_surf2d }, | 891 | { 0x0198, 0x0198, nv04_gr_mthd_bind_surf2d }, |
892 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 892 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
893 | {} | 893 | {} |
894 | }; | 894 | }; |
895 | 895 | ||
896 | static struct nouveau_omthds | 896 | static struct nouveau_omthds |
897 | nv03_graph_sifm_omthds[] = { | 897 | nv03_gr_sifm_omthds[] = { |
898 | { 0x0188, 0x0188, nv01_graph_mthd_bind_patt }, | 898 | { 0x0188, 0x0188, nv01_gr_mthd_bind_patt }, |
899 | { 0x018c, 0x018c, nv04_graph_mthd_bind_rop }, | 899 | { 0x018c, 0x018c, nv04_gr_mthd_bind_rop }, |
900 | { 0x0190, 0x0190, nv04_graph_mthd_bind_beta1 }, | 900 | { 0x0190, 0x0190, nv04_gr_mthd_bind_beta1 }, |
901 | { 0x0194, 0x0194, nv04_graph_mthd_bind_surf_dst }, | 901 | { 0x0194, 0x0194, nv04_gr_mthd_bind_surf_dst }, |
902 | { 0x0304, 0x0304, nv04_graph_mthd_set_operation }, | 902 | { 0x0304, 0x0304, nv04_gr_mthd_set_operation }, |
903 | {} | 903 | {} |
904 | }; | 904 | }; |
905 | 905 | ||
906 | static struct nouveau_omthds | 906 | static struct nouveau_omthds |
907 | nv04_graph_sifm_omthds[] = { | 907 | nv04_gr_sifm_omthds[] = { |
908 | { 0x0188, 0x0188, nv04_graph_mthd_bind_patt }, | 908 | { 0x0188, 0x0188, nv04_gr_mthd_bind_patt }, |
909 | { 0x018c, 0x018c, nv04_graph_mthd_bind_rop }, | 909 | { 0x018c, 0x018c, nv04_gr_mthd_bind_rop }, |
910 | { 0x0190, 0x0190, nv04_graph_mthd_bind_beta1 }, | 910 | { 0x0190, 0x0190, nv04_gr_mthd_bind_beta1 }, |
911 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta4 }, | 911 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta4 }, |
912 | { 0x0198, 0x0198, nv04_graph_mthd_bind_surf2d }, | 912 | { 0x0198, 0x0198, nv04_gr_mthd_bind_surf2d }, |
913 | { 0x0304, 0x0304, nv04_graph_mthd_set_operation }, | 913 | { 0x0304, 0x0304, nv04_gr_mthd_set_operation }, |
914 | {} | 914 | {} |
915 | }; | 915 | }; |
916 | 916 | ||
917 | static struct nouveau_omthds | 917 | static struct nouveau_omthds |
918 | nv04_graph_surf3d_omthds[] = { | 918 | nv04_gr_surf3d_omthds[] = { |
919 | { 0x02f8, 0x02f8, nv04_graph_mthd_surf3d_clip_h }, | 919 | { 0x02f8, 0x02f8, nv04_gr_mthd_surf3d_clip_h }, |
920 | { 0x02fc, 0x02fc, nv04_graph_mthd_surf3d_clip_v }, | 920 | { 0x02fc, 0x02fc, nv04_gr_mthd_surf3d_clip_v }, |
921 | {} | 921 | {} |
922 | }; | 922 | }; |
923 | 923 | ||
924 | static struct nouveau_omthds | 924 | static struct nouveau_omthds |
925 | nv03_graph_ttri_omthds[] = { | 925 | nv03_gr_ttri_omthds[] = { |
926 | { 0x0188, 0x0188, nv01_graph_mthd_bind_clip }, | 926 | { 0x0188, 0x0188, nv01_gr_mthd_bind_clip }, |
927 | { 0x018c, 0x018c, nv04_graph_mthd_bind_surf_color }, | 927 | { 0x018c, 0x018c, nv04_gr_mthd_bind_surf_color }, |
928 | { 0x0190, 0x0190, nv04_graph_mthd_bind_surf_zeta }, | 928 | { 0x0190, 0x0190, nv04_gr_mthd_bind_surf_zeta }, |
929 | {} | 929 | {} |
930 | }; | 930 | }; |
931 | 931 | ||
932 | static struct nouveau_omthds | 932 | static struct nouveau_omthds |
933 | nv01_graph_prim_omthds[] = { | 933 | nv01_gr_prim_omthds[] = { |
934 | { 0x0184, 0x0184, nv01_graph_mthd_bind_clip }, | 934 | { 0x0184, 0x0184, nv01_gr_mthd_bind_clip }, |
935 | { 0x0188, 0x0188, nv01_graph_mthd_bind_patt }, | 935 | { 0x0188, 0x0188, nv01_gr_mthd_bind_patt }, |
936 | { 0x018c, 0x018c, nv04_graph_mthd_bind_rop }, | 936 | { 0x018c, 0x018c, nv04_gr_mthd_bind_rop }, |
937 | { 0x0190, 0x0190, nv04_graph_mthd_bind_beta1 }, | 937 | { 0x0190, 0x0190, nv04_gr_mthd_bind_beta1 }, |
938 | { 0x0194, 0x0194, nv04_graph_mthd_bind_surf_dst }, | 938 | { 0x0194, 0x0194, nv04_gr_mthd_bind_surf_dst }, |
939 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 939 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
940 | {} | 940 | {} |
941 | }; | 941 | }; |
942 | 942 | ||
943 | static struct nouveau_omthds | 943 | static struct nouveau_omthds |
944 | nv04_graph_prim_omthds[] = { | 944 | nv04_gr_prim_omthds[] = { |
945 | { 0x0184, 0x0184, nv01_graph_mthd_bind_clip }, | 945 | { 0x0184, 0x0184, nv01_gr_mthd_bind_clip }, |
946 | { 0x0188, 0x0188, nv04_graph_mthd_bind_patt }, | 946 | { 0x0188, 0x0188, nv04_gr_mthd_bind_patt }, |
947 | { 0x018c, 0x018c, nv04_graph_mthd_bind_rop }, | 947 | { 0x018c, 0x018c, nv04_gr_mthd_bind_rop }, |
948 | { 0x0190, 0x0190, nv04_graph_mthd_bind_beta1 }, | 948 | { 0x0190, 0x0190, nv04_gr_mthd_bind_beta1 }, |
949 | { 0x0194, 0x0194, nv04_graph_mthd_bind_beta4 }, | 949 | { 0x0194, 0x0194, nv04_gr_mthd_bind_beta4 }, |
950 | { 0x0198, 0x0198, nv04_graph_mthd_bind_surf2d }, | 950 | { 0x0198, 0x0198, nv04_gr_mthd_bind_surf2d }, |
951 | { 0x02fc, 0x02fc, nv04_graph_mthd_set_operation }, | 951 | { 0x02fc, 0x02fc, nv04_gr_mthd_set_operation }, |
952 | {} | 952 | {} |
953 | }; | 953 | }; |
954 | 954 | ||
955 | static int | 955 | static int |
956 | nv04_graph_object_ctor(struct nouveau_object *parent, | 956 | nv04_gr_object_ctor(struct nouveau_object *parent, |
957 | struct nouveau_object *engine, | 957 | struct nouveau_object *engine, |
958 | struct nouveau_oclass *oclass, void *data, u32 size, | 958 | struct nouveau_oclass *oclass, void *data, u32 size, |
959 | struct nouveau_object **pobject) | 959 | struct nouveau_object **pobject) |
@@ -978,8 +978,8 @@ nv04_graph_object_ctor(struct nouveau_object *parent, | |||
978 | } | 978 | } |
979 | 979 | ||
980 | struct nouveau_ofuncs | 980 | struct nouveau_ofuncs |
981 | nv04_graph_ofuncs = { | 981 | nv04_gr_ofuncs = { |
982 | .ctor = nv04_graph_object_ctor, | 982 | .ctor = nv04_gr_object_ctor, |
983 | .dtor = _nouveau_gpuobj_dtor, | 983 | .dtor = _nouveau_gpuobj_dtor, |
984 | .init = _nouveau_gpuobj_init, | 984 | .init = _nouveau_gpuobj_init, |
985 | .fini = _nouveau_gpuobj_fini, | 985 | .fini = _nouveau_gpuobj_fini, |
@@ -988,48 +988,48 @@ nv04_graph_ofuncs = { | |||
988 | }; | 988 | }; |
989 | 989 | ||
990 | static struct nouveau_oclass | 990 | static struct nouveau_oclass |
991 | nv04_graph_sclass[] = { | 991 | nv04_gr_sclass[] = { |
992 | { 0x0012, &nv04_graph_ofuncs }, /* beta1 */ | 992 | { 0x0012, &nv04_gr_ofuncs }, /* beta1 */ |
993 | { 0x0017, &nv04_graph_ofuncs }, /* chroma */ | 993 | { 0x0017, &nv04_gr_ofuncs }, /* chroma */ |
994 | { 0x0018, &nv04_graph_ofuncs }, /* pattern (nv01) */ | 994 | { 0x0018, &nv04_gr_ofuncs }, /* pattern (nv01) */ |
995 | { 0x0019, &nv04_graph_ofuncs }, /* clip */ | 995 | { 0x0019, &nv04_gr_ofuncs }, /* clip */ |
996 | { 0x001c, &nv04_graph_ofuncs, nv01_graph_prim_omthds }, /* line */ | 996 | { 0x001c, &nv04_gr_ofuncs, nv01_gr_prim_omthds }, /* line */ |
997 | { 0x001d, &nv04_graph_ofuncs, nv01_graph_prim_omthds }, /* tri */ | 997 | { 0x001d, &nv04_gr_ofuncs, nv01_gr_prim_omthds }, /* tri */ |
998 | { 0x001e, &nv04_graph_ofuncs, nv01_graph_prim_omthds }, /* rect */ | 998 | { 0x001e, &nv04_gr_ofuncs, nv01_gr_prim_omthds }, /* rect */ |
999 | { 0x001f, &nv04_graph_ofuncs, nv01_graph_blit_omthds }, | 999 | { 0x001f, &nv04_gr_ofuncs, nv01_gr_blit_omthds }, |
1000 | { 0x0021, &nv04_graph_ofuncs, nv01_graph_ifc_omthds }, | 1000 | { 0x0021, &nv04_gr_ofuncs, nv01_gr_ifc_omthds }, |
1001 | { 0x0030, &nv04_graph_ofuncs }, /* null */ | 1001 | { 0x0030, &nv04_gr_ofuncs }, /* null */ |
1002 | { 0x0036, &nv04_graph_ofuncs, nv03_graph_sifc_omthds }, | 1002 | { 0x0036, &nv04_gr_ofuncs, nv03_gr_sifc_omthds }, |
1003 | { 0x0037, &nv04_graph_ofuncs, nv03_graph_sifm_omthds }, | 1003 | { 0x0037, &nv04_gr_ofuncs, nv03_gr_sifm_omthds }, |
1004 | { 0x0038, &nv04_graph_ofuncs }, /* dvd subpicture */ | 1004 | { 0x0038, &nv04_gr_ofuncs }, /* dvd subpicture */ |
1005 | { 0x0039, &nv04_graph_ofuncs }, /* m2mf */ | 1005 | { 0x0039, &nv04_gr_ofuncs }, /* m2mf */ |
1006 | { 0x0042, &nv04_graph_ofuncs }, /* surf2d */ | 1006 | { 0x0042, &nv04_gr_ofuncs }, /* surf2d */ |
1007 | { 0x0043, &nv04_graph_ofuncs }, /* rop */ | 1007 | { 0x0043, &nv04_gr_ofuncs }, /* rop */ |
1008 | { 0x0044, &nv04_graph_ofuncs }, /* pattern */ | 1008 | { 0x0044, &nv04_gr_ofuncs }, /* pattern */ |
1009 | { 0x0048, &nv04_graph_ofuncs, nv03_graph_ttri_omthds }, | 1009 | { 0x0048, &nv04_gr_ofuncs, nv03_gr_ttri_omthds }, |
1010 | { 0x004a, &nv04_graph_ofuncs, nv04_graph_gdi_omthds }, | 1010 | { 0x004a, &nv04_gr_ofuncs, nv04_gr_gdi_omthds }, |
1011 | { 0x004b, &nv04_graph_ofuncs, nv03_graph_gdi_omthds }, | 1011 | { 0x004b, &nv04_gr_ofuncs, nv03_gr_gdi_omthds }, |
1012 | { 0x0052, &nv04_graph_ofuncs }, /* swzsurf */ | 1012 | { 0x0052, &nv04_gr_ofuncs }, /* swzsurf */ |
1013 | { 0x0053, &nv04_graph_ofuncs, nv04_graph_surf3d_omthds }, | 1013 | { 0x0053, &nv04_gr_ofuncs, nv04_gr_surf3d_omthds }, |
1014 | { 0x0054, &nv04_graph_ofuncs }, /* ttri */ | 1014 | { 0x0054, &nv04_gr_ofuncs }, /* ttri */ |
1015 | { 0x0055, &nv04_graph_ofuncs }, /* mtri */ | 1015 | { 0x0055, &nv04_gr_ofuncs }, /* mtri */ |
1016 | { 0x0057, &nv04_graph_ofuncs }, /* chroma */ | 1016 | { 0x0057, &nv04_gr_ofuncs }, /* chroma */ |
1017 | { 0x0058, &nv04_graph_ofuncs }, /* surf_dst */ | 1017 | { 0x0058, &nv04_gr_ofuncs }, /* surf_dst */ |
1018 | { 0x0059, &nv04_graph_ofuncs }, /* surf_src */ | 1018 | { 0x0059, &nv04_gr_ofuncs }, /* surf_src */ |
1019 | { 0x005a, &nv04_graph_ofuncs }, /* surf_color */ | 1019 | { 0x005a, &nv04_gr_ofuncs }, /* surf_color */ |
1020 | { 0x005b, &nv04_graph_ofuncs }, /* surf_zeta */ | 1020 | { 0x005b, &nv04_gr_ofuncs }, /* surf_zeta */ |
1021 | { 0x005c, &nv04_graph_ofuncs, nv04_graph_prim_omthds }, /* line */ | 1021 | { 0x005c, &nv04_gr_ofuncs, nv04_gr_prim_omthds }, /* line */ |
1022 | { 0x005d, &nv04_graph_ofuncs, nv04_graph_prim_omthds }, /* tri */ | 1022 | { 0x005d, &nv04_gr_ofuncs, nv04_gr_prim_omthds }, /* tri */ |
1023 | { 0x005e, &nv04_graph_ofuncs, nv04_graph_prim_omthds }, /* rect */ | 1023 | { 0x005e, &nv04_gr_ofuncs, nv04_gr_prim_omthds }, /* rect */ |
1024 | { 0x005f, &nv04_graph_ofuncs, nv04_graph_blit_omthds }, | 1024 | { 0x005f, &nv04_gr_ofuncs, nv04_gr_blit_omthds }, |
1025 | { 0x0060, &nv04_graph_ofuncs, nv04_graph_iifc_omthds }, | 1025 | { 0x0060, &nv04_gr_ofuncs, nv04_gr_iifc_omthds }, |
1026 | { 0x0061, &nv04_graph_ofuncs, nv04_graph_ifc_omthds }, | 1026 | { 0x0061, &nv04_gr_ofuncs, nv04_gr_ifc_omthds }, |
1027 | { 0x0064, &nv04_graph_ofuncs }, /* iifc (nv05) */ | 1027 | { 0x0064, &nv04_gr_ofuncs }, /* iifc (nv05) */ |
1028 | { 0x0065, &nv04_graph_ofuncs }, /* ifc (nv05) */ | 1028 | { 0x0065, &nv04_gr_ofuncs }, /* ifc (nv05) */ |
1029 | { 0x0066, &nv04_graph_ofuncs }, /* sifc (nv05) */ | 1029 | { 0x0066, &nv04_gr_ofuncs }, /* sifc (nv05) */ |
1030 | { 0x0072, &nv04_graph_ofuncs }, /* beta4 */ | 1030 | { 0x0072, &nv04_gr_ofuncs }, /* beta4 */ |
1031 | { 0x0076, &nv04_graph_ofuncs, nv04_graph_sifc_omthds }, | 1031 | { 0x0076, &nv04_gr_ofuncs, nv04_gr_sifc_omthds }, |
1032 | { 0x0077, &nv04_graph_ofuncs, nv04_graph_sifm_omthds }, | 1032 | { 0x0077, &nv04_gr_ofuncs, nv04_gr_sifm_omthds }, |
1033 | {}, | 1033 | {}, |
1034 | }; | 1034 | }; |
1035 | 1035 | ||
@@ -1037,10 +1037,10 @@ nv04_graph_sclass[] = { | |||
1037 | * PGRAPH context | 1037 | * PGRAPH context |
1038 | ******************************************************************************/ | 1038 | ******************************************************************************/ |
1039 | 1039 | ||
1040 | static struct nv04_graph_chan * | 1040 | static struct nv04_gr_chan * |
1041 | nv04_graph_channel(struct nv04_graph_priv *priv) | 1041 | nv04_gr_channel(struct nv04_gr_priv *priv) |
1042 | { | 1042 | { |
1043 | struct nv04_graph_chan *chan = NULL; | 1043 | struct nv04_gr_chan *chan = NULL; |
1044 | if (nv_rd32(priv, NV04_PGRAPH_CTX_CONTROL) & 0x00010000) { | 1044 | if (nv_rd32(priv, NV04_PGRAPH_CTX_CONTROL) & 0x00010000) { |
1045 | int chid = nv_rd32(priv, NV04_PGRAPH_CTX_USER) >> 24; | 1045 | int chid = nv_rd32(priv, NV04_PGRAPH_CTX_USER) >> 24; |
1046 | if (chid < ARRAY_SIZE(priv->chan)) | 1046 | if (chid < ARRAY_SIZE(priv->chan)) |
@@ -1050,13 +1050,13 @@ nv04_graph_channel(struct nv04_graph_priv *priv) | |||
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | static int | 1052 | static int |
1053 | nv04_graph_load_context(struct nv04_graph_chan *chan, int chid) | 1053 | nv04_gr_load_context(struct nv04_gr_chan *chan, int chid) |
1054 | { | 1054 | { |
1055 | struct nv04_graph_priv *priv = nv04_graph_priv(chan); | 1055 | struct nv04_gr_priv *priv = nv04_gr_priv(chan); |
1056 | int i; | 1056 | int i; |
1057 | 1057 | ||
1058 | for (i = 0; i < ARRAY_SIZE(nv04_graph_ctx_regs); i++) | 1058 | for (i = 0; i < ARRAY_SIZE(nv04_gr_ctx_regs); i++) |
1059 | nv_wr32(priv, nv04_graph_ctx_regs[i], chan->nv04[i]); | 1059 | nv_wr32(priv, nv04_gr_ctx_regs[i], chan->nv04[i]); |
1060 | 1060 | ||
1061 | nv_wr32(priv, NV04_PGRAPH_CTX_CONTROL, 0x10010100); | 1061 | nv_wr32(priv, NV04_PGRAPH_CTX_CONTROL, 0x10010100); |
1062 | nv_mask(priv, NV04_PGRAPH_CTX_USER, 0xff000000, chid << 24); | 1062 | nv_mask(priv, NV04_PGRAPH_CTX_USER, 0xff000000, chid << 24); |
@@ -1065,13 +1065,13 @@ nv04_graph_load_context(struct nv04_graph_chan *chan, int chid) | |||
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | static int | 1067 | static int |
1068 | nv04_graph_unload_context(struct nv04_graph_chan *chan) | 1068 | nv04_gr_unload_context(struct nv04_gr_chan *chan) |
1069 | { | 1069 | { |
1070 | struct nv04_graph_priv *priv = nv04_graph_priv(chan); | 1070 | struct nv04_gr_priv *priv = nv04_gr_priv(chan); |
1071 | int i; | 1071 | int i; |
1072 | 1072 | ||
1073 | for (i = 0; i < ARRAY_SIZE(nv04_graph_ctx_regs); i++) | 1073 | for (i = 0; i < ARRAY_SIZE(nv04_gr_ctx_regs); i++) |
1074 | chan->nv04[i] = nv_rd32(priv, nv04_graph_ctx_regs[i]); | 1074 | chan->nv04[i] = nv_rd32(priv, nv04_gr_ctx_regs[i]); |
1075 | 1075 | ||
1076 | nv_wr32(priv, NV04_PGRAPH_CTX_CONTROL, 0x10000000); | 1076 | nv_wr32(priv, NV04_PGRAPH_CTX_CONTROL, 0x10000000); |
1077 | nv_mask(priv, NV04_PGRAPH_CTX_USER, 0xff000000, 0x0f000000); | 1077 | nv_mask(priv, NV04_PGRAPH_CTX_USER, 0xff000000, 0x0f000000); |
@@ -1079,36 +1079,36 @@ nv04_graph_unload_context(struct nv04_graph_chan *chan) | |||
1079 | } | 1079 | } |
1080 | 1080 | ||
1081 | static void | 1081 | static void |
1082 | nv04_graph_context_switch(struct nv04_graph_priv *priv) | 1082 | nv04_gr_context_switch(struct nv04_gr_priv *priv) |
1083 | { | 1083 | { |
1084 | struct nv04_graph_chan *prev = NULL; | 1084 | struct nv04_gr_chan *prev = NULL; |
1085 | struct nv04_graph_chan *next = NULL; | 1085 | struct nv04_gr_chan *next = NULL; |
1086 | unsigned long flags; | 1086 | unsigned long flags; |
1087 | int chid; | 1087 | int chid; |
1088 | 1088 | ||
1089 | spin_lock_irqsave(&priv->lock, flags); | 1089 | spin_lock_irqsave(&priv->lock, flags); |
1090 | nv04_graph_idle(priv); | 1090 | nv04_gr_idle(priv); |
1091 | 1091 | ||
1092 | /* If previous context is valid, we need to save it */ | 1092 | /* If previous context is valid, we need to save it */ |
1093 | prev = nv04_graph_channel(priv); | 1093 | prev = nv04_gr_channel(priv); |
1094 | if (prev) | 1094 | if (prev) |
1095 | nv04_graph_unload_context(prev); | 1095 | nv04_gr_unload_context(prev); |
1096 | 1096 | ||
1097 | /* load context for next channel */ | 1097 | /* load context for next channel */ |
1098 | chid = (nv_rd32(priv, NV04_PGRAPH_TRAPPED_ADDR) >> 24) & 0x0f; | 1098 | chid = (nv_rd32(priv, NV04_PGRAPH_TRAPPED_ADDR) >> 24) & 0x0f; |
1099 | next = priv->chan[chid]; | 1099 | next = priv->chan[chid]; |
1100 | if (next) | 1100 | if (next) |
1101 | nv04_graph_load_context(next, chid); | 1101 | nv04_gr_load_context(next, chid); |
1102 | 1102 | ||
1103 | spin_unlock_irqrestore(&priv->lock, flags); | 1103 | spin_unlock_irqrestore(&priv->lock, flags); |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | static u32 *ctx_reg(struct nv04_graph_chan *chan, u32 reg) | 1106 | static u32 *ctx_reg(struct nv04_gr_chan *chan, u32 reg) |
1107 | { | 1107 | { |
1108 | int i; | 1108 | int i; |
1109 | 1109 | ||
1110 | for (i = 0; i < ARRAY_SIZE(nv04_graph_ctx_regs); i++) { | 1110 | for (i = 0; i < ARRAY_SIZE(nv04_gr_ctx_regs); i++) { |
1111 | if (nv04_graph_ctx_regs[i] == reg) | 1111 | if (nv04_gr_ctx_regs[i] == reg) |
1112 | return &chan->nv04[i]; | 1112 | return &chan->nv04[i]; |
1113 | } | 1113 | } |
1114 | 1114 | ||
@@ -1116,14 +1116,14 @@ static u32 *ctx_reg(struct nv04_graph_chan *chan, u32 reg) | |||
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | static int | 1118 | static int |
1119 | nv04_graph_context_ctor(struct nouveau_object *parent, | 1119 | nv04_gr_context_ctor(struct nouveau_object *parent, |
1120 | struct nouveau_object *engine, | 1120 | struct nouveau_object *engine, |
1121 | struct nouveau_oclass *oclass, void *data, u32 size, | 1121 | struct nouveau_oclass *oclass, void *data, u32 size, |
1122 | struct nouveau_object **pobject) | 1122 | struct nouveau_object **pobject) |
1123 | { | 1123 | { |
1124 | struct nouveau_fifo_chan *fifo = (void *)parent; | 1124 | struct nouveau_fifo_chan *fifo = (void *)parent; |
1125 | struct nv04_graph_priv *priv = (void *)engine; | 1125 | struct nv04_gr_priv *priv = (void *)engine; |
1126 | struct nv04_graph_chan *chan; | 1126 | struct nv04_gr_chan *chan; |
1127 | unsigned long flags; | 1127 | unsigned long flags; |
1128 | int ret; | 1128 | int ret; |
1129 | 1129 | ||
@@ -1150,10 +1150,10 @@ nv04_graph_context_ctor(struct nouveau_object *parent, | |||
1150 | } | 1150 | } |
1151 | 1151 | ||
1152 | static void | 1152 | static void |
1153 | nv04_graph_context_dtor(struct nouveau_object *object) | 1153 | nv04_gr_context_dtor(struct nouveau_object *object) |
1154 | { | 1154 | { |
1155 | struct nv04_graph_priv *priv = (void *)object->engine; | 1155 | struct nv04_gr_priv *priv = (void *)object->engine; |
1156 | struct nv04_graph_chan *chan = (void *)object; | 1156 | struct nv04_gr_chan *chan = (void *)object; |
1157 | unsigned long flags; | 1157 | unsigned long flags; |
1158 | 1158 | ||
1159 | spin_lock_irqsave(&priv->lock, flags); | 1159 | spin_lock_irqsave(&priv->lock, flags); |
@@ -1164,16 +1164,16 @@ nv04_graph_context_dtor(struct nouveau_object *object) | |||
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | static int | 1166 | static int |
1167 | nv04_graph_context_fini(struct nouveau_object *object, bool suspend) | 1167 | nv04_gr_context_fini(struct nouveau_object *object, bool suspend) |
1168 | { | 1168 | { |
1169 | struct nv04_graph_priv *priv = (void *)object->engine; | 1169 | struct nv04_gr_priv *priv = (void *)object->engine; |
1170 | struct nv04_graph_chan *chan = (void *)object; | 1170 | struct nv04_gr_chan *chan = (void *)object; |
1171 | unsigned long flags; | 1171 | unsigned long flags; |
1172 | 1172 | ||
1173 | spin_lock_irqsave(&priv->lock, flags); | 1173 | spin_lock_irqsave(&priv->lock, flags); |
1174 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000000); | 1174 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000000); |
1175 | if (nv04_graph_channel(priv) == chan) | 1175 | if (nv04_gr_channel(priv) == chan) |
1176 | nv04_graph_unload_context(chan); | 1176 | nv04_gr_unload_context(chan); |
1177 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000001); | 1177 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000001); |
1178 | spin_unlock_irqrestore(&priv->lock, flags); | 1178 | spin_unlock_irqrestore(&priv->lock, flags); |
1179 | 1179 | ||
@@ -1181,13 +1181,13 @@ nv04_graph_context_fini(struct nouveau_object *object, bool suspend) | |||
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | static struct nouveau_oclass | 1183 | static struct nouveau_oclass |
1184 | nv04_graph_cclass = { | 1184 | nv04_gr_cclass = { |
1185 | .handle = NV_ENGCTX(GR, 0x04), | 1185 | .handle = NV_ENGCTX(GR, 0x04), |
1186 | .ofuncs = &(struct nouveau_ofuncs) { | 1186 | .ofuncs = &(struct nouveau_ofuncs) { |
1187 | .ctor = nv04_graph_context_ctor, | 1187 | .ctor = nv04_gr_context_ctor, |
1188 | .dtor = nv04_graph_context_dtor, | 1188 | .dtor = nv04_gr_context_dtor, |
1189 | .init = nouveau_object_init, | 1189 | .init = nouveau_object_init, |
1190 | .fini = nv04_graph_context_fini, | 1190 | .fini = nv04_gr_context_fini, |
1191 | }, | 1191 | }, |
1192 | }; | 1192 | }; |
1193 | 1193 | ||
@@ -1196,17 +1196,17 @@ nv04_graph_cclass = { | |||
1196 | ******************************************************************************/ | 1196 | ******************************************************************************/ |
1197 | 1197 | ||
1198 | bool | 1198 | bool |
1199 | nv04_graph_idle(void *obj) | 1199 | nv04_gr_idle(void *obj) |
1200 | { | 1200 | { |
1201 | struct nouveau_graph *graph = nouveau_graph(obj); | 1201 | struct nouveau_gr *gr = nouveau_gr(obj); |
1202 | u32 mask = 0xffffffff; | 1202 | u32 mask = 0xffffffff; |
1203 | 1203 | ||
1204 | if (nv_device(obj)->card_type == NV_40) | 1204 | if (nv_device(obj)->card_type == NV_40) |
1205 | mask &= ~NV40_PGRAPH_STATUS_SYNC_STALL; | 1205 | mask &= ~NV40_PGRAPH_STATUS_SYNC_STALL; |
1206 | 1206 | ||
1207 | if (!nv_wait(graph, NV04_PGRAPH_STATUS, mask, 0)) { | 1207 | if (!nv_wait(gr, NV04_PGRAPH_STATUS, mask, 0)) { |
1208 | nv_error(graph, "idle timed out with status 0x%08x\n", | 1208 | nv_error(gr, "idle timed out with status 0x%08x\n", |
1209 | nv_rd32(graph, NV04_PGRAPH_STATUS)); | 1209 | nv_rd32(gr, NV04_PGRAPH_STATUS)); |
1210 | return false; | 1210 | return false; |
1211 | } | 1211 | } |
1212 | 1212 | ||
@@ -1214,13 +1214,13 @@ nv04_graph_idle(void *obj) | |||
1214 | } | 1214 | } |
1215 | 1215 | ||
1216 | static const struct nouveau_bitfield | 1216 | static const struct nouveau_bitfield |
1217 | nv04_graph_intr_name[] = { | 1217 | nv04_gr_intr_name[] = { |
1218 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, | 1218 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, |
1219 | {} | 1219 | {} |
1220 | }; | 1220 | }; |
1221 | 1221 | ||
1222 | static const struct nouveau_bitfield | 1222 | static const struct nouveau_bitfield |
1223 | nv04_graph_nstatus[] = { | 1223 | nv04_gr_nstatus[] = { |
1224 | { NV04_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, | 1224 | { NV04_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, |
1225 | { NV04_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, | 1225 | { NV04_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, |
1226 | { NV04_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, | 1226 | { NV04_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, |
@@ -1229,7 +1229,7 @@ nv04_graph_nstatus[] = { | |||
1229 | }; | 1229 | }; |
1230 | 1230 | ||
1231 | const struct nouveau_bitfield | 1231 | const struct nouveau_bitfield |
1232 | nv04_graph_nsource[] = { | 1232 | nv04_gr_nsource[] = { |
1233 | { NV03_PGRAPH_NSOURCE_NOTIFICATION, "NOTIFICATION" }, | 1233 | { NV03_PGRAPH_NSOURCE_NOTIFICATION, "NOTIFICATION" }, |
1234 | { NV03_PGRAPH_NSOURCE_DATA_ERROR, "DATA_ERROR" }, | 1234 | { NV03_PGRAPH_NSOURCE_DATA_ERROR, "DATA_ERROR" }, |
1235 | { NV03_PGRAPH_NSOURCE_PROTECTION_ERROR, "PROTECTION_ERROR" }, | 1235 | { NV03_PGRAPH_NSOURCE_PROTECTION_ERROR, "PROTECTION_ERROR" }, |
@@ -1253,10 +1253,10 @@ nv04_graph_nsource[] = { | |||
1253 | }; | 1253 | }; |
1254 | 1254 | ||
1255 | static void | 1255 | static void |
1256 | nv04_graph_intr(struct nouveau_subdev *subdev) | 1256 | nv04_gr_intr(struct nouveau_subdev *subdev) |
1257 | { | 1257 | { |
1258 | struct nv04_graph_priv *priv = (void *)subdev; | 1258 | struct nv04_gr_priv *priv = (void *)subdev; |
1259 | struct nv04_graph_chan *chan = NULL; | 1259 | struct nv04_gr_chan *chan = NULL; |
1260 | struct nouveau_namedb *namedb = NULL; | 1260 | struct nouveau_namedb *namedb = NULL; |
1261 | struct nouveau_handle *handle = NULL; | 1261 | struct nouveau_handle *handle = NULL; |
1262 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); | 1262 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); |
@@ -1290,7 +1290,7 @@ nv04_graph_intr(struct nouveau_subdev *subdev) | |||
1290 | nv_wr32(priv, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_CONTEXT_SWITCH); | 1290 | nv_wr32(priv, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_CONTEXT_SWITCH); |
1291 | stat &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; | 1291 | stat &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; |
1292 | show &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; | 1292 | show &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; |
1293 | nv04_graph_context_switch(priv); | 1293 | nv04_gr_context_switch(priv); |
1294 | } | 1294 | } |
1295 | 1295 | ||
1296 | nv_wr32(priv, NV03_PGRAPH_INTR, stat); | 1296 | nv_wr32(priv, NV03_PGRAPH_INTR, stat); |
@@ -1298,11 +1298,11 @@ nv04_graph_intr(struct nouveau_subdev *subdev) | |||
1298 | 1298 | ||
1299 | if (show) { | 1299 | if (show) { |
1300 | nv_error(priv, "%s", ""); | 1300 | nv_error(priv, "%s", ""); |
1301 | nouveau_bitfield_print(nv04_graph_intr_name, show); | 1301 | nouveau_bitfield_print(nv04_gr_intr_name, show); |
1302 | pr_cont(" nsource:"); | 1302 | pr_cont(" nsource:"); |
1303 | nouveau_bitfield_print(nv04_graph_nsource, nsource); | 1303 | nouveau_bitfield_print(nv04_gr_nsource, nsource); |
1304 | pr_cont(" nstatus:"); | 1304 | pr_cont(" nstatus:"); |
1305 | nouveau_bitfield_print(nv04_graph_nstatus, nstatus); | 1305 | nouveau_bitfield_print(nv04_gr_nstatus, nstatus); |
1306 | pr_cont("\n"); | 1306 | pr_cont("\n"); |
1307 | nv_error(priv, | 1307 | nv_error(priv, |
1308 | "ch %d [%s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", | 1308 | "ch %d [%s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", |
@@ -1314,34 +1314,34 @@ nv04_graph_intr(struct nouveau_subdev *subdev) | |||
1314 | } | 1314 | } |
1315 | 1315 | ||
1316 | static int | 1316 | static int |
1317 | nv04_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 1317 | nv04_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
1318 | struct nouveau_oclass *oclass, void *data, u32 size, | 1318 | struct nouveau_oclass *oclass, void *data, u32 size, |
1319 | struct nouveau_object **pobject) | 1319 | struct nouveau_object **pobject) |
1320 | { | 1320 | { |
1321 | struct nv04_graph_priv *priv; | 1321 | struct nv04_gr_priv *priv; |
1322 | int ret; | 1322 | int ret; |
1323 | 1323 | ||
1324 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 1324 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
1325 | *pobject = nv_object(priv); | 1325 | *pobject = nv_object(priv); |
1326 | if (ret) | 1326 | if (ret) |
1327 | return ret; | 1327 | return ret; |
1328 | 1328 | ||
1329 | nv_subdev(priv)->unit = 0x00001000; | 1329 | nv_subdev(priv)->unit = 0x00001000; |
1330 | nv_subdev(priv)->intr = nv04_graph_intr; | 1330 | nv_subdev(priv)->intr = nv04_gr_intr; |
1331 | nv_engine(priv)->cclass = &nv04_graph_cclass; | 1331 | nv_engine(priv)->cclass = &nv04_gr_cclass; |
1332 | nv_engine(priv)->sclass = nv04_graph_sclass; | 1332 | nv_engine(priv)->sclass = nv04_gr_sclass; |
1333 | spin_lock_init(&priv->lock); | 1333 | spin_lock_init(&priv->lock); |
1334 | return 0; | 1334 | return 0; |
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | static int | 1337 | static int |
1338 | nv04_graph_init(struct nouveau_object *object) | 1338 | nv04_gr_init(struct nouveau_object *object) |
1339 | { | 1339 | { |
1340 | struct nouveau_engine *engine = nv_engine(object); | 1340 | struct nouveau_engine *engine = nv_engine(object); |
1341 | struct nv04_graph_priv *priv = (void *)engine; | 1341 | struct nv04_gr_priv *priv = (void *)engine; |
1342 | int ret; | 1342 | int ret; |
1343 | 1343 | ||
1344 | ret = nouveau_graph_init(&priv->base); | 1344 | ret = nouveau_gr_init(&priv->base); |
1345 | if (ret) | 1345 | if (ret) |
1346 | return ret; | 1346 | return ret; |
1347 | 1347 | ||
@@ -1377,12 +1377,12 @@ nv04_graph_init(struct nouveau_object *object) | |||
1377 | } | 1377 | } |
1378 | 1378 | ||
1379 | struct nouveau_oclass | 1379 | struct nouveau_oclass |
1380 | nv04_graph_oclass = { | 1380 | nv04_gr_oclass = { |
1381 | .handle = NV_ENGINE(GR, 0x04), | 1381 | .handle = NV_ENGINE(GR, 0x04), |
1382 | .ofuncs = &(struct nouveau_ofuncs) { | 1382 | .ofuncs = &(struct nouveau_ofuncs) { |
1383 | .ctor = nv04_graph_ctor, | 1383 | .ctor = nv04_gr_ctor, |
1384 | .dtor = _nouveau_graph_dtor, | 1384 | .dtor = _nouveau_gr_dtor, |
1385 | .init = nv04_graph_init, | 1385 | .init = nv04_gr_init, |
1386 | .fini = _nouveau_graph_fini, | 1386 | .fini = _nouveau_gr_fini, |
1387 | }, | 1387 | }, |
1388 | }; | 1388 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv10.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c index 2b12b09683c8..9cc5c25f571b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv10.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * Software is furnished to do so, subject to the following conditions: | 10 | * Software is furnished to do so, subject to the following conditions: |
11 | * | 11 | * |
12 | * The above copyright notice and this permission notice (including the next | 12 | * The above copyright notice and this permission notice (including the next |
13 | * paragraph) shall be included in all copies or substantial portions of the | 13 | * paragr) shall be included in all copies or substantial portions of the |
14 | * Software. | 14 | * Software. |
15 | * | 15 | * |
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
@@ -29,7 +29,7 @@ | |||
29 | #include <subdev/fb.h> | 29 | #include <subdev/fb.h> |
30 | 30 | ||
31 | #include <engine/fifo.h> | 31 | #include <engine/fifo.h> |
32 | #include <engine/graph.h> | 32 | #include <engine/gr.h> |
33 | 33 | ||
34 | #include "regs.h" | 34 | #include "regs.h" |
35 | 35 | ||
@@ -46,7 +46,7 @@ struct pipe_state { | |||
46 | u32 pipe_0x7800[0x0c0/4]; | 46 | u32 pipe_0x7800[0x0c0/4]; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static int nv10_graph_ctx_regs[] = { | 49 | static int nv10_gr_ctx_regs[] = { |
50 | NV10_PGRAPH_CTX_SWITCH(0), | 50 | NV10_PGRAPH_CTX_SWITCH(0), |
51 | NV10_PGRAPH_CTX_SWITCH(1), | 51 | NV10_PGRAPH_CTX_SWITCH(1), |
52 | NV10_PGRAPH_CTX_SWITCH(2), | 52 | NV10_PGRAPH_CTX_SWITCH(2), |
@@ -368,7 +368,7 @@ static int nv10_graph_ctx_regs[] = { | |||
368 | NV04_PGRAPH_VALID2, | 368 | NV04_PGRAPH_VALID2, |
369 | }; | 369 | }; |
370 | 370 | ||
371 | static int nv17_graph_ctx_regs[] = { | 371 | static int nv17_gr_ctx_regs[] = { |
372 | NV10_PGRAPH_DEBUG_4, | 372 | NV10_PGRAPH_DEBUG_4, |
373 | 0x004006b0, | 373 | 0x004006b0, |
374 | 0x00400eac, | 374 | 0x00400eac, |
@@ -389,24 +389,24 @@ static int nv17_graph_ctx_regs[] = { | |||
389 | 0x00400a04, | 389 | 0x00400a04, |
390 | }; | 390 | }; |
391 | 391 | ||
392 | struct nv10_graph_priv { | 392 | struct nv10_gr_priv { |
393 | struct nouveau_graph base; | 393 | struct nouveau_gr base; |
394 | struct nv10_graph_chan *chan[32]; | 394 | struct nv10_gr_chan *chan[32]; |
395 | spinlock_t lock; | 395 | spinlock_t lock; |
396 | }; | 396 | }; |
397 | 397 | ||
398 | struct nv10_graph_chan { | 398 | struct nv10_gr_chan { |
399 | struct nouveau_object base; | 399 | struct nouveau_object base; |
400 | int chid; | 400 | int chid; |
401 | int nv10[ARRAY_SIZE(nv10_graph_ctx_regs)]; | 401 | int nv10[ARRAY_SIZE(nv10_gr_ctx_regs)]; |
402 | int nv17[ARRAY_SIZE(nv17_graph_ctx_regs)]; | 402 | int nv17[ARRAY_SIZE(nv17_gr_ctx_regs)]; |
403 | struct pipe_state pipe_state; | 403 | struct pipe_state pipe_state; |
404 | u32 lma_window[4]; | 404 | u32 lma_window[4]; |
405 | }; | 405 | }; |
406 | 406 | ||
407 | 407 | ||
408 | static inline struct nv10_graph_priv * | 408 | static inline struct nv10_gr_priv * |
409 | nv10_graph_priv(struct nv10_graph_chan *chan) | 409 | nv10_gr_priv(struct nv10_gr_chan *chan) |
410 | { | 410 | { |
411 | return (void *)nv_object(chan)->engine; | 411 | return (void *)nv_object(chan)->engine; |
412 | } | 412 | } |
@@ -432,57 +432,57 @@ nv10_graph_priv(struct nv10_graph_chan *chan) | |||
432 | } while (0) | 432 | } while (0) |
433 | 433 | ||
434 | static struct nouveau_oclass | 434 | static struct nouveau_oclass |
435 | nv10_graph_sclass[] = { | 435 | nv10_gr_sclass[] = { |
436 | { 0x0012, &nv04_graph_ofuncs }, /* beta1 */ | 436 | { 0x0012, &nv04_gr_ofuncs }, /* beta1 */ |
437 | { 0x0019, &nv04_graph_ofuncs }, /* clip */ | 437 | { 0x0019, &nv04_gr_ofuncs }, /* clip */ |
438 | { 0x0030, &nv04_graph_ofuncs }, /* null */ | 438 | { 0x0030, &nv04_gr_ofuncs }, /* null */ |
439 | { 0x0039, &nv04_graph_ofuncs }, /* m2mf */ | 439 | { 0x0039, &nv04_gr_ofuncs }, /* m2mf */ |
440 | { 0x0043, &nv04_graph_ofuncs }, /* rop */ | 440 | { 0x0043, &nv04_gr_ofuncs }, /* rop */ |
441 | { 0x0044, &nv04_graph_ofuncs }, /* pattern */ | 441 | { 0x0044, &nv04_gr_ofuncs }, /* pattern */ |
442 | { 0x004a, &nv04_graph_ofuncs }, /* gdi */ | 442 | { 0x004a, &nv04_gr_ofuncs }, /* gdi */ |
443 | { 0x0052, &nv04_graph_ofuncs }, /* swzsurf */ | 443 | { 0x0052, &nv04_gr_ofuncs }, /* swzsurf */ |
444 | { 0x005f, &nv04_graph_ofuncs }, /* blit */ | 444 | { 0x005f, &nv04_gr_ofuncs }, /* blit */ |
445 | { 0x0062, &nv04_graph_ofuncs }, /* surf2d */ | 445 | { 0x0062, &nv04_gr_ofuncs }, /* surf2d */ |
446 | { 0x0072, &nv04_graph_ofuncs }, /* beta4 */ | 446 | { 0x0072, &nv04_gr_ofuncs }, /* beta4 */ |
447 | { 0x0089, &nv04_graph_ofuncs }, /* sifm */ | 447 | { 0x0089, &nv04_gr_ofuncs }, /* sifm */ |
448 | { 0x008a, &nv04_graph_ofuncs }, /* ifc */ | 448 | { 0x008a, &nv04_gr_ofuncs }, /* ifc */ |
449 | { 0x009f, &nv04_graph_ofuncs }, /* blit */ | 449 | { 0x009f, &nv04_gr_ofuncs }, /* blit */ |
450 | { 0x0093, &nv04_graph_ofuncs }, /* surf3d */ | 450 | { 0x0093, &nv04_gr_ofuncs }, /* surf3d */ |
451 | { 0x0094, &nv04_graph_ofuncs }, /* ttri */ | 451 | { 0x0094, &nv04_gr_ofuncs }, /* ttri */ |
452 | { 0x0095, &nv04_graph_ofuncs }, /* mtri */ | 452 | { 0x0095, &nv04_gr_ofuncs }, /* mtri */ |
453 | { 0x0056, &nv04_graph_ofuncs }, /* celcius */ | 453 | { 0x0056, &nv04_gr_ofuncs }, /* celcius */ |
454 | {}, | 454 | {}, |
455 | }; | 455 | }; |
456 | 456 | ||
457 | static struct nouveau_oclass | 457 | static struct nouveau_oclass |
458 | nv15_graph_sclass[] = { | 458 | nv15_gr_sclass[] = { |
459 | { 0x0012, &nv04_graph_ofuncs }, /* beta1 */ | 459 | { 0x0012, &nv04_gr_ofuncs }, /* beta1 */ |
460 | { 0x0019, &nv04_graph_ofuncs }, /* clip */ | 460 | { 0x0019, &nv04_gr_ofuncs }, /* clip */ |
461 | { 0x0030, &nv04_graph_ofuncs }, /* null */ | 461 | { 0x0030, &nv04_gr_ofuncs }, /* null */ |
462 | { 0x0039, &nv04_graph_ofuncs }, /* m2mf */ | 462 | { 0x0039, &nv04_gr_ofuncs }, /* m2mf */ |
463 | { 0x0043, &nv04_graph_ofuncs }, /* rop */ | 463 | { 0x0043, &nv04_gr_ofuncs }, /* rop */ |
464 | { 0x0044, &nv04_graph_ofuncs }, /* pattern */ | 464 | { 0x0044, &nv04_gr_ofuncs }, /* pattern */ |
465 | { 0x004a, &nv04_graph_ofuncs }, /* gdi */ | 465 | { 0x004a, &nv04_gr_ofuncs }, /* gdi */ |
466 | { 0x0052, &nv04_graph_ofuncs }, /* swzsurf */ | 466 | { 0x0052, &nv04_gr_ofuncs }, /* swzsurf */ |
467 | { 0x005f, &nv04_graph_ofuncs }, /* blit */ | 467 | { 0x005f, &nv04_gr_ofuncs }, /* blit */ |
468 | { 0x0062, &nv04_graph_ofuncs }, /* surf2d */ | 468 | { 0x0062, &nv04_gr_ofuncs }, /* surf2d */ |
469 | { 0x0072, &nv04_graph_ofuncs }, /* beta4 */ | 469 | { 0x0072, &nv04_gr_ofuncs }, /* beta4 */ |
470 | { 0x0089, &nv04_graph_ofuncs }, /* sifm */ | 470 | { 0x0089, &nv04_gr_ofuncs }, /* sifm */ |
471 | { 0x008a, &nv04_graph_ofuncs }, /* ifc */ | 471 | { 0x008a, &nv04_gr_ofuncs }, /* ifc */ |
472 | { 0x009f, &nv04_graph_ofuncs }, /* blit */ | 472 | { 0x009f, &nv04_gr_ofuncs }, /* blit */ |
473 | { 0x0093, &nv04_graph_ofuncs }, /* surf3d */ | 473 | { 0x0093, &nv04_gr_ofuncs }, /* surf3d */ |
474 | { 0x0094, &nv04_graph_ofuncs }, /* ttri */ | 474 | { 0x0094, &nv04_gr_ofuncs }, /* ttri */ |
475 | { 0x0095, &nv04_graph_ofuncs }, /* mtri */ | 475 | { 0x0095, &nv04_gr_ofuncs }, /* mtri */ |
476 | { 0x0096, &nv04_graph_ofuncs }, /* celcius */ | 476 | { 0x0096, &nv04_gr_ofuncs }, /* celcius */ |
477 | {}, | 477 | {}, |
478 | }; | 478 | }; |
479 | 479 | ||
480 | static int | 480 | static int |
481 | nv17_graph_mthd_lma_window(struct nouveau_object *object, u32 mthd, | 481 | nv17_gr_mthd_lma_window(struct nouveau_object *object, u32 mthd, |
482 | void *args, u32 size) | 482 | void *args, u32 size) |
483 | { | 483 | { |
484 | struct nv10_graph_chan *chan = (void *)object->parent; | 484 | struct nv10_gr_chan *chan = (void *)object->parent; |
485 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 485 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
486 | struct pipe_state *pipe = &chan->pipe_state; | 486 | struct pipe_state *pipe = &chan->pipe_state; |
487 | u32 pipe_0x0040[1], pipe_0x64c0[8], pipe_0x6a80[3], pipe_0x6ab0[3]; | 487 | u32 pipe_0x0040[1], pipe_0x64c0[8], pipe_0x6a80[3], pipe_0x6ab0[3]; |
488 | u32 xfmode0, xfmode1; | 488 | u32 xfmode0, xfmode1; |
@@ -494,14 +494,14 @@ nv17_graph_mthd_lma_window(struct nouveau_object *object, u32 mthd, | |||
494 | if (mthd != 0x1644) | 494 | if (mthd != 0x1644) |
495 | return 0; | 495 | return 0; |
496 | 496 | ||
497 | nv04_graph_idle(priv); | 497 | nv04_gr_idle(priv); |
498 | 498 | ||
499 | PIPE_SAVE(priv, pipe_0x0040, 0x0040); | 499 | PIPE_SAVE(priv, pipe_0x0040, 0x0040); |
500 | PIPE_SAVE(priv, pipe->pipe_0x0200, 0x0200); | 500 | PIPE_SAVE(priv, pipe->pipe_0x0200, 0x0200); |
501 | 501 | ||
502 | PIPE_RESTORE(priv, chan->lma_window, 0x6790); | 502 | PIPE_RESTORE(priv, chan->lma_window, 0x6790); |
503 | 503 | ||
504 | nv04_graph_idle(priv); | 504 | nv04_gr_idle(priv); |
505 | 505 | ||
506 | xfmode0 = nv_rd32(priv, NV10_PGRAPH_XFMODE0); | 506 | xfmode0 = nv_rd32(priv, NV10_PGRAPH_XFMODE0); |
507 | xfmode1 = nv_rd32(priv, NV10_PGRAPH_XFMODE1); | 507 | xfmode1 = nv_rd32(priv, NV10_PGRAPH_XFMODE1); |
@@ -511,7 +511,7 @@ nv17_graph_mthd_lma_window(struct nouveau_object *object, u32 mthd, | |||
511 | PIPE_SAVE(priv, pipe_0x6ab0, 0x6ab0); | 511 | PIPE_SAVE(priv, pipe_0x6ab0, 0x6ab0); |
512 | PIPE_SAVE(priv, pipe_0x6a80, 0x6a80); | 512 | PIPE_SAVE(priv, pipe_0x6a80, 0x6a80); |
513 | 513 | ||
514 | nv04_graph_idle(priv); | 514 | nv04_gr_idle(priv); |
515 | 515 | ||
516 | nv_wr32(priv, NV10_PGRAPH_XFMODE0, 0x10000000); | 516 | nv_wr32(priv, NV10_PGRAPH_XFMODE0, 0x10000000); |
517 | nv_wr32(priv, NV10_PGRAPH_XFMODE1, 0x00000000); | 517 | nv_wr32(priv, NV10_PGRAPH_XFMODE1, 0x00000000); |
@@ -534,7 +534,7 @@ nv17_graph_mthd_lma_window(struct nouveau_object *object, u32 mthd, | |||
534 | 534 | ||
535 | PIPE_RESTORE(priv, pipe->pipe_0x0200, 0x0200); | 535 | PIPE_RESTORE(priv, pipe->pipe_0x0200, 0x0200); |
536 | 536 | ||
537 | nv04_graph_idle(priv); | 537 | nv04_gr_idle(priv); |
538 | 538 | ||
539 | PIPE_RESTORE(priv, pipe_0x0040, 0x0040); | 539 | PIPE_RESTORE(priv, pipe_0x0040, 0x0040); |
540 | 540 | ||
@@ -549,19 +549,19 @@ nv17_graph_mthd_lma_window(struct nouveau_object *object, u32 mthd, | |||
549 | nv_wr32(priv, NV10_PGRAPH_PIPE_ADDRESS, 0x000000c0); | 549 | nv_wr32(priv, NV10_PGRAPH_PIPE_ADDRESS, 0x000000c0); |
550 | nv_wr32(priv, NV10_PGRAPH_PIPE_DATA, 0x00000000); | 550 | nv_wr32(priv, NV10_PGRAPH_PIPE_DATA, 0x00000000); |
551 | 551 | ||
552 | nv04_graph_idle(priv); | 552 | nv04_gr_idle(priv); |
553 | 553 | ||
554 | return 0; | 554 | return 0; |
555 | } | 555 | } |
556 | 556 | ||
557 | static int | 557 | static int |
558 | nv17_graph_mthd_lma_enable(struct nouveau_object *object, u32 mthd, | 558 | nv17_gr_mthd_lma_enable(struct nouveau_object *object, u32 mthd, |
559 | void *args, u32 size) | 559 | void *args, u32 size) |
560 | { | 560 | { |
561 | struct nv10_graph_chan *chan = (void *)object->parent; | 561 | struct nv10_gr_chan *chan = (void *)object->parent; |
562 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 562 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
563 | 563 | ||
564 | nv04_graph_idle(priv); | 564 | nv04_gr_idle(priv); |
565 | 565 | ||
566 | nv_mask(priv, NV10_PGRAPH_DEBUG_4, 0x00000100, 0x00000100); | 566 | nv_mask(priv, NV10_PGRAPH_DEBUG_4, 0x00000100, 0x00000100); |
567 | nv_mask(priv, 0x4006b0, 0x08000000, 0x08000000); | 567 | nv_mask(priv, 0x4006b0, 0x08000000, 0x08000000); |
@@ -570,34 +570,34 @@ nv17_graph_mthd_lma_enable(struct nouveau_object *object, u32 mthd, | |||
570 | 570 | ||
571 | static struct nouveau_omthds | 571 | static struct nouveau_omthds |
572 | nv17_celcius_omthds[] = { | 572 | nv17_celcius_omthds[] = { |
573 | { 0x1638, 0x1638, nv17_graph_mthd_lma_window }, | 573 | { 0x1638, 0x1638, nv17_gr_mthd_lma_window }, |
574 | { 0x163c, 0x163c, nv17_graph_mthd_lma_window }, | 574 | { 0x163c, 0x163c, nv17_gr_mthd_lma_window }, |
575 | { 0x1640, 0x1640, nv17_graph_mthd_lma_window }, | 575 | { 0x1640, 0x1640, nv17_gr_mthd_lma_window }, |
576 | { 0x1644, 0x1644, nv17_graph_mthd_lma_window }, | 576 | { 0x1644, 0x1644, nv17_gr_mthd_lma_window }, |
577 | { 0x1658, 0x1658, nv17_graph_mthd_lma_enable }, | 577 | { 0x1658, 0x1658, nv17_gr_mthd_lma_enable }, |
578 | {} | 578 | {} |
579 | }; | 579 | }; |
580 | 580 | ||
581 | static struct nouveau_oclass | 581 | static struct nouveau_oclass |
582 | nv17_graph_sclass[] = { | 582 | nv17_gr_sclass[] = { |
583 | { 0x0012, &nv04_graph_ofuncs }, /* beta1 */ | 583 | { 0x0012, &nv04_gr_ofuncs }, /* beta1 */ |
584 | { 0x0019, &nv04_graph_ofuncs }, /* clip */ | 584 | { 0x0019, &nv04_gr_ofuncs }, /* clip */ |
585 | { 0x0030, &nv04_graph_ofuncs }, /* null */ | 585 | { 0x0030, &nv04_gr_ofuncs }, /* null */ |
586 | { 0x0039, &nv04_graph_ofuncs }, /* m2mf */ | 586 | { 0x0039, &nv04_gr_ofuncs }, /* m2mf */ |
587 | { 0x0043, &nv04_graph_ofuncs }, /* rop */ | 587 | { 0x0043, &nv04_gr_ofuncs }, /* rop */ |
588 | { 0x0044, &nv04_graph_ofuncs }, /* pattern */ | 588 | { 0x0044, &nv04_gr_ofuncs }, /* pattern */ |
589 | { 0x004a, &nv04_graph_ofuncs }, /* gdi */ | 589 | { 0x004a, &nv04_gr_ofuncs }, /* gdi */ |
590 | { 0x0052, &nv04_graph_ofuncs }, /* swzsurf */ | 590 | { 0x0052, &nv04_gr_ofuncs }, /* swzsurf */ |
591 | { 0x005f, &nv04_graph_ofuncs }, /* blit */ | 591 | { 0x005f, &nv04_gr_ofuncs }, /* blit */ |
592 | { 0x0062, &nv04_graph_ofuncs }, /* surf2d */ | 592 | { 0x0062, &nv04_gr_ofuncs }, /* surf2d */ |
593 | { 0x0072, &nv04_graph_ofuncs }, /* beta4 */ | 593 | { 0x0072, &nv04_gr_ofuncs }, /* beta4 */ |
594 | { 0x0089, &nv04_graph_ofuncs }, /* sifm */ | 594 | { 0x0089, &nv04_gr_ofuncs }, /* sifm */ |
595 | { 0x008a, &nv04_graph_ofuncs }, /* ifc */ | 595 | { 0x008a, &nv04_gr_ofuncs }, /* ifc */ |
596 | { 0x009f, &nv04_graph_ofuncs }, /* blit */ | 596 | { 0x009f, &nv04_gr_ofuncs }, /* blit */ |
597 | { 0x0093, &nv04_graph_ofuncs }, /* surf3d */ | 597 | { 0x0093, &nv04_gr_ofuncs }, /* surf3d */ |
598 | { 0x0094, &nv04_graph_ofuncs }, /* ttri */ | 598 | { 0x0094, &nv04_gr_ofuncs }, /* ttri */ |
599 | { 0x0095, &nv04_graph_ofuncs }, /* mtri */ | 599 | { 0x0095, &nv04_gr_ofuncs }, /* mtri */ |
600 | { 0x0099, &nv04_graph_ofuncs, nv17_celcius_omthds }, | 600 | { 0x0099, &nv04_gr_ofuncs, nv17_celcius_omthds }, |
601 | {}, | 601 | {}, |
602 | }; | 602 | }; |
603 | 603 | ||
@@ -605,10 +605,10 @@ nv17_graph_sclass[] = { | |||
605 | * PGRAPH context | 605 | * PGRAPH context |
606 | ******************************************************************************/ | 606 | ******************************************************************************/ |
607 | 607 | ||
608 | static struct nv10_graph_chan * | 608 | static struct nv10_gr_chan * |
609 | nv10_graph_channel(struct nv10_graph_priv *priv) | 609 | nv10_gr_channel(struct nv10_gr_priv *priv) |
610 | { | 610 | { |
611 | struct nv10_graph_chan *chan = NULL; | 611 | struct nv10_gr_chan *chan = NULL; |
612 | if (nv_rd32(priv, 0x400144) & 0x00010000) { | 612 | if (nv_rd32(priv, 0x400144) & 0x00010000) { |
613 | int chid = nv_rd32(priv, 0x400148) >> 24; | 613 | int chid = nv_rd32(priv, 0x400148) >> 24; |
614 | if (chid < ARRAY_SIZE(priv->chan)) | 614 | if (chid < ARRAY_SIZE(priv->chan)) |
@@ -618,9 +618,9 @@ nv10_graph_channel(struct nv10_graph_priv *priv) | |||
618 | } | 618 | } |
619 | 619 | ||
620 | static void | 620 | static void |
621 | nv10_graph_save_pipe(struct nv10_graph_chan *chan) | 621 | nv10_gr_save_pipe(struct nv10_gr_chan *chan) |
622 | { | 622 | { |
623 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 623 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
624 | struct pipe_state *pipe = &chan->pipe_state; | 624 | struct pipe_state *pipe = &chan->pipe_state; |
625 | 625 | ||
626 | PIPE_SAVE(priv, pipe->pipe_0x4400, 0x4400); | 626 | PIPE_SAVE(priv, pipe->pipe_0x4400, 0x4400); |
@@ -636,14 +636,14 @@ nv10_graph_save_pipe(struct nv10_graph_chan *chan) | |||
636 | } | 636 | } |
637 | 637 | ||
638 | static void | 638 | static void |
639 | nv10_graph_load_pipe(struct nv10_graph_chan *chan) | 639 | nv10_gr_load_pipe(struct nv10_gr_chan *chan) |
640 | { | 640 | { |
641 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 641 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
642 | struct pipe_state *pipe = &chan->pipe_state; | 642 | struct pipe_state *pipe = &chan->pipe_state; |
643 | u32 xfmode0, xfmode1; | 643 | u32 xfmode0, xfmode1; |
644 | int i; | 644 | int i; |
645 | 645 | ||
646 | nv04_graph_idle(priv); | 646 | nv04_gr_idle(priv); |
647 | /* XXX check haiku comments */ | 647 | /* XXX check haiku comments */ |
648 | xfmode0 = nv_rd32(priv, NV10_PGRAPH_XFMODE0); | 648 | xfmode0 = nv_rd32(priv, NV10_PGRAPH_XFMODE0); |
649 | xfmode1 = nv_rd32(priv, NV10_PGRAPH_XFMODE1); | 649 | xfmode1 = nv_rd32(priv, NV10_PGRAPH_XFMODE1); |
@@ -668,7 +668,7 @@ nv10_graph_load_pipe(struct nv10_graph_chan *chan) | |||
668 | 668 | ||
669 | 669 | ||
670 | PIPE_RESTORE(priv, pipe->pipe_0x0200, 0x0200); | 670 | PIPE_RESTORE(priv, pipe->pipe_0x0200, 0x0200); |
671 | nv04_graph_idle(priv); | 671 | nv04_gr_idle(priv); |
672 | 672 | ||
673 | /* restore XFMODE */ | 673 | /* restore XFMODE */ |
674 | nv_wr32(priv, NV10_PGRAPH_XFMODE0, xfmode0); | 674 | nv_wr32(priv, NV10_PGRAPH_XFMODE0, xfmode0); |
@@ -682,13 +682,13 @@ nv10_graph_load_pipe(struct nv10_graph_chan *chan) | |||
682 | PIPE_RESTORE(priv, pipe->pipe_0x4400, 0x4400); | 682 | PIPE_RESTORE(priv, pipe->pipe_0x4400, 0x4400); |
683 | PIPE_RESTORE(priv, pipe->pipe_0x0000, 0x0000); | 683 | PIPE_RESTORE(priv, pipe->pipe_0x0000, 0x0000); |
684 | PIPE_RESTORE(priv, pipe->pipe_0x0040, 0x0040); | 684 | PIPE_RESTORE(priv, pipe->pipe_0x0040, 0x0040); |
685 | nv04_graph_idle(priv); | 685 | nv04_gr_idle(priv); |
686 | } | 686 | } |
687 | 687 | ||
688 | static void | 688 | static void |
689 | nv10_graph_create_pipe(struct nv10_graph_chan *chan) | 689 | nv10_gr_create_pipe(struct nv10_gr_chan *chan) |
690 | { | 690 | { |
691 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 691 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
692 | struct pipe_state *pipe_state = &chan->pipe_state; | 692 | struct pipe_state *pipe_state = &chan->pipe_state; |
693 | u32 *pipe_state_addr; | 693 | u32 *pipe_state_addr; |
694 | int i; | 694 | int i; |
@@ -841,11 +841,11 @@ nv10_graph_create_pipe(struct nv10_graph_chan *chan) | |||
841 | } | 841 | } |
842 | 842 | ||
843 | static int | 843 | static int |
844 | nv10_graph_ctx_regs_find_offset(struct nv10_graph_priv *priv, int reg) | 844 | nv10_gr_ctx_regs_find_offset(struct nv10_gr_priv *priv, int reg) |
845 | { | 845 | { |
846 | int i; | 846 | int i; |
847 | for (i = 0; i < ARRAY_SIZE(nv10_graph_ctx_regs); i++) { | 847 | for (i = 0; i < ARRAY_SIZE(nv10_gr_ctx_regs); i++) { |
848 | if (nv10_graph_ctx_regs[i] == reg) | 848 | if (nv10_gr_ctx_regs[i] == reg) |
849 | return i; | 849 | return i; |
850 | } | 850 | } |
851 | nv_error(priv, "unknow offset nv10_ctx_regs %d\n", reg); | 851 | nv_error(priv, "unknow offset nv10_ctx_regs %d\n", reg); |
@@ -853,11 +853,11 @@ nv10_graph_ctx_regs_find_offset(struct nv10_graph_priv *priv, int reg) | |||
853 | } | 853 | } |
854 | 854 | ||
855 | static int | 855 | static int |
856 | nv17_graph_ctx_regs_find_offset(struct nv10_graph_priv *priv, int reg) | 856 | nv17_gr_ctx_regs_find_offset(struct nv10_gr_priv *priv, int reg) |
857 | { | 857 | { |
858 | int i; | 858 | int i; |
859 | for (i = 0; i < ARRAY_SIZE(nv17_graph_ctx_regs); i++) { | 859 | for (i = 0; i < ARRAY_SIZE(nv17_gr_ctx_regs); i++) { |
860 | if (nv17_graph_ctx_regs[i] == reg) | 860 | if (nv17_gr_ctx_regs[i] == reg) |
861 | return i; | 861 | return i; |
862 | } | 862 | } |
863 | nv_error(priv, "unknow offset nv17_ctx_regs %d\n", reg); | 863 | nv_error(priv, "unknow offset nv17_ctx_regs %d\n", reg); |
@@ -865,9 +865,9 @@ nv17_graph_ctx_regs_find_offset(struct nv10_graph_priv *priv, int reg) | |||
865 | } | 865 | } |
866 | 866 | ||
867 | static void | 867 | static void |
868 | nv10_graph_load_dma_vtxbuf(struct nv10_graph_chan *chan, int chid, u32 inst) | 868 | nv10_gr_load_dma_vtxbuf(struct nv10_gr_chan *chan, int chid, u32 inst) |
869 | { | 869 | { |
870 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 870 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
871 | u32 st2, st2_dl, st2_dh, fifo_ptr, fifo[0x60/4]; | 871 | u32 st2, st2_dl, st2_dh, fifo_ptr, fifo[0x60/4]; |
872 | u32 ctx_user, ctx_switch[5]; | 872 | u32 ctx_user, ctx_switch[5]; |
873 | int i, subchan = -1; | 873 | int i, subchan = -1; |
@@ -935,25 +935,25 @@ nv10_graph_load_dma_vtxbuf(struct nv10_graph_chan *chan, int chid, u32 inst) | |||
935 | } | 935 | } |
936 | 936 | ||
937 | static int | 937 | static int |
938 | nv10_graph_load_context(struct nv10_graph_chan *chan, int chid) | 938 | nv10_gr_load_context(struct nv10_gr_chan *chan, int chid) |
939 | { | 939 | { |
940 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 940 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
941 | u32 inst; | 941 | u32 inst; |
942 | int i; | 942 | int i; |
943 | 943 | ||
944 | for (i = 0; i < ARRAY_SIZE(nv10_graph_ctx_regs); i++) | 944 | for (i = 0; i < ARRAY_SIZE(nv10_gr_ctx_regs); i++) |
945 | nv_wr32(priv, nv10_graph_ctx_regs[i], chan->nv10[i]); | 945 | nv_wr32(priv, nv10_gr_ctx_regs[i], chan->nv10[i]); |
946 | 946 | ||
947 | if (nv_device(priv)->card_type >= NV_11 && | 947 | if (nv_device(priv)->card_type >= NV_11 && |
948 | nv_device(priv)->chipset >= 0x17) { | 948 | nv_device(priv)->chipset >= 0x17) { |
949 | for (i = 0; i < ARRAY_SIZE(nv17_graph_ctx_regs); i++) | 949 | for (i = 0; i < ARRAY_SIZE(nv17_gr_ctx_regs); i++) |
950 | nv_wr32(priv, nv17_graph_ctx_regs[i], chan->nv17[i]); | 950 | nv_wr32(priv, nv17_gr_ctx_regs[i], chan->nv17[i]); |
951 | } | 951 | } |
952 | 952 | ||
953 | nv10_graph_load_pipe(chan); | 953 | nv10_gr_load_pipe(chan); |
954 | 954 | ||
955 | inst = nv_rd32(priv, NV10_PGRAPH_GLOBALSTATE1) & 0xffff; | 955 | inst = nv_rd32(priv, NV10_PGRAPH_GLOBALSTATE1) & 0xffff; |
956 | nv10_graph_load_dma_vtxbuf(chan, chid, inst); | 956 | nv10_gr_load_dma_vtxbuf(chan, chid, inst); |
957 | 957 | ||
958 | nv_wr32(priv, NV10_PGRAPH_CTX_CONTROL, 0x10010100); | 958 | nv_wr32(priv, NV10_PGRAPH_CTX_CONTROL, 0x10010100); |
959 | nv_mask(priv, NV10_PGRAPH_CTX_USER, 0xff000000, chid << 24); | 959 | nv_mask(priv, NV10_PGRAPH_CTX_USER, 0xff000000, chid << 24); |
@@ -962,21 +962,21 @@ nv10_graph_load_context(struct nv10_graph_chan *chan, int chid) | |||
962 | } | 962 | } |
963 | 963 | ||
964 | static int | 964 | static int |
965 | nv10_graph_unload_context(struct nv10_graph_chan *chan) | 965 | nv10_gr_unload_context(struct nv10_gr_chan *chan) |
966 | { | 966 | { |
967 | struct nv10_graph_priv *priv = nv10_graph_priv(chan); | 967 | struct nv10_gr_priv *priv = nv10_gr_priv(chan); |
968 | int i; | 968 | int i; |
969 | 969 | ||
970 | for (i = 0; i < ARRAY_SIZE(nv10_graph_ctx_regs); i++) | 970 | for (i = 0; i < ARRAY_SIZE(nv10_gr_ctx_regs); i++) |
971 | chan->nv10[i] = nv_rd32(priv, nv10_graph_ctx_regs[i]); | 971 | chan->nv10[i] = nv_rd32(priv, nv10_gr_ctx_regs[i]); |
972 | 972 | ||
973 | if (nv_device(priv)->card_type >= NV_11 && | 973 | if (nv_device(priv)->card_type >= NV_11 && |
974 | nv_device(priv)->chipset >= 0x17) { | 974 | nv_device(priv)->chipset >= 0x17) { |
975 | for (i = 0; i < ARRAY_SIZE(nv17_graph_ctx_regs); i++) | 975 | for (i = 0; i < ARRAY_SIZE(nv17_gr_ctx_regs); i++) |
976 | chan->nv17[i] = nv_rd32(priv, nv17_graph_ctx_regs[i]); | 976 | chan->nv17[i] = nv_rd32(priv, nv17_gr_ctx_regs[i]); |
977 | } | 977 | } |
978 | 978 | ||
979 | nv10_graph_save_pipe(chan); | 979 | nv10_gr_save_pipe(chan); |
980 | 980 | ||
981 | nv_wr32(priv, NV10_PGRAPH_CTX_CONTROL, 0x10000000); | 981 | nv_wr32(priv, NV10_PGRAPH_CTX_CONTROL, 0x10000000); |
982 | nv_mask(priv, NV10_PGRAPH_CTX_USER, 0xff000000, 0x1f000000); | 982 | nv_mask(priv, NV10_PGRAPH_CTX_USER, 0xff000000, 0x1f000000); |
@@ -984,51 +984,51 @@ nv10_graph_unload_context(struct nv10_graph_chan *chan) | |||
984 | } | 984 | } |
985 | 985 | ||
986 | static void | 986 | static void |
987 | nv10_graph_context_switch(struct nv10_graph_priv *priv) | 987 | nv10_gr_context_switch(struct nv10_gr_priv *priv) |
988 | { | 988 | { |
989 | struct nv10_graph_chan *prev = NULL; | 989 | struct nv10_gr_chan *prev = NULL; |
990 | struct nv10_graph_chan *next = NULL; | 990 | struct nv10_gr_chan *next = NULL; |
991 | unsigned long flags; | 991 | unsigned long flags; |
992 | int chid; | 992 | int chid; |
993 | 993 | ||
994 | spin_lock_irqsave(&priv->lock, flags); | 994 | spin_lock_irqsave(&priv->lock, flags); |
995 | nv04_graph_idle(priv); | 995 | nv04_gr_idle(priv); |
996 | 996 | ||
997 | /* If previous context is valid, we need to save it */ | 997 | /* If previous context is valid, we need to save it */ |
998 | prev = nv10_graph_channel(priv); | 998 | prev = nv10_gr_channel(priv); |
999 | if (prev) | 999 | if (prev) |
1000 | nv10_graph_unload_context(prev); | 1000 | nv10_gr_unload_context(prev); |
1001 | 1001 | ||
1002 | /* load context for next channel */ | 1002 | /* load context for next channel */ |
1003 | chid = (nv_rd32(priv, NV04_PGRAPH_TRAPPED_ADDR) >> 20) & 0x1f; | 1003 | chid = (nv_rd32(priv, NV04_PGRAPH_TRAPPED_ADDR) >> 20) & 0x1f; |
1004 | next = priv->chan[chid]; | 1004 | next = priv->chan[chid]; |
1005 | if (next) | 1005 | if (next) |
1006 | nv10_graph_load_context(next, chid); | 1006 | nv10_gr_load_context(next, chid); |
1007 | 1007 | ||
1008 | spin_unlock_irqrestore(&priv->lock, flags); | 1008 | spin_unlock_irqrestore(&priv->lock, flags); |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | #define NV_WRITE_CTX(reg, val) do { \ | 1011 | #define NV_WRITE_CTX(reg, val) do { \ |
1012 | int offset = nv10_graph_ctx_regs_find_offset(priv, reg); \ | 1012 | int offset = nv10_gr_ctx_regs_find_offset(priv, reg); \ |
1013 | if (offset > 0) \ | 1013 | if (offset > 0) \ |
1014 | chan->nv10[offset] = val; \ | 1014 | chan->nv10[offset] = val; \ |
1015 | } while (0) | 1015 | } while (0) |
1016 | 1016 | ||
1017 | #define NV17_WRITE_CTX(reg, val) do { \ | 1017 | #define NV17_WRITE_CTX(reg, val) do { \ |
1018 | int offset = nv17_graph_ctx_regs_find_offset(priv, reg); \ | 1018 | int offset = nv17_gr_ctx_regs_find_offset(priv, reg); \ |
1019 | if (offset > 0) \ | 1019 | if (offset > 0) \ |
1020 | chan->nv17[offset] = val; \ | 1020 | chan->nv17[offset] = val; \ |
1021 | } while (0) | 1021 | } while (0) |
1022 | 1022 | ||
1023 | static int | 1023 | static int |
1024 | nv10_graph_context_ctor(struct nouveau_object *parent, | 1024 | nv10_gr_context_ctor(struct nouveau_object *parent, |
1025 | struct nouveau_object *engine, | 1025 | struct nouveau_object *engine, |
1026 | struct nouveau_oclass *oclass, void *data, u32 size, | 1026 | struct nouveau_oclass *oclass, void *data, u32 size, |
1027 | struct nouveau_object **pobject) | 1027 | struct nouveau_object **pobject) |
1028 | { | 1028 | { |
1029 | struct nouveau_fifo_chan *fifo = (void *)parent; | 1029 | struct nouveau_fifo_chan *fifo = (void *)parent; |
1030 | struct nv10_graph_priv *priv = (void *)engine; | 1030 | struct nv10_gr_priv *priv = (void *)engine; |
1031 | struct nv10_graph_chan *chan; | 1031 | struct nv10_gr_chan *chan; |
1032 | unsigned long flags; | 1032 | unsigned long flags; |
1033 | int ret; | 1033 | int ret; |
1034 | 1034 | ||
@@ -1066,7 +1066,7 @@ nv10_graph_context_ctor(struct nouveau_object *parent, | |||
1066 | } | 1066 | } |
1067 | NV_WRITE_CTX(NV10_PGRAPH_CTX_USER, chan->chid << 24); | 1067 | NV_WRITE_CTX(NV10_PGRAPH_CTX_USER, chan->chid << 24); |
1068 | 1068 | ||
1069 | nv10_graph_create_pipe(chan); | 1069 | nv10_gr_create_pipe(chan); |
1070 | 1070 | ||
1071 | priv->chan[fifo->chid] = chan; | 1071 | priv->chan[fifo->chid] = chan; |
1072 | chan->chid = fifo->chid; | 1072 | chan->chid = fifo->chid; |
@@ -1075,10 +1075,10 @@ nv10_graph_context_ctor(struct nouveau_object *parent, | |||
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | static void | 1077 | static void |
1078 | nv10_graph_context_dtor(struct nouveau_object *object) | 1078 | nv10_gr_context_dtor(struct nouveau_object *object) |
1079 | { | 1079 | { |
1080 | struct nv10_graph_priv *priv = (void *)object->engine; | 1080 | struct nv10_gr_priv *priv = (void *)object->engine; |
1081 | struct nv10_graph_chan *chan = (void *)object; | 1081 | struct nv10_gr_chan *chan = (void *)object; |
1082 | unsigned long flags; | 1082 | unsigned long flags; |
1083 | 1083 | ||
1084 | spin_lock_irqsave(&priv->lock, flags); | 1084 | spin_lock_irqsave(&priv->lock, flags); |
@@ -1089,16 +1089,16 @@ nv10_graph_context_dtor(struct nouveau_object *object) | |||
1089 | } | 1089 | } |
1090 | 1090 | ||
1091 | static int | 1091 | static int |
1092 | nv10_graph_context_fini(struct nouveau_object *object, bool suspend) | 1092 | nv10_gr_context_fini(struct nouveau_object *object, bool suspend) |
1093 | { | 1093 | { |
1094 | struct nv10_graph_priv *priv = (void *)object->engine; | 1094 | struct nv10_gr_priv *priv = (void *)object->engine; |
1095 | struct nv10_graph_chan *chan = (void *)object; | 1095 | struct nv10_gr_chan *chan = (void *)object; |
1096 | unsigned long flags; | 1096 | unsigned long flags; |
1097 | 1097 | ||
1098 | spin_lock_irqsave(&priv->lock, flags); | 1098 | spin_lock_irqsave(&priv->lock, flags); |
1099 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000000); | 1099 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000000); |
1100 | if (nv10_graph_channel(priv) == chan) | 1100 | if (nv10_gr_channel(priv) == chan) |
1101 | nv10_graph_unload_context(chan); | 1101 | nv10_gr_unload_context(chan); |
1102 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000001); | 1102 | nv_mask(priv, NV04_PGRAPH_FIFO, 0x00000001, 0x00000001); |
1103 | spin_unlock_irqrestore(&priv->lock, flags); | 1103 | spin_unlock_irqrestore(&priv->lock, flags); |
1104 | 1104 | ||
@@ -1106,13 +1106,13 @@ nv10_graph_context_fini(struct nouveau_object *object, bool suspend) | |||
1106 | } | 1106 | } |
1107 | 1107 | ||
1108 | static struct nouveau_oclass | 1108 | static struct nouveau_oclass |
1109 | nv10_graph_cclass = { | 1109 | nv10_gr_cclass = { |
1110 | .handle = NV_ENGCTX(GR, 0x10), | 1110 | .handle = NV_ENGCTX(GR, 0x10), |
1111 | .ofuncs = &(struct nouveau_ofuncs) { | 1111 | .ofuncs = &(struct nouveau_ofuncs) { |
1112 | .ctor = nv10_graph_context_ctor, | 1112 | .ctor = nv10_gr_context_ctor, |
1113 | .dtor = nv10_graph_context_dtor, | 1113 | .dtor = nv10_gr_context_dtor, |
1114 | .init = nouveau_object_init, | 1114 | .init = nouveau_object_init, |
1115 | .fini = nv10_graph_context_fini, | 1115 | .fini = nv10_gr_context_fini, |
1116 | }, | 1116 | }, |
1117 | }; | 1117 | }; |
1118 | 1118 | ||
@@ -1121,15 +1121,15 @@ nv10_graph_cclass = { | |||
1121 | ******************************************************************************/ | 1121 | ******************************************************************************/ |
1122 | 1122 | ||
1123 | static void | 1123 | static void |
1124 | nv10_graph_tile_prog(struct nouveau_engine *engine, int i) | 1124 | nv10_gr_tile_prog(struct nouveau_engine *engine, int i) |
1125 | { | 1125 | { |
1126 | struct nouveau_fb_tile *tile = &nouveau_fb(engine)->tile.region[i]; | 1126 | struct nouveau_fb_tile *tile = &nouveau_fb(engine)->tile.region[i]; |
1127 | struct nouveau_fifo *pfifo = nouveau_fifo(engine); | 1127 | struct nouveau_fifo *pfifo = nouveau_fifo(engine); |
1128 | struct nv10_graph_priv *priv = (void *)engine; | 1128 | struct nv10_gr_priv *priv = (void *)engine; |
1129 | unsigned long flags; | 1129 | unsigned long flags; |
1130 | 1130 | ||
1131 | pfifo->pause(pfifo, &flags); | 1131 | pfifo->pause(pfifo, &flags); |
1132 | nv04_graph_idle(priv); | 1132 | nv04_gr_idle(priv); |
1133 | 1133 | ||
1134 | nv_wr32(priv, NV10_PGRAPH_TLIMIT(i), tile->limit); | 1134 | nv_wr32(priv, NV10_PGRAPH_TLIMIT(i), tile->limit); |
1135 | nv_wr32(priv, NV10_PGRAPH_TSIZE(i), tile->pitch); | 1135 | nv_wr32(priv, NV10_PGRAPH_TSIZE(i), tile->pitch); |
@@ -1138,13 +1138,13 @@ nv10_graph_tile_prog(struct nouveau_engine *engine, int i) | |||
1138 | pfifo->start(pfifo, &flags); | 1138 | pfifo->start(pfifo, &flags); |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | const struct nouveau_bitfield nv10_graph_intr_name[] = { | 1141 | const struct nouveau_bitfield nv10_gr_intr_name[] = { |
1142 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, | 1142 | { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, |
1143 | { NV_PGRAPH_INTR_ERROR, "ERROR" }, | 1143 | { NV_PGRAPH_INTR_ERROR, "ERROR" }, |
1144 | {} | 1144 | {} |
1145 | }; | 1145 | }; |
1146 | 1146 | ||
1147 | const struct nouveau_bitfield nv10_graph_nstatus[] = { | 1147 | const struct nouveau_bitfield nv10_gr_nstatus[] = { |
1148 | { NV10_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, | 1148 | { NV10_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, |
1149 | { NV10_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, | 1149 | { NV10_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, |
1150 | { NV10_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, | 1150 | { NV10_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, |
@@ -1153,10 +1153,10 @@ const struct nouveau_bitfield nv10_graph_nstatus[] = { | |||
1153 | }; | 1153 | }; |
1154 | 1154 | ||
1155 | static void | 1155 | static void |
1156 | nv10_graph_intr(struct nouveau_subdev *subdev) | 1156 | nv10_gr_intr(struct nouveau_subdev *subdev) |
1157 | { | 1157 | { |
1158 | struct nv10_graph_priv *priv = (void *)subdev; | 1158 | struct nv10_gr_priv *priv = (void *)subdev; |
1159 | struct nv10_graph_chan *chan = NULL; | 1159 | struct nv10_gr_chan *chan = NULL; |
1160 | struct nouveau_namedb *namedb = NULL; | 1160 | struct nouveau_namedb *namedb = NULL; |
1161 | struct nouveau_handle *handle = NULL; | 1161 | struct nouveau_handle *handle = NULL; |
1162 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); | 1162 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); |
@@ -1189,7 +1189,7 @@ nv10_graph_intr(struct nouveau_subdev *subdev) | |||
1189 | nv_wr32(priv, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_CONTEXT_SWITCH); | 1189 | nv_wr32(priv, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_CONTEXT_SWITCH); |
1190 | stat &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; | 1190 | stat &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; |
1191 | show &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; | 1191 | show &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; |
1192 | nv10_graph_context_switch(priv); | 1192 | nv10_gr_context_switch(priv); |
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | nv_wr32(priv, NV03_PGRAPH_INTR, stat); | 1195 | nv_wr32(priv, NV03_PGRAPH_INTR, stat); |
@@ -1197,11 +1197,11 @@ nv10_graph_intr(struct nouveau_subdev *subdev) | |||
1197 | 1197 | ||
1198 | if (show) { | 1198 | if (show) { |
1199 | nv_error(priv, "%s", ""); | 1199 | nv_error(priv, "%s", ""); |
1200 | nouveau_bitfield_print(nv10_graph_intr_name, show); | 1200 | nouveau_bitfield_print(nv10_gr_intr_name, show); |
1201 | pr_cont(" nsource:"); | 1201 | pr_cont(" nsource:"); |
1202 | nouveau_bitfield_print(nv04_graph_nsource, nsource); | 1202 | nouveau_bitfield_print(nv04_gr_nsource, nsource); |
1203 | pr_cont(" nstatus:"); | 1203 | pr_cont(" nstatus:"); |
1204 | nouveau_bitfield_print(nv10_graph_nstatus, nstatus); | 1204 | nouveau_bitfield_print(nv10_gr_nstatus, nstatus); |
1205 | pr_cont("\n"); | 1205 | pr_cont("\n"); |
1206 | nv_error(priv, | 1206 | nv_error(priv, |
1207 | "ch %d [%s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", | 1207 | "ch %d [%s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", |
@@ -1213,52 +1213,52 @@ nv10_graph_intr(struct nouveau_subdev *subdev) | |||
1213 | } | 1213 | } |
1214 | 1214 | ||
1215 | static int | 1215 | static int |
1216 | nv10_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 1216 | nv10_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
1217 | struct nouveau_oclass *oclass, void *data, u32 size, | 1217 | struct nouveau_oclass *oclass, void *data, u32 size, |
1218 | struct nouveau_object **pobject) | 1218 | struct nouveau_object **pobject) |
1219 | { | 1219 | { |
1220 | struct nv10_graph_priv *priv; | 1220 | struct nv10_gr_priv *priv; |
1221 | int ret; | 1221 | int ret; |
1222 | 1222 | ||
1223 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 1223 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
1224 | *pobject = nv_object(priv); | 1224 | *pobject = nv_object(priv); |
1225 | if (ret) | 1225 | if (ret) |
1226 | return ret; | 1226 | return ret; |
1227 | 1227 | ||
1228 | nv_subdev(priv)->unit = 0x00001000; | 1228 | nv_subdev(priv)->unit = 0x00001000; |
1229 | nv_subdev(priv)->intr = nv10_graph_intr; | 1229 | nv_subdev(priv)->intr = nv10_gr_intr; |
1230 | nv_engine(priv)->cclass = &nv10_graph_cclass; | 1230 | nv_engine(priv)->cclass = &nv10_gr_cclass; |
1231 | 1231 | ||
1232 | if (nv_device(priv)->chipset <= 0x10) | 1232 | if (nv_device(priv)->chipset <= 0x10) |
1233 | nv_engine(priv)->sclass = nv10_graph_sclass; | 1233 | nv_engine(priv)->sclass = nv10_gr_sclass; |
1234 | else | 1234 | else |
1235 | if (nv_device(priv)->chipset < 0x17 || | 1235 | if (nv_device(priv)->chipset < 0x17 || |
1236 | nv_device(priv)->card_type < NV_11) | 1236 | nv_device(priv)->card_type < NV_11) |
1237 | nv_engine(priv)->sclass = nv15_graph_sclass; | 1237 | nv_engine(priv)->sclass = nv15_gr_sclass; |
1238 | else | 1238 | else |
1239 | nv_engine(priv)->sclass = nv17_graph_sclass; | 1239 | nv_engine(priv)->sclass = nv17_gr_sclass; |
1240 | 1240 | ||
1241 | nv_engine(priv)->tile_prog = nv10_graph_tile_prog; | 1241 | nv_engine(priv)->tile_prog = nv10_gr_tile_prog; |
1242 | spin_lock_init(&priv->lock); | 1242 | spin_lock_init(&priv->lock); |
1243 | return 0; | 1243 | return 0; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | static void | 1246 | static void |
1247 | nv10_graph_dtor(struct nouveau_object *object) | 1247 | nv10_gr_dtor(struct nouveau_object *object) |
1248 | { | 1248 | { |
1249 | struct nv10_graph_priv *priv = (void *)object; | 1249 | struct nv10_gr_priv *priv = (void *)object; |
1250 | nouveau_graph_destroy(&priv->base); | 1250 | nouveau_gr_destroy(&priv->base); |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | static int | 1253 | static int |
1254 | nv10_graph_init(struct nouveau_object *object) | 1254 | nv10_gr_init(struct nouveau_object *object) |
1255 | { | 1255 | { |
1256 | struct nouveau_engine *engine = nv_engine(object); | 1256 | struct nouveau_engine *engine = nv_engine(object); |
1257 | struct nouveau_fb *pfb = nouveau_fb(object); | 1257 | struct nouveau_fb *pfb = nouveau_fb(object); |
1258 | struct nv10_graph_priv *priv = (void *)engine; | 1258 | struct nv10_gr_priv *priv = (void *)engine; |
1259 | int ret, i; | 1259 | int ret, i; |
1260 | 1260 | ||
1261 | ret = nouveau_graph_init(&priv->base); | 1261 | ret = nouveau_gr_init(&priv->base); |
1262 | if (ret) | 1262 | if (ret) |
1263 | return ret; | 1263 | return ret; |
1264 | 1264 | ||
@@ -1301,19 +1301,19 @@ nv10_graph_init(struct nouveau_object *object) | |||
1301 | } | 1301 | } |
1302 | 1302 | ||
1303 | static int | 1303 | static int |
1304 | nv10_graph_fini(struct nouveau_object *object, bool suspend) | 1304 | nv10_gr_fini(struct nouveau_object *object, bool suspend) |
1305 | { | 1305 | { |
1306 | struct nv10_graph_priv *priv = (void *)object; | 1306 | struct nv10_gr_priv *priv = (void *)object; |
1307 | return nouveau_graph_fini(&priv->base, suspend); | 1307 | return nouveau_gr_fini(&priv->base, suspend); |
1308 | } | 1308 | } |
1309 | 1309 | ||
1310 | struct nouveau_oclass | 1310 | struct nouveau_oclass |
1311 | nv10_graph_oclass = { | 1311 | nv10_gr_oclass = { |
1312 | .handle = NV_ENGINE(GR, 0x10), | 1312 | .handle = NV_ENGINE(GR, 0x10), |
1313 | .ofuncs = &(struct nouveau_ofuncs) { | 1313 | .ofuncs = &(struct nouveau_ofuncs) { |
1314 | .ctor = nv10_graph_ctor, | 1314 | .ctor = nv10_gr_ctor, |
1315 | .dtor = nv10_graph_dtor, | 1315 | .dtor = nv10_gr_dtor, |
1316 | .init = nv10_graph_init, | 1316 | .init = nv10_gr_init, |
1317 | .fini = nv10_graph_fini, | 1317 | .fini = nv10_gr_fini, |
1318 | }, | 1318 | }, |
1319 | }; | 1319 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv108.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv108.c index 2b0e8f48c029..669ee49ba58b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv108.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv108.c | |||
@@ -30,7 +30,7 @@ | |||
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | static struct nouveau_oclass | 32 | static struct nouveau_oclass |
33 | nv108_graph_sclass[] = { | 33 | nv108_gr_sclass[] = { |
34 | { 0x902d, &nouveau_object_ofuncs }, | 34 | { 0x902d, &nouveau_object_ofuncs }, |
35 | { 0xa140, &nouveau_object_ofuncs }, | 35 | { 0xa140, &nouveau_object_ofuncs }, |
36 | { KEPLER_B, &nvc0_fermi_ofuncs }, | 36 | { KEPLER_B, &nvc0_fermi_ofuncs }, |
@@ -42,8 +42,8 @@ nv108_graph_sclass[] = { | |||
42 | * PGRAPH register lists | 42 | * PGRAPH register lists |
43 | ******************************************************************************/ | 43 | ******************************************************************************/ |
44 | 44 | ||
45 | static const struct nvc0_graph_init | 45 | static const struct nvc0_gr_init |
46 | nv108_graph_init_main_0[] = { | 46 | nv108_gr_init_main_0[] = { |
47 | { 0x400080, 1, 0x04, 0x003083c2 }, | 47 | { 0x400080, 1, 0x04, 0x003083c2 }, |
48 | { 0x400088, 1, 0x04, 0x0001bfe7 }, | 48 | { 0x400088, 1, 0x04, 0x0001bfe7 }, |
49 | { 0x40008c, 1, 0x04, 0x00000000 }, | 49 | { 0x40008c, 1, 0x04, 0x00000000 }, |
@@ -58,8 +58,8 @@ nv108_graph_init_main_0[] = { | |||
58 | {} | 58 | {} |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static const struct nvc0_graph_init | 61 | static const struct nvc0_gr_init |
62 | nv108_graph_init_ds_0[] = { | 62 | nv108_gr_init_ds_0[] = { |
63 | { 0x405844, 1, 0x04, 0x00ffffff }, | 63 | { 0x405844, 1, 0x04, 0x00ffffff }, |
64 | { 0x405850, 1, 0x04, 0x00000000 }, | 64 | { 0x405850, 1, 0x04, 0x00000000 }, |
65 | { 0x405900, 1, 0x04, 0x00000000 }, | 65 | { 0x405900, 1, 0x04, 0x00000000 }, |
@@ -68,8 +68,8 @@ nv108_graph_init_ds_0[] = { | |||
68 | {} | 68 | {} |
69 | }; | 69 | }; |
70 | 70 | ||
71 | const struct nvc0_graph_init | 71 | const struct nvc0_gr_init |
72 | nv108_graph_init_gpc_unk_0[] = { | 72 | nv108_gr_init_gpc_unk_0[] = { |
73 | { 0x418604, 1, 0x04, 0x00000000 }, | 73 | { 0x418604, 1, 0x04, 0x00000000 }, |
74 | { 0x418680, 1, 0x04, 0x00000000 }, | 74 | { 0x418680, 1, 0x04, 0x00000000 }, |
75 | { 0x418714, 1, 0x04, 0x00000000 }, | 75 | { 0x418714, 1, 0x04, 0x00000000 }, |
@@ -77,16 +77,16 @@ nv108_graph_init_gpc_unk_0[] = { | |||
77 | {} | 77 | {} |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static const struct nvc0_graph_init | 80 | static const struct nvc0_gr_init |
81 | nv108_graph_init_setup_1[] = { | 81 | nv108_gr_init_setup_1[] = { |
82 | { 0x4188c8, 2, 0x04, 0x00000000 }, | 82 | { 0x4188c8, 2, 0x04, 0x00000000 }, |
83 | { 0x4188d0, 1, 0x04, 0x00010000 }, | 83 | { 0x4188d0, 1, 0x04, 0x00010000 }, |
84 | { 0x4188d4, 1, 0x04, 0x00000201 }, | 84 | { 0x4188d4, 1, 0x04, 0x00000201 }, |
85 | {} | 85 | {} |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static const struct nvc0_graph_init | 88 | static const struct nvc0_gr_init |
89 | nv108_graph_init_tex_0[] = { | 89 | nv108_gr_init_tex_0[] = { |
90 | { 0x419ab0, 1, 0x04, 0x00000000 }, | 90 | { 0x419ab0, 1, 0x04, 0x00000000 }, |
91 | { 0x419ac8, 1, 0x04, 0x00000000 }, | 91 | { 0x419ac8, 1, 0x04, 0x00000000 }, |
92 | { 0x419ab8, 1, 0x04, 0x000000e7 }, | 92 | { 0x419ab8, 1, 0x04, 0x000000e7 }, |
@@ -96,8 +96,8 @@ nv108_graph_init_tex_0[] = { | |||
96 | {} | 96 | {} |
97 | }; | 97 | }; |
98 | 98 | ||
99 | static const struct nvc0_graph_init | 99 | static const struct nvc0_gr_init |
100 | nv108_graph_init_l1c_0[] = { | 100 | nv108_gr_init_l1c_0[] = { |
101 | { 0x419c98, 1, 0x04, 0x00000000 }, | 101 | { 0x419c98, 1, 0x04, 0x00000000 }, |
102 | { 0x419ca8, 1, 0x04, 0x00000000 }, | 102 | { 0x419ca8, 1, 0x04, 0x00000000 }, |
103 | { 0x419cb0, 1, 0x04, 0x01000000 }, | 103 | { 0x419cb0, 1, 0x04, 0x01000000 }, |
@@ -111,37 +111,37 @@ nv108_graph_init_l1c_0[] = { | |||
111 | {} | 111 | {} |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static const struct nvc0_graph_pack | 114 | static const struct nvc0_gr_pack |
115 | nv108_graph_pack_mmio[] = { | 115 | nv108_gr_pack_mmio[] = { |
116 | { nv108_graph_init_main_0 }, | 116 | { nv108_gr_init_main_0 }, |
117 | { nvf0_graph_init_fe_0 }, | 117 | { nvf0_gr_init_fe_0 }, |
118 | { nvc0_graph_init_pri_0 }, | 118 | { nvc0_gr_init_pri_0 }, |
119 | { nvc0_graph_init_rstr2d_0 }, | 119 | { nvc0_gr_init_rstr2d_0 }, |
120 | { nvd9_graph_init_pd_0 }, | 120 | { nvd9_gr_init_pd_0 }, |
121 | { nv108_graph_init_ds_0 }, | 121 | { nv108_gr_init_ds_0 }, |
122 | { nvc0_graph_init_scc_0 }, | 122 | { nvc0_gr_init_scc_0 }, |
123 | { nvf0_graph_init_sked_0 }, | 123 | { nvf0_gr_init_sked_0 }, |
124 | { nvf0_graph_init_cwd_0 }, | 124 | { nvf0_gr_init_cwd_0 }, |
125 | { nvd9_graph_init_prop_0 }, | 125 | { nvd9_gr_init_prop_0 }, |
126 | { nv108_graph_init_gpc_unk_0 }, | 126 | { nv108_gr_init_gpc_unk_0 }, |
127 | { nvc0_graph_init_setup_0 }, | 127 | { nvc0_gr_init_setup_0 }, |
128 | { nvc0_graph_init_crstr_0 }, | 128 | { nvc0_gr_init_crstr_0 }, |
129 | { nv108_graph_init_setup_1 }, | 129 | { nv108_gr_init_setup_1 }, |
130 | { nvc0_graph_init_zcull_0 }, | 130 | { nvc0_gr_init_zcull_0 }, |
131 | { nvd9_graph_init_gpm_0 }, | 131 | { nvd9_gr_init_gpm_0 }, |
132 | { nvf0_graph_init_gpc_unk_1 }, | 132 | { nvf0_gr_init_gpc_unk_1 }, |
133 | { nvc0_graph_init_gcc_0 }, | 133 | { nvc0_gr_init_gcc_0 }, |
134 | { nve4_graph_init_tpccs_0 }, | 134 | { nve4_gr_init_tpccs_0 }, |
135 | { nv108_graph_init_tex_0 }, | 135 | { nv108_gr_init_tex_0 }, |
136 | { nve4_graph_init_pe_0 }, | 136 | { nve4_gr_init_pe_0 }, |
137 | { nv108_graph_init_l1c_0 }, | 137 | { nv108_gr_init_l1c_0 }, |
138 | { nvc0_graph_init_mpc_0 }, | 138 | { nvc0_gr_init_mpc_0 }, |
139 | { nvf0_graph_init_sm_0 }, | 139 | { nvf0_gr_init_sm_0 }, |
140 | { nvd7_graph_init_pes_0 }, | 140 | { nvd7_gr_init_pes_0 }, |
141 | { nvd7_graph_init_wwdx_0 }, | 141 | { nvd7_gr_init_wwdx_0 }, |
142 | { nvd7_graph_init_cbm_0 }, | 142 | { nvd7_gr_init_cbm_0 }, |
143 | { nve4_graph_init_be_0 }, | 143 | { nve4_gr_init_be_0 }, |
144 | { nvc0_graph_init_fe_1 }, | 144 | { nvc0_gr_init_fe_1 }, |
145 | {} | 145 | {} |
146 | }; | 146 | }; |
147 | 147 | ||
@@ -150,9 +150,9 @@ nv108_graph_pack_mmio[] = { | |||
150 | ******************************************************************************/ | 150 | ******************************************************************************/ |
151 | 151 | ||
152 | static int | 152 | static int |
153 | nv108_graph_fini(struct nouveau_object *object, bool suspend) | 153 | nv108_gr_fini(struct nouveau_object *object, bool suspend) |
154 | { | 154 | { |
155 | struct nvc0_graph_priv *priv = (void *)object; | 155 | struct nvc0_gr_priv *priv = (void *)object; |
156 | static const struct { | 156 | static const struct { |
157 | u32 addr; | 157 | u32 addr; |
158 | u32 data; | 158 | u32 data; |
@@ -183,13 +183,13 @@ nv108_graph_fini(struct nouveau_object *object, bool suspend) | |||
183 | nv_wait(priv, magic[i].addr, 0x80000000, 0x00000000); | 183 | nv_wait(priv, magic[i].addr, 0x80000000, 0x00000000); |
184 | } | 184 | } |
185 | 185 | ||
186 | return nouveau_graph_fini(&priv->base, suspend); | 186 | return nouveau_gr_fini(&priv->base, suspend); |
187 | } | 187 | } |
188 | 188 | ||
189 | #include "fuc/hubnv108.fuc5.h" | 189 | #include "fuc/hubnv108.fuc5.h" |
190 | 190 | ||
191 | static struct nvc0_graph_ucode | 191 | static struct nvc0_gr_ucode |
192 | nv108_graph_fecs_ucode = { | 192 | nv108_gr_fecs_ucode = { |
193 | .code.data = nv108_grhub_code, | 193 | .code.data = nv108_grhub_code, |
194 | .code.size = sizeof(nv108_grhub_code), | 194 | .code.size = sizeof(nv108_grhub_code), |
195 | .data.data = nv108_grhub_data, | 195 | .data.data = nv108_grhub_data, |
@@ -198,8 +198,8 @@ nv108_graph_fecs_ucode = { | |||
198 | 198 | ||
199 | #include "fuc/gpcnv108.fuc5.h" | 199 | #include "fuc/gpcnv108.fuc5.h" |
200 | 200 | ||
201 | static struct nvc0_graph_ucode | 201 | static struct nvc0_gr_ucode |
202 | nv108_graph_gpccs_ucode = { | 202 | nv108_gr_gpccs_ucode = { |
203 | .code.data = nv108_grgpc_code, | 203 | .code.data = nv108_grgpc_code, |
204 | .code.size = sizeof(nv108_grgpc_code), | 204 | .code.size = sizeof(nv108_grgpc_code), |
205 | .data.data = nv108_grgpc_data, | 205 | .data.data = nv108_grgpc_data, |
@@ -207,18 +207,18 @@ nv108_graph_gpccs_ucode = { | |||
207 | }; | 207 | }; |
208 | 208 | ||
209 | struct nouveau_oclass * | 209 | struct nouveau_oclass * |
210 | nv108_graph_oclass = &(struct nvc0_graph_oclass) { | 210 | nv108_gr_oclass = &(struct nvc0_gr_oclass) { |
211 | .base.handle = NV_ENGINE(GR, 0x08), | 211 | .base.handle = NV_ENGINE(GR, 0x08), |
212 | .base.ofuncs = &(struct nouveau_ofuncs) { | 212 | .base.ofuncs = &(struct nouveau_ofuncs) { |
213 | .ctor = nvc0_graph_ctor, | 213 | .ctor = nvc0_gr_ctor, |
214 | .dtor = nvc0_graph_dtor, | 214 | .dtor = nvc0_gr_dtor, |
215 | .init = nve4_graph_init, | 215 | .init = nve4_gr_init, |
216 | .fini = nv108_graph_fini, | 216 | .fini = nv108_gr_fini, |
217 | }, | 217 | }, |
218 | .cclass = &nv108_grctx_oclass, | 218 | .cclass = &nv108_grctx_oclass, |
219 | .sclass = nv108_graph_sclass, | 219 | .sclass = nv108_gr_sclass, |
220 | .mmio = nv108_graph_pack_mmio, | 220 | .mmio = nv108_gr_pack_mmio, |
221 | .fecs.ucode = &nv108_graph_fecs_ucode, | 221 | .fecs.ucode = &nv108_gr_fecs_ucode, |
222 | .gpccs.ucode = &nv108_graph_gpccs_ucode, | 222 | .gpccs.ucode = &nv108_gr_gpccs_ucode, |
223 | .ppc_nr = 1, | 223 | .ppc_nr = 1, |
224 | }.base; | 224 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv20.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c index ceb9c746d94e..8caf0c338425 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv20.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <subdev/timer.h> | 7 | #include <subdev/timer.h> |
8 | #include <subdev/fb.h> | 8 | #include <subdev/fb.h> |
9 | 9 | ||
10 | #include <engine/graph.h> | 10 | #include <engine/gr.h> |
11 | #include <engine/fifo.h> | 11 | #include <engine/fifo.h> |
12 | 12 | ||
13 | #include "nv20.h" | 13 | #include "nv20.h" |
@@ -18,22 +18,22 @@ | |||
18 | ******************************************************************************/ | 18 | ******************************************************************************/ |
19 | 19 | ||
20 | static struct nouveau_oclass | 20 | static struct nouveau_oclass |
21 | nv20_graph_sclass[] = { | 21 | nv20_gr_sclass[] = { |
22 | { 0x0012, &nv04_graph_ofuncs, NULL }, /* beta1 */ | 22 | { 0x0012, &nv04_gr_ofuncs, NULL }, /* beta1 */ |
23 | { 0x0019, &nv04_graph_ofuncs, NULL }, /* clip */ | 23 | { 0x0019, &nv04_gr_ofuncs, NULL }, /* clip */ |
24 | { 0x0030, &nv04_graph_ofuncs, NULL }, /* null */ | 24 | { 0x0030, &nv04_gr_ofuncs, NULL }, /* null */ |
25 | { 0x0039, &nv04_graph_ofuncs, NULL }, /* m2mf */ | 25 | { 0x0039, &nv04_gr_ofuncs, NULL }, /* m2mf */ |
26 | { 0x0043, &nv04_graph_ofuncs, NULL }, /* rop */ | 26 | { 0x0043, &nv04_gr_ofuncs, NULL }, /* rop */ |
27 | { 0x0044, &nv04_graph_ofuncs, NULL }, /* patt */ | 27 | { 0x0044, &nv04_gr_ofuncs, NULL }, /* patt */ |
28 | { 0x004a, &nv04_graph_ofuncs, NULL }, /* gdi */ | 28 | { 0x004a, &nv04_gr_ofuncs, NULL }, /* gdi */ |
29 | { 0x0062, &nv04_graph_ofuncs, NULL }, /* surf2d */ | 29 | { 0x0062, &nv04_gr_ofuncs, NULL }, /* surf2d */ |
30 | { 0x0072, &nv04_graph_ofuncs, NULL }, /* beta4 */ | 30 | { 0x0072, &nv04_gr_ofuncs, NULL }, /* beta4 */ |
31 | { 0x0089, &nv04_graph_ofuncs, NULL }, /* sifm */ | 31 | { 0x0089, &nv04_gr_ofuncs, NULL }, /* sifm */ |
32 | { 0x008a, &nv04_graph_ofuncs, NULL }, /* ifc */ | 32 | { 0x008a, &nv04_gr_ofuncs, NULL }, /* ifc */ |
33 | { 0x0096, &nv04_graph_ofuncs, NULL }, /* celcius */ | 33 | { 0x0096, &nv04_gr_ofuncs, NULL }, /* celcius */ |
34 | { 0x0097, &nv04_graph_ofuncs, NULL }, /* kelvin */ | 34 | { 0x0097, &nv04_gr_ofuncs, NULL }, /* kelvin */ |
35 | { 0x009e, &nv04_graph_ofuncs, NULL }, /* swzsurf */ | 35 | { 0x009e, &nv04_gr_ofuncs, NULL }, /* swzsurf */ |
36 | { 0x009f, &nv04_graph_ofuncs, NULL }, /* imageblit */ | 36 | { 0x009f, &nv04_gr_ofuncs, NULL }, /* imageblit */ |
37 | {}, | 37 | {}, |
38 | }; | 38 | }; |
39 | 39 | ||
@@ -42,15 +42,15 @@ nv20_graph_sclass[] = { | |||
42 | ******************************************************************************/ | 42 | ******************************************************************************/ |
43 | 43 | ||
44 | static int | 44 | static int |
45 | nv20_graph_context_ctor(struct nouveau_object *parent, | 45 | nv20_gr_context_ctor(struct nouveau_object *parent, |
46 | struct nouveau_object *engine, | 46 | struct nouveau_object *engine, |
47 | struct nouveau_oclass *oclass, void *data, u32 size, | 47 | struct nouveau_oclass *oclass, void *data, u32 size, |
48 | struct nouveau_object **pobject) | 48 | struct nouveau_object **pobject) |
49 | { | 49 | { |
50 | struct nv20_graph_chan *chan; | 50 | struct nv20_gr_chan *chan; |
51 | int ret, i; | 51 | int ret, i; |
52 | 52 | ||
53 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, | 53 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, |
54 | 0x37f0, 16, NVOBJ_FLAG_ZERO_ALLOC, | 54 | 0x37f0, 16, NVOBJ_FLAG_ZERO_ALLOC, |
55 | &chan); | 55 | &chan); |
56 | *pobject = nv_object(chan); | 56 | *pobject = nv_object(chan); |
@@ -107,13 +107,13 @@ nv20_graph_context_ctor(struct nouveau_object *parent, | |||
107 | } | 107 | } |
108 | 108 | ||
109 | int | 109 | int |
110 | nv20_graph_context_init(struct nouveau_object *object) | 110 | nv20_gr_context_init(struct nouveau_object *object) |
111 | { | 111 | { |
112 | struct nv20_graph_priv *priv = (void *)object->engine; | 112 | struct nv20_gr_priv *priv = (void *)object->engine; |
113 | struct nv20_graph_chan *chan = (void *)object; | 113 | struct nv20_gr_chan *chan = (void *)object; |
114 | int ret; | 114 | int ret; |
115 | 115 | ||
116 | ret = nouveau_graph_context_init(&chan->base); | 116 | ret = nouveau_gr_context_init(&chan->base); |
117 | if (ret) | 117 | if (ret) |
118 | return ret; | 118 | return ret; |
119 | 119 | ||
@@ -122,10 +122,10 @@ nv20_graph_context_init(struct nouveau_object *object) | |||
122 | } | 122 | } |
123 | 123 | ||
124 | int | 124 | int |
125 | nv20_graph_context_fini(struct nouveau_object *object, bool suspend) | 125 | nv20_gr_context_fini(struct nouveau_object *object, bool suspend) |
126 | { | 126 | { |
127 | struct nv20_graph_priv *priv = (void *)object->engine; | 127 | struct nv20_gr_priv *priv = (void *)object->engine; |
128 | struct nv20_graph_chan *chan = (void *)object; | 128 | struct nv20_gr_chan *chan = (void *)object; |
129 | int chid = -1; | 129 | int chid = -1; |
130 | 130 | ||
131 | nv_mask(priv, 0x400720, 0x00000001, 0x00000000); | 131 | nv_mask(priv, 0x400720, 0x00000001, 0x00000000); |
@@ -141,19 +141,19 @@ nv20_graph_context_fini(struct nouveau_object *object, bool suspend) | |||
141 | nv_mask(priv, 0x400720, 0x00000001, 0x00000001); | 141 | nv_mask(priv, 0x400720, 0x00000001, 0x00000001); |
142 | 142 | ||
143 | nv_wo32(priv->ctxtab, chan->chid * 4, 0x00000000); | 143 | nv_wo32(priv->ctxtab, chan->chid * 4, 0x00000000); |
144 | return nouveau_graph_context_fini(&chan->base, suspend); | 144 | return nouveau_gr_context_fini(&chan->base, suspend); |
145 | } | 145 | } |
146 | 146 | ||
147 | static struct nouveau_oclass | 147 | static struct nouveau_oclass |
148 | nv20_graph_cclass = { | 148 | nv20_gr_cclass = { |
149 | .handle = NV_ENGCTX(GR, 0x20), | 149 | .handle = NV_ENGCTX(GR, 0x20), |
150 | .ofuncs = &(struct nouveau_ofuncs) { | 150 | .ofuncs = &(struct nouveau_ofuncs) { |
151 | .ctor = nv20_graph_context_ctor, | 151 | .ctor = nv20_gr_context_ctor, |
152 | .dtor = _nouveau_graph_context_dtor, | 152 | .dtor = _nouveau_gr_context_dtor, |
153 | .init = nv20_graph_context_init, | 153 | .init = nv20_gr_context_init, |
154 | .fini = nv20_graph_context_fini, | 154 | .fini = nv20_gr_context_fini, |
155 | .rd32 = _nouveau_graph_context_rd32, | 155 | .rd32 = _nouveau_gr_context_rd32, |
156 | .wr32 = _nouveau_graph_context_wr32, | 156 | .wr32 = _nouveau_gr_context_wr32, |
157 | }, | 157 | }, |
158 | }; | 158 | }; |
159 | 159 | ||
@@ -162,15 +162,15 @@ nv20_graph_cclass = { | |||
162 | ******************************************************************************/ | 162 | ******************************************************************************/ |
163 | 163 | ||
164 | void | 164 | void |
165 | nv20_graph_tile_prog(struct nouveau_engine *engine, int i) | 165 | nv20_gr_tile_prog(struct nouveau_engine *engine, int i) |
166 | { | 166 | { |
167 | struct nouveau_fb_tile *tile = &nouveau_fb(engine)->tile.region[i]; | 167 | struct nouveau_fb_tile *tile = &nouveau_fb(engine)->tile.region[i]; |
168 | struct nouveau_fifo *pfifo = nouveau_fifo(engine); | 168 | struct nouveau_fifo *pfifo = nouveau_fifo(engine); |
169 | struct nv20_graph_priv *priv = (void *)engine; | 169 | struct nv20_gr_priv *priv = (void *)engine; |
170 | unsigned long flags; | 170 | unsigned long flags; |
171 | 171 | ||
172 | pfifo->pause(pfifo, &flags); | 172 | pfifo->pause(pfifo, &flags); |
173 | nv04_graph_idle(priv); | 173 | nv04_gr_idle(priv); |
174 | 174 | ||
175 | nv_wr32(priv, NV20_PGRAPH_TLIMIT(i), tile->limit); | 175 | nv_wr32(priv, NV20_PGRAPH_TLIMIT(i), tile->limit); |
176 | nv_wr32(priv, NV20_PGRAPH_TSIZE(i), tile->pitch); | 176 | nv_wr32(priv, NV20_PGRAPH_TSIZE(i), tile->pitch); |
@@ -193,12 +193,12 @@ nv20_graph_tile_prog(struct nouveau_engine *engine, int i) | |||
193 | } | 193 | } |
194 | 194 | ||
195 | void | 195 | void |
196 | nv20_graph_intr(struct nouveau_subdev *subdev) | 196 | nv20_gr_intr(struct nouveau_subdev *subdev) |
197 | { | 197 | { |
198 | struct nouveau_engine *engine = nv_engine(subdev); | 198 | struct nouveau_engine *engine = nv_engine(subdev); |
199 | struct nouveau_object *engctx; | 199 | struct nouveau_object *engctx; |
200 | struct nouveau_handle *handle; | 200 | struct nouveau_handle *handle; |
201 | struct nv20_graph_priv *priv = (void *)subdev; | 201 | struct nv20_gr_priv *priv = (void *)subdev; |
202 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); | 202 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); |
203 | u32 nsource = nv_rd32(priv, NV03_PGRAPH_NSOURCE); | 203 | u32 nsource = nv_rd32(priv, NV03_PGRAPH_NSOURCE); |
204 | u32 nstatus = nv_rd32(priv, NV03_PGRAPH_NSTATUS); | 204 | u32 nstatus = nv_rd32(priv, NV03_PGRAPH_NSTATUS); |
@@ -225,11 +225,11 @@ nv20_graph_intr(struct nouveau_subdev *subdev) | |||
225 | 225 | ||
226 | if (show) { | 226 | if (show) { |
227 | nv_error(priv, "%s", ""); | 227 | nv_error(priv, "%s", ""); |
228 | nouveau_bitfield_print(nv10_graph_intr_name, show); | 228 | nouveau_bitfield_print(nv10_gr_intr_name, show); |
229 | pr_cont(" nsource:"); | 229 | pr_cont(" nsource:"); |
230 | nouveau_bitfield_print(nv04_graph_nsource, nsource); | 230 | nouveau_bitfield_print(nv04_gr_nsource, nsource); |
231 | pr_cont(" nstatus:"); | 231 | pr_cont(" nstatus:"); |
232 | nouveau_bitfield_print(nv10_graph_nstatus, nstatus); | 232 | nouveau_bitfield_print(nv10_gr_nstatus, nstatus); |
233 | pr_cont("\n"); | 233 | pr_cont("\n"); |
234 | nv_error(priv, | 234 | nv_error(priv, |
235 | "ch %d [%s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", | 235 | "ch %d [%s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", |
@@ -241,14 +241,14 @@ nv20_graph_intr(struct nouveau_subdev *subdev) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | static int | 243 | static int |
244 | nv20_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 244 | nv20_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
245 | struct nouveau_oclass *oclass, void *data, u32 size, | 245 | struct nouveau_oclass *oclass, void *data, u32 size, |
246 | struct nouveau_object **pobject) | 246 | struct nouveau_object **pobject) |
247 | { | 247 | { |
248 | struct nv20_graph_priv *priv; | 248 | struct nv20_gr_priv *priv; |
249 | int ret; | 249 | int ret; |
250 | 250 | ||
251 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 251 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
252 | *pobject = nv_object(priv); | 252 | *pobject = nv_object(priv); |
253 | if (ret) | 253 | if (ret) |
254 | return ret; | 254 | return ret; |
@@ -259,31 +259,31 @@ nv20_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
259 | return ret; | 259 | return ret; |
260 | 260 | ||
261 | nv_subdev(priv)->unit = 0x00001000; | 261 | nv_subdev(priv)->unit = 0x00001000; |
262 | nv_subdev(priv)->intr = nv20_graph_intr; | 262 | nv_subdev(priv)->intr = nv20_gr_intr; |
263 | nv_engine(priv)->cclass = &nv20_graph_cclass; | 263 | nv_engine(priv)->cclass = &nv20_gr_cclass; |
264 | nv_engine(priv)->sclass = nv20_graph_sclass; | 264 | nv_engine(priv)->sclass = nv20_gr_sclass; |
265 | nv_engine(priv)->tile_prog = nv20_graph_tile_prog; | 265 | nv_engine(priv)->tile_prog = nv20_gr_tile_prog; |
266 | return 0; | 266 | return 0; |
267 | } | 267 | } |
268 | 268 | ||
269 | void | 269 | void |
270 | nv20_graph_dtor(struct nouveau_object *object) | 270 | nv20_gr_dtor(struct nouveau_object *object) |
271 | { | 271 | { |
272 | struct nv20_graph_priv *priv = (void *)object; | 272 | struct nv20_gr_priv *priv = (void *)object; |
273 | nouveau_gpuobj_ref(NULL, &priv->ctxtab); | 273 | nouveau_gpuobj_ref(NULL, &priv->ctxtab); |
274 | nouveau_graph_destroy(&priv->base); | 274 | nouveau_gr_destroy(&priv->base); |
275 | } | 275 | } |
276 | 276 | ||
277 | int | 277 | int |
278 | nv20_graph_init(struct nouveau_object *object) | 278 | nv20_gr_init(struct nouveau_object *object) |
279 | { | 279 | { |
280 | struct nouveau_engine *engine = nv_engine(object); | 280 | struct nouveau_engine *engine = nv_engine(object); |
281 | struct nv20_graph_priv *priv = (void *)engine; | 281 | struct nv20_gr_priv *priv = (void *)engine; |
282 | struct nouveau_fb *pfb = nouveau_fb(object); | 282 | struct nouveau_fb *pfb = nouveau_fb(object); |
283 | u32 tmp, vramsz; | 283 | u32 tmp, vramsz; |
284 | int ret, i; | 284 | int ret, i; |
285 | 285 | ||
286 | ret = nouveau_graph_init(&priv->base); | 286 | ret = nouveau_gr_init(&priv->base); |
287 | if (ret) | 287 | if (ret) |
288 | return ret; | 288 | return ret; |
289 | 289 | ||
@@ -372,12 +372,12 @@ nv20_graph_init(struct nouveau_object *object) | |||
372 | } | 372 | } |
373 | 373 | ||
374 | struct nouveau_oclass | 374 | struct nouveau_oclass |
375 | nv20_graph_oclass = { | 375 | nv20_gr_oclass = { |
376 | .handle = NV_ENGINE(GR, 0x20), | 376 | .handle = NV_ENGINE(GR, 0x20), |
377 | .ofuncs = &(struct nouveau_ofuncs) { | 377 | .ofuncs = &(struct nouveau_ofuncs) { |
378 | .ctor = nv20_graph_ctor, | 378 | .ctor = nv20_gr_ctor, |
379 | .dtor = nv20_graph_dtor, | 379 | .dtor = nv20_gr_dtor, |
380 | .init = nv20_graph_init, | 380 | .init = nv20_gr_init, |
381 | .fini = _nouveau_graph_fini, | 381 | .fini = _nouveau_gr_fini, |
382 | }, | 382 | }, |
383 | }; | 383 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h new file mode 100644 index 000000000000..9019eea4a613 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef __NV20_GR_H__ | ||
2 | #define __NV20_GR_H__ | ||
3 | |||
4 | #include <core/enum.h> | ||
5 | |||
6 | #include <engine/gr.h> | ||
7 | #include <engine/fifo.h> | ||
8 | |||
9 | struct nv20_gr_priv { | ||
10 | struct nouveau_gr base; | ||
11 | struct nouveau_gpuobj *ctxtab; | ||
12 | }; | ||
13 | |||
14 | struct nv20_gr_chan { | ||
15 | struct nouveau_gr_chan base; | ||
16 | int chid; | ||
17 | }; | ||
18 | |||
19 | extern struct nouveau_oclass nv25_gr_sclass[]; | ||
20 | int nv20_gr_context_init(struct nouveau_object *); | ||
21 | int nv20_gr_context_fini(struct nouveau_object *, bool); | ||
22 | |||
23 | void nv20_gr_tile_prog(struct nouveau_engine *, int); | ||
24 | void nv20_gr_intr(struct nouveau_subdev *); | ||
25 | |||
26 | void nv20_gr_dtor(struct nouveau_object *); | ||
27 | int nv20_gr_init(struct nouveau_object *); | ||
28 | |||
29 | int nv30_gr_init(struct nouveau_object *); | ||
30 | |||
31 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv25.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c index f8a6fdd7d5e8..903a2ec361ce 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv25.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv25.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <subdev/timer.h> | 5 | #include <subdev/timer.h> |
6 | #include <subdev/fb.h> | 6 | #include <subdev/fb.h> |
7 | 7 | ||
8 | #include <engine/graph.h> | 8 | #include <engine/gr.h> |
9 | 9 | ||
10 | #include "nv20.h" | 10 | #include "nv20.h" |
11 | #include "regs.h" | 11 | #include "regs.h" |
@@ -15,22 +15,22 @@ | |||
15 | ******************************************************************************/ | 15 | ******************************************************************************/ |
16 | 16 | ||
17 | struct nouveau_oclass | 17 | struct nouveau_oclass |
18 | nv25_graph_sclass[] = { | 18 | nv25_gr_sclass[] = { |
19 | { 0x0012, &nv04_graph_ofuncs, NULL }, /* beta1 */ | 19 | { 0x0012, &nv04_gr_ofuncs, NULL }, /* beta1 */ |
20 | { 0x0019, &nv04_graph_ofuncs, NULL }, /* clip */ | 20 | { 0x0019, &nv04_gr_ofuncs, NULL }, /* clip */ |
21 | { 0x0030, &nv04_graph_ofuncs, NULL }, /* null */ | 21 | { 0x0030, &nv04_gr_ofuncs, NULL }, /* null */ |
22 | { 0x0039, &nv04_graph_ofuncs, NULL }, /* m2mf */ | 22 | { 0x0039, &nv04_gr_ofuncs, NULL }, /* m2mf */ |
23 | { 0x0043, &nv04_graph_ofuncs, NULL }, /* rop */ | 23 | { 0x0043, &nv04_gr_ofuncs, NULL }, /* rop */ |
24 | { 0x0044, &nv04_graph_ofuncs, NULL }, /* patt */ | 24 | { 0x0044, &nv04_gr_ofuncs, NULL }, /* patt */ |
25 | { 0x004a, &nv04_graph_ofuncs, NULL }, /* gdi */ | 25 | { 0x004a, &nv04_gr_ofuncs, NULL }, /* gdi */ |
26 | { 0x0062, &nv04_graph_ofuncs, NULL }, /* surf2d */ | 26 | { 0x0062, &nv04_gr_ofuncs, NULL }, /* surf2d */ |
27 | { 0x0072, &nv04_graph_ofuncs, NULL }, /* beta4 */ | 27 | { 0x0072, &nv04_gr_ofuncs, NULL }, /* beta4 */ |
28 | { 0x0089, &nv04_graph_ofuncs, NULL }, /* sifm */ | 28 | { 0x0089, &nv04_gr_ofuncs, NULL }, /* sifm */ |
29 | { 0x008a, &nv04_graph_ofuncs, NULL }, /* ifc */ | 29 | { 0x008a, &nv04_gr_ofuncs, NULL }, /* ifc */ |
30 | { 0x0096, &nv04_graph_ofuncs, NULL }, /* celcius */ | 30 | { 0x0096, &nv04_gr_ofuncs, NULL }, /* celcius */ |
31 | { 0x009e, &nv04_graph_ofuncs, NULL }, /* swzsurf */ | 31 | { 0x009e, &nv04_gr_ofuncs, NULL }, /* swzsurf */ |
32 | { 0x009f, &nv04_graph_ofuncs, NULL }, /* imageblit */ | 32 | { 0x009f, &nv04_gr_ofuncs, NULL }, /* imageblit */ |
33 | { 0x0597, &nv04_graph_ofuncs, NULL }, /* kelvin */ | 33 | { 0x0597, &nv04_gr_ofuncs, NULL }, /* kelvin */ |
34 | {}, | 34 | {}, |
35 | }; | 35 | }; |
36 | 36 | ||
@@ -39,15 +39,15 @@ nv25_graph_sclass[] = { | |||
39 | ******************************************************************************/ | 39 | ******************************************************************************/ |
40 | 40 | ||
41 | static int | 41 | static int |
42 | nv25_graph_context_ctor(struct nouveau_object *parent, | 42 | nv25_gr_context_ctor(struct nouveau_object *parent, |
43 | struct nouveau_object *engine, | 43 | struct nouveau_object *engine, |
44 | struct nouveau_oclass *oclass, void *data, u32 size, | 44 | struct nouveau_oclass *oclass, void *data, u32 size, |
45 | struct nouveau_object **pobject) | 45 | struct nouveau_object **pobject) |
46 | { | 46 | { |
47 | struct nv20_graph_chan *chan; | 47 | struct nv20_gr_chan *chan; |
48 | int ret, i; | 48 | int ret, i; |
49 | 49 | ||
50 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, 0x3724, | 50 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, 0x3724, |
51 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); | 51 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); |
52 | *pobject = nv_object(chan); | 52 | *pobject = nv_object(chan); |
53 | if (ret) | 53 | if (ret) |
@@ -112,15 +112,15 @@ nv25_graph_context_ctor(struct nouveau_object *parent, | |||
112 | } | 112 | } |
113 | 113 | ||
114 | static struct nouveau_oclass | 114 | static struct nouveau_oclass |
115 | nv25_graph_cclass = { | 115 | nv25_gr_cclass = { |
116 | .handle = NV_ENGCTX(GR, 0x25), | 116 | .handle = NV_ENGCTX(GR, 0x25), |
117 | .ofuncs = &(struct nouveau_ofuncs) { | 117 | .ofuncs = &(struct nouveau_ofuncs) { |
118 | .ctor = nv25_graph_context_ctor, | 118 | .ctor = nv25_gr_context_ctor, |
119 | .dtor = _nouveau_graph_context_dtor, | 119 | .dtor = _nouveau_gr_context_dtor, |
120 | .init = nv20_graph_context_init, | 120 | .init = nv20_gr_context_init, |
121 | .fini = nv20_graph_context_fini, | 121 | .fini = nv20_gr_context_fini, |
122 | .rd32 = _nouveau_graph_context_rd32, | 122 | .rd32 = _nouveau_gr_context_rd32, |
123 | .wr32 = _nouveau_graph_context_wr32, | 123 | .wr32 = _nouveau_gr_context_wr32, |
124 | }, | 124 | }, |
125 | }; | 125 | }; |
126 | 126 | ||
@@ -129,14 +129,14 @@ nv25_graph_cclass = { | |||
129 | ******************************************************************************/ | 129 | ******************************************************************************/ |
130 | 130 | ||
131 | static int | 131 | static int |
132 | nv25_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 132 | nv25_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
133 | struct nouveau_oclass *oclass, void *data, u32 size, | 133 | struct nouveau_oclass *oclass, void *data, u32 size, |
134 | struct nouveau_object **pobject) | 134 | struct nouveau_object **pobject) |
135 | { | 135 | { |
136 | struct nv20_graph_priv *priv; | 136 | struct nv20_gr_priv *priv; |
137 | int ret; | 137 | int ret; |
138 | 138 | ||
139 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 139 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
140 | *pobject = nv_object(priv); | 140 | *pobject = nv_object(priv); |
141 | if (ret) | 141 | if (ret) |
142 | return ret; | 142 | return ret; |
@@ -147,20 +147,20 @@ nv25_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
147 | return ret; | 147 | return ret; |
148 | 148 | ||
149 | nv_subdev(priv)->unit = 0x00001000; | 149 | nv_subdev(priv)->unit = 0x00001000; |
150 | nv_subdev(priv)->intr = nv20_graph_intr; | 150 | nv_subdev(priv)->intr = nv20_gr_intr; |
151 | nv_engine(priv)->cclass = &nv25_graph_cclass; | 151 | nv_engine(priv)->cclass = &nv25_gr_cclass; |
152 | nv_engine(priv)->sclass = nv25_graph_sclass; | 152 | nv_engine(priv)->sclass = nv25_gr_sclass; |
153 | nv_engine(priv)->tile_prog = nv20_graph_tile_prog; | 153 | nv_engine(priv)->tile_prog = nv20_gr_tile_prog; |
154 | return 0; | 154 | return 0; |
155 | } | 155 | } |
156 | 156 | ||
157 | struct nouveau_oclass | 157 | struct nouveau_oclass |
158 | nv25_graph_oclass = { | 158 | nv25_gr_oclass = { |
159 | .handle = NV_ENGINE(GR, 0x25), | 159 | .handle = NV_ENGINE(GR, 0x25), |
160 | .ofuncs = &(struct nouveau_ofuncs) { | 160 | .ofuncs = &(struct nouveau_ofuncs) { |
161 | .ctor = nv25_graph_ctor, | 161 | .ctor = nv25_gr_ctor, |
162 | .dtor = nv20_graph_dtor, | 162 | .dtor = nv20_gr_dtor, |
163 | .init = nv20_graph_init, | 163 | .init = nv20_gr_init, |
164 | .fini = _nouveau_graph_fini, | 164 | .fini = _nouveau_gr_fini, |
165 | }, | 165 | }, |
166 | }; | 166 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv2a.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c index 5de9caa2ef67..e31f6c766729 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv2a.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv2a.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <subdev/timer.h> | 5 | #include <subdev/timer.h> |
6 | #include <subdev/fb.h> | 6 | #include <subdev/fb.h> |
7 | 7 | ||
8 | #include <engine/graph.h> | 8 | #include <engine/gr.h> |
9 | 9 | ||
10 | #include "nv20.h" | 10 | #include "nv20.h" |
11 | #include "regs.h" | 11 | #include "regs.h" |
@@ -15,15 +15,15 @@ | |||
15 | ******************************************************************************/ | 15 | ******************************************************************************/ |
16 | 16 | ||
17 | static int | 17 | static int |
18 | nv2a_graph_context_ctor(struct nouveau_object *parent, | 18 | nv2a_gr_context_ctor(struct nouveau_object *parent, |
19 | struct nouveau_object *engine, | 19 | struct nouveau_object *engine, |
20 | struct nouveau_oclass *oclass, void *data, u32 size, | 20 | struct nouveau_oclass *oclass, void *data, u32 size, |
21 | struct nouveau_object **pobject) | 21 | struct nouveau_object **pobject) |
22 | { | 22 | { |
23 | struct nv20_graph_chan *chan; | 23 | struct nv20_gr_chan *chan; |
24 | int ret, i; | 24 | int ret, i; |
25 | 25 | ||
26 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, 0x36b0, | 26 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, 0x36b0, |
27 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); | 27 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); |
28 | *pobject = nv_object(chan); | 28 | *pobject = nv_object(chan); |
29 | if (ret) | 29 | if (ret) |
@@ -79,15 +79,15 @@ nv2a_graph_context_ctor(struct nouveau_object *parent, | |||
79 | } | 79 | } |
80 | 80 | ||
81 | static struct nouveau_oclass | 81 | static struct nouveau_oclass |
82 | nv2a_graph_cclass = { | 82 | nv2a_gr_cclass = { |
83 | .handle = NV_ENGCTX(GR, 0x2a), | 83 | .handle = NV_ENGCTX(GR, 0x2a), |
84 | .ofuncs = &(struct nouveau_ofuncs) { | 84 | .ofuncs = &(struct nouveau_ofuncs) { |
85 | .ctor = nv2a_graph_context_ctor, | 85 | .ctor = nv2a_gr_context_ctor, |
86 | .dtor = _nouveau_graph_context_dtor, | 86 | .dtor = _nouveau_gr_context_dtor, |
87 | .init = nv20_graph_context_init, | 87 | .init = nv20_gr_context_init, |
88 | .fini = nv20_graph_context_fini, | 88 | .fini = nv20_gr_context_fini, |
89 | .rd32 = _nouveau_graph_context_rd32, | 89 | .rd32 = _nouveau_gr_context_rd32, |
90 | .wr32 = _nouveau_graph_context_wr32, | 90 | .wr32 = _nouveau_gr_context_wr32, |
91 | }, | 91 | }, |
92 | }; | 92 | }; |
93 | 93 | ||
@@ -96,14 +96,14 @@ nv2a_graph_cclass = { | |||
96 | ******************************************************************************/ | 96 | ******************************************************************************/ |
97 | 97 | ||
98 | static int | 98 | static int |
99 | nv2a_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 99 | nv2a_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
100 | struct nouveau_oclass *oclass, void *data, u32 size, | 100 | struct nouveau_oclass *oclass, void *data, u32 size, |
101 | struct nouveau_object **pobject) | 101 | struct nouveau_object **pobject) |
102 | { | 102 | { |
103 | struct nv20_graph_priv *priv; | 103 | struct nv20_gr_priv *priv; |
104 | int ret; | 104 | int ret; |
105 | 105 | ||
106 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 106 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
107 | *pobject = nv_object(priv); | 107 | *pobject = nv_object(priv); |
108 | if (ret) | 108 | if (ret) |
109 | return ret; | 109 | return ret; |
@@ -114,20 +114,20 @@ nv2a_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
114 | return ret; | 114 | return ret; |
115 | 115 | ||
116 | nv_subdev(priv)->unit = 0x00001000; | 116 | nv_subdev(priv)->unit = 0x00001000; |
117 | nv_subdev(priv)->intr = nv20_graph_intr; | 117 | nv_subdev(priv)->intr = nv20_gr_intr; |
118 | nv_engine(priv)->cclass = &nv2a_graph_cclass; | 118 | nv_engine(priv)->cclass = &nv2a_gr_cclass; |
119 | nv_engine(priv)->sclass = nv25_graph_sclass; | 119 | nv_engine(priv)->sclass = nv25_gr_sclass; |
120 | nv_engine(priv)->tile_prog = nv20_graph_tile_prog; | 120 | nv_engine(priv)->tile_prog = nv20_gr_tile_prog; |
121 | return 0; | 121 | return 0; |
122 | } | 122 | } |
123 | 123 | ||
124 | struct nouveau_oclass | 124 | struct nouveau_oclass |
125 | nv2a_graph_oclass = { | 125 | nv2a_gr_oclass = { |
126 | .handle = NV_ENGINE(GR, 0x2a), | 126 | .handle = NV_ENGINE(GR, 0x2a), |
127 | .ofuncs = &(struct nouveau_ofuncs) { | 127 | .ofuncs = &(struct nouveau_ofuncs) { |
128 | .ctor = nv2a_graph_ctor, | 128 | .ctor = nv2a_gr_ctor, |
129 | .dtor = nv20_graph_dtor, | 129 | .dtor = nv20_gr_dtor, |
130 | .init = nv20_graph_init, | 130 | .init = nv20_gr_init, |
131 | .fini = _nouveau_graph_fini, | 131 | .fini = _nouveau_gr_fini, |
132 | }, | 132 | }, |
133 | }; | 133 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv30.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c index 2f9dbc709389..d9d85508cbcf 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv30.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <subdev/timer.h> | 5 | #include <subdev/timer.h> |
6 | #include <subdev/fb.h> | 6 | #include <subdev/fb.h> |
7 | 7 | ||
8 | #include <engine/graph.h> | 8 | #include <engine/gr.h> |
9 | 9 | ||
10 | #include "nv20.h" | 10 | #include "nv20.h" |
11 | #include "regs.h" | 11 | #include "regs.h" |
@@ -15,24 +15,24 @@ | |||
15 | ******************************************************************************/ | 15 | ******************************************************************************/ |
16 | 16 | ||
17 | static struct nouveau_oclass | 17 | static struct nouveau_oclass |
18 | nv30_graph_sclass[] = { | 18 | nv30_gr_sclass[] = { |
19 | { 0x0012, &nv04_graph_ofuncs, NULL }, /* beta1 */ | 19 | { 0x0012, &nv04_gr_ofuncs, NULL }, /* beta1 */ |
20 | { 0x0019, &nv04_graph_ofuncs, NULL }, /* clip */ | 20 | { 0x0019, &nv04_gr_ofuncs, NULL }, /* clip */ |
21 | { 0x0030, &nv04_graph_ofuncs, NULL }, /* null */ | 21 | { 0x0030, &nv04_gr_ofuncs, NULL }, /* null */ |
22 | { 0x0039, &nv04_graph_ofuncs, NULL }, /* m2mf */ | 22 | { 0x0039, &nv04_gr_ofuncs, NULL }, /* m2mf */ |
23 | { 0x0043, &nv04_graph_ofuncs, NULL }, /* rop */ | 23 | { 0x0043, &nv04_gr_ofuncs, NULL }, /* rop */ |
24 | { 0x0044, &nv04_graph_ofuncs, NULL }, /* patt */ | 24 | { 0x0044, &nv04_gr_ofuncs, NULL }, /* patt */ |
25 | { 0x004a, &nv04_graph_ofuncs, NULL }, /* gdi */ | 25 | { 0x004a, &nv04_gr_ofuncs, NULL }, /* gdi */ |
26 | { 0x0062, &nv04_graph_ofuncs, NULL }, /* surf2d */ | 26 | { 0x0062, &nv04_gr_ofuncs, NULL }, /* surf2d */ |
27 | { 0x0072, &nv04_graph_ofuncs, NULL }, /* beta4 */ | 27 | { 0x0072, &nv04_gr_ofuncs, NULL }, /* beta4 */ |
28 | { 0x0089, &nv04_graph_ofuncs, NULL }, /* sifm */ | 28 | { 0x0089, &nv04_gr_ofuncs, NULL }, /* sifm */ |
29 | { 0x008a, &nv04_graph_ofuncs, NULL }, /* ifc */ | 29 | { 0x008a, &nv04_gr_ofuncs, NULL }, /* ifc */ |
30 | { 0x009f, &nv04_graph_ofuncs, NULL }, /* imageblit */ | 30 | { 0x009f, &nv04_gr_ofuncs, NULL }, /* imageblit */ |
31 | { 0x0362, &nv04_graph_ofuncs, NULL }, /* surf2d (nv30) */ | 31 | { 0x0362, &nv04_gr_ofuncs, NULL }, /* surf2d (nv30) */ |
32 | { 0x0389, &nv04_graph_ofuncs, NULL }, /* sifm (nv30) */ | 32 | { 0x0389, &nv04_gr_ofuncs, NULL }, /* sifm (nv30) */ |
33 | { 0x038a, &nv04_graph_ofuncs, NULL }, /* ifc (nv30) */ | 33 | { 0x038a, &nv04_gr_ofuncs, NULL }, /* ifc (nv30) */ |
34 | { 0x039e, &nv04_graph_ofuncs, NULL }, /* swzsurf (nv30) */ | 34 | { 0x039e, &nv04_gr_ofuncs, NULL }, /* swzsurf (nv30) */ |
35 | { 0x0397, &nv04_graph_ofuncs, NULL }, /* rankine */ | 35 | { 0x0397, &nv04_gr_ofuncs, NULL }, /* rankine */ |
36 | {}, | 36 | {}, |
37 | }; | 37 | }; |
38 | 38 | ||
@@ -41,15 +41,15 @@ nv30_graph_sclass[] = { | |||
41 | ******************************************************************************/ | 41 | ******************************************************************************/ |
42 | 42 | ||
43 | static int | 43 | static int |
44 | nv30_graph_context_ctor(struct nouveau_object *parent, | 44 | nv30_gr_context_ctor(struct nouveau_object *parent, |
45 | struct nouveau_object *engine, | 45 | struct nouveau_object *engine, |
46 | struct nouveau_oclass *oclass, void *data, u32 size, | 46 | struct nouveau_oclass *oclass, void *data, u32 size, |
47 | struct nouveau_object **pobject) | 47 | struct nouveau_object **pobject) |
48 | { | 48 | { |
49 | struct nv20_graph_chan *chan; | 49 | struct nv20_gr_chan *chan; |
50 | int ret, i; | 50 | int ret, i; |
51 | 51 | ||
52 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, 0x5f48, | 52 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, 0x5f48, |
53 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); | 53 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); |
54 | *pobject = nv_object(chan); | 54 | *pobject = nv_object(chan); |
55 | if (ret) | 55 | if (ret) |
@@ -113,15 +113,15 @@ nv30_graph_context_ctor(struct nouveau_object *parent, | |||
113 | } | 113 | } |
114 | 114 | ||
115 | static struct nouveau_oclass | 115 | static struct nouveau_oclass |
116 | nv30_graph_cclass = { | 116 | nv30_gr_cclass = { |
117 | .handle = NV_ENGCTX(GR, 0x30), | 117 | .handle = NV_ENGCTX(GR, 0x30), |
118 | .ofuncs = &(struct nouveau_ofuncs) { | 118 | .ofuncs = &(struct nouveau_ofuncs) { |
119 | .ctor = nv30_graph_context_ctor, | 119 | .ctor = nv30_gr_context_ctor, |
120 | .dtor = _nouveau_graph_context_dtor, | 120 | .dtor = _nouveau_gr_context_dtor, |
121 | .init = nv20_graph_context_init, | 121 | .init = nv20_gr_context_init, |
122 | .fini = nv20_graph_context_fini, | 122 | .fini = nv20_gr_context_fini, |
123 | .rd32 = _nouveau_graph_context_rd32, | 123 | .rd32 = _nouveau_gr_context_rd32, |
124 | .wr32 = _nouveau_graph_context_wr32, | 124 | .wr32 = _nouveau_gr_context_wr32, |
125 | }, | 125 | }, |
126 | }; | 126 | }; |
127 | 127 | ||
@@ -130,14 +130,14 @@ nv30_graph_cclass = { | |||
130 | ******************************************************************************/ | 130 | ******************************************************************************/ |
131 | 131 | ||
132 | static int | 132 | static int |
133 | nv30_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 133 | nv30_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
134 | struct nouveau_oclass *oclass, void *data, u32 size, | 134 | struct nouveau_oclass *oclass, void *data, u32 size, |
135 | struct nouveau_object **pobject) | 135 | struct nouveau_object **pobject) |
136 | { | 136 | { |
137 | struct nv20_graph_priv *priv; | 137 | struct nv20_gr_priv *priv; |
138 | int ret; | 138 | int ret; |
139 | 139 | ||
140 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 140 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
141 | *pobject = nv_object(priv); | 141 | *pobject = nv_object(priv); |
142 | if (ret) | 142 | if (ret) |
143 | return ret; | 143 | return ret; |
@@ -148,22 +148,22 @@ nv30_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
148 | return ret; | 148 | return ret; |
149 | 149 | ||
150 | nv_subdev(priv)->unit = 0x00001000; | 150 | nv_subdev(priv)->unit = 0x00001000; |
151 | nv_subdev(priv)->intr = nv20_graph_intr; | 151 | nv_subdev(priv)->intr = nv20_gr_intr; |
152 | nv_engine(priv)->cclass = &nv30_graph_cclass; | 152 | nv_engine(priv)->cclass = &nv30_gr_cclass; |
153 | nv_engine(priv)->sclass = nv30_graph_sclass; | 153 | nv_engine(priv)->sclass = nv30_gr_sclass; |
154 | nv_engine(priv)->tile_prog = nv20_graph_tile_prog; | 154 | nv_engine(priv)->tile_prog = nv20_gr_tile_prog; |
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
157 | 157 | ||
158 | int | 158 | int |
159 | nv30_graph_init(struct nouveau_object *object) | 159 | nv30_gr_init(struct nouveau_object *object) |
160 | { | 160 | { |
161 | struct nouveau_engine *engine = nv_engine(object); | 161 | struct nouveau_engine *engine = nv_engine(object); |
162 | struct nv20_graph_priv *priv = (void *)engine; | 162 | struct nv20_gr_priv *priv = (void *)engine; |
163 | struct nouveau_fb *pfb = nouveau_fb(object); | 163 | struct nouveau_fb *pfb = nouveau_fb(object); |
164 | int ret, i; | 164 | int ret, i; |
165 | 165 | ||
166 | ret = nouveau_graph_init(&priv->base); | 166 | ret = nouveau_gr_init(&priv->base); |
167 | if (ret) | 167 | if (ret) |
168 | return ret; | 168 | return ret; |
169 | 169 | ||
@@ -226,12 +226,12 @@ nv30_graph_init(struct nouveau_object *object) | |||
226 | } | 226 | } |
227 | 227 | ||
228 | struct nouveau_oclass | 228 | struct nouveau_oclass |
229 | nv30_graph_oclass = { | 229 | nv30_gr_oclass = { |
230 | .handle = NV_ENGINE(GR, 0x30), | 230 | .handle = NV_ENGINE(GR, 0x30), |
231 | .ofuncs = &(struct nouveau_ofuncs) { | 231 | .ofuncs = &(struct nouveau_ofuncs) { |
232 | .ctor = nv30_graph_ctor, | 232 | .ctor = nv30_gr_ctor, |
233 | .dtor = nv20_graph_dtor, | 233 | .dtor = nv20_gr_dtor, |
234 | .init = nv30_graph_init, | 234 | .init = nv30_gr_init, |
235 | .fini = _nouveau_graph_fini, | 235 | .fini = _nouveau_gr_fini, |
236 | }, | 236 | }, |
237 | }; | 237 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv34.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c index 34dd26c70b64..5c2787056292 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv34.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <subdev/timer.h> | 5 | #include <subdev/timer.h> |
6 | #include <subdev/fb.h> | 6 | #include <subdev/fb.h> |
7 | 7 | ||
8 | #include <engine/graph.h> | 8 | #include <engine/gr.h> |
9 | 9 | ||
10 | #include "nv20.h" | 10 | #include "nv20.h" |
11 | #include "regs.h" | 11 | #include "regs.h" |
@@ -15,24 +15,24 @@ | |||
15 | ******************************************************************************/ | 15 | ******************************************************************************/ |
16 | 16 | ||
17 | static struct nouveau_oclass | 17 | static struct nouveau_oclass |
18 | nv34_graph_sclass[] = { | 18 | nv34_gr_sclass[] = { |
19 | { 0x0012, &nv04_graph_ofuncs, NULL }, /* beta1 */ | 19 | { 0x0012, &nv04_gr_ofuncs, NULL }, /* beta1 */ |
20 | { 0x0019, &nv04_graph_ofuncs, NULL }, /* clip */ | 20 | { 0x0019, &nv04_gr_ofuncs, NULL }, /* clip */ |
21 | { 0x0030, &nv04_graph_ofuncs, NULL }, /* null */ | 21 | { 0x0030, &nv04_gr_ofuncs, NULL }, /* null */ |
22 | { 0x0039, &nv04_graph_ofuncs, NULL }, /* m2mf */ | 22 | { 0x0039, &nv04_gr_ofuncs, NULL }, /* m2mf */ |
23 | { 0x0043, &nv04_graph_ofuncs, NULL }, /* rop */ | 23 | { 0x0043, &nv04_gr_ofuncs, NULL }, /* rop */ |
24 | { 0x0044, &nv04_graph_ofuncs, NULL }, /* patt */ | 24 | { 0x0044, &nv04_gr_ofuncs, NULL }, /* patt */ |
25 | { 0x004a, &nv04_graph_ofuncs, NULL }, /* gdi */ | 25 | { 0x004a, &nv04_gr_ofuncs, NULL }, /* gdi */ |
26 | { 0x0062, &nv04_graph_ofuncs, NULL }, /* surf2d */ | 26 | { 0x0062, &nv04_gr_ofuncs, NULL }, /* surf2d */ |
27 | { 0x0072, &nv04_graph_ofuncs, NULL }, /* beta4 */ | 27 | { 0x0072, &nv04_gr_ofuncs, NULL }, /* beta4 */ |
28 | { 0x0089, &nv04_graph_ofuncs, NULL }, /* sifm */ | 28 | { 0x0089, &nv04_gr_ofuncs, NULL }, /* sifm */ |
29 | { 0x008a, &nv04_graph_ofuncs, NULL }, /* ifc */ | 29 | { 0x008a, &nv04_gr_ofuncs, NULL }, /* ifc */ |
30 | { 0x009f, &nv04_graph_ofuncs, NULL }, /* imageblit */ | 30 | { 0x009f, &nv04_gr_ofuncs, NULL }, /* imageblit */ |
31 | { 0x0362, &nv04_graph_ofuncs, NULL }, /* surf2d (nv30) */ | 31 | { 0x0362, &nv04_gr_ofuncs, NULL }, /* surf2d (nv30) */ |
32 | { 0x0389, &nv04_graph_ofuncs, NULL }, /* sifm (nv30) */ | 32 | { 0x0389, &nv04_gr_ofuncs, NULL }, /* sifm (nv30) */ |
33 | { 0x038a, &nv04_graph_ofuncs, NULL }, /* ifc (nv30) */ | 33 | { 0x038a, &nv04_gr_ofuncs, NULL }, /* ifc (nv30) */ |
34 | { 0x039e, &nv04_graph_ofuncs, NULL }, /* swzsurf (nv30) */ | 34 | { 0x039e, &nv04_gr_ofuncs, NULL }, /* swzsurf (nv30) */ |
35 | { 0x0697, &nv04_graph_ofuncs, NULL }, /* rankine */ | 35 | { 0x0697, &nv04_gr_ofuncs, NULL }, /* rankine */ |
36 | {}, | 36 | {}, |
37 | }; | 37 | }; |
38 | 38 | ||
@@ -41,15 +41,15 @@ nv34_graph_sclass[] = { | |||
41 | ******************************************************************************/ | 41 | ******************************************************************************/ |
42 | 42 | ||
43 | static int | 43 | static int |
44 | nv34_graph_context_ctor(struct nouveau_object *parent, | 44 | nv34_gr_context_ctor(struct nouveau_object *parent, |
45 | struct nouveau_object *engine, | 45 | struct nouveau_object *engine, |
46 | struct nouveau_oclass *oclass, void *data, u32 size, | 46 | struct nouveau_oclass *oclass, void *data, u32 size, |
47 | struct nouveau_object **pobject) | 47 | struct nouveau_object **pobject) |
48 | { | 48 | { |
49 | struct nv20_graph_chan *chan; | 49 | struct nv20_gr_chan *chan; |
50 | int ret, i; | 50 | int ret, i; |
51 | 51 | ||
52 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, 0x46dc, | 52 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, 0x46dc, |
53 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); | 53 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); |
54 | *pobject = nv_object(chan); | 54 | *pobject = nv_object(chan); |
55 | if (ret) | 55 | if (ret) |
@@ -113,15 +113,15 @@ nv34_graph_context_ctor(struct nouveau_object *parent, | |||
113 | } | 113 | } |
114 | 114 | ||
115 | static struct nouveau_oclass | 115 | static struct nouveau_oclass |
116 | nv34_graph_cclass = { | 116 | nv34_gr_cclass = { |
117 | .handle = NV_ENGCTX(GR, 0x34), | 117 | .handle = NV_ENGCTX(GR, 0x34), |
118 | .ofuncs = &(struct nouveau_ofuncs) { | 118 | .ofuncs = &(struct nouveau_ofuncs) { |
119 | .ctor = nv34_graph_context_ctor, | 119 | .ctor = nv34_gr_context_ctor, |
120 | .dtor = _nouveau_graph_context_dtor, | 120 | .dtor = _nouveau_gr_context_dtor, |
121 | .init = nv20_graph_context_init, | 121 | .init = nv20_gr_context_init, |
122 | .fini = nv20_graph_context_fini, | 122 | .fini = nv20_gr_context_fini, |
123 | .rd32 = _nouveau_graph_context_rd32, | 123 | .rd32 = _nouveau_gr_context_rd32, |
124 | .wr32 = _nouveau_graph_context_wr32, | 124 | .wr32 = _nouveau_gr_context_wr32, |
125 | }, | 125 | }, |
126 | }; | 126 | }; |
127 | 127 | ||
@@ -130,14 +130,14 @@ nv34_graph_cclass = { | |||
130 | ******************************************************************************/ | 130 | ******************************************************************************/ |
131 | 131 | ||
132 | static int | 132 | static int |
133 | nv34_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 133 | nv34_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
134 | struct nouveau_oclass *oclass, void *data, u32 size, | 134 | struct nouveau_oclass *oclass, void *data, u32 size, |
135 | struct nouveau_object **pobject) | 135 | struct nouveau_object **pobject) |
136 | { | 136 | { |
137 | struct nv20_graph_priv *priv; | 137 | struct nv20_gr_priv *priv; |
138 | int ret; | 138 | int ret; |
139 | 139 | ||
140 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 140 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
141 | *pobject = nv_object(priv); | 141 | *pobject = nv_object(priv); |
142 | if (ret) | 142 | if (ret) |
143 | return ret; | 143 | return ret; |
@@ -148,20 +148,20 @@ nv34_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
148 | return ret; | 148 | return ret; |
149 | 149 | ||
150 | nv_subdev(priv)->unit = 0x00001000; | 150 | nv_subdev(priv)->unit = 0x00001000; |
151 | nv_subdev(priv)->intr = nv20_graph_intr; | 151 | nv_subdev(priv)->intr = nv20_gr_intr; |
152 | nv_engine(priv)->cclass = &nv34_graph_cclass; | 152 | nv_engine(priv)->cclass = &nv34_gr_cclass; |
153 | nv_engine(priv)->sclass = nv34_graph_sclass; | 153 | nv_engine(priv)->sclass = nv34_gr_sclass; |
154 | nv_engine(priv)->tile_prog = nv20_graph_tile_prog; | 154 | nv_engine(priv)->tile_prog = nv20_gr_tile_prog; |
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
157 | 157 | ||
158 | struct nouveau_oclass | 158 | struct nouveau_oclass |
159 | nv34_graph_oclass = { | 159 | nv34_gr_oclass = { |
160 | .handle = NV_ENGINE(GR, 0x34), | 160 | .handle = NV_ENGINE(GR, 0x34), |
161 | .ofuncs = &(struct nouveau_ofuncs) { | 161 | .ofuncs = &(struct nouveau_ofuncs) { |
162 | .ctor = nv34_graph_ctor, | 162 | .ctor = nv34_gr_ctor, |
163 | .dtor = nv20_graph_dtor, | 163 | .dtor = nv20_gr_dtor, |
164 | .init = nv30_graph_init, | 164 | .init = nv30_gr_init, |
165 | .fini = _nouveau_graph_fini, | 165 | .fini = _nouveau_gr_fini, |
166 | }, | 166 | }, |
167 | }; | 167 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv35.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c index 2fb5756d9f66..af3f914813e2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv35.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv35.c | |||
@@ -13,24 +13,24 @@ | |||
13 | ******************************************************************************/ | 13 | ******************************************************************************/ |
14 | 14 | ||
15 | static struct nouveau_oclass | 15 | static struct nouveau_oclass |
16 | nv35_graph_sclass[] = { | 16 | nv35_gr_sclass[] = { |
17 | { 0x0012, &nv04_graph_ofuncs, NULL }, /* beta1 */ | 17 | { 0x0012, &nv04_gr_ofuncs, NULL }, /* beta1 */ |
18 | { 0x0019, &nv04_graph_ofuncs, NULL }, /* clip */ | 18 | { 0x0019, &nv04_gr_ofuncs, NULL }, /* clip */ |
19 | { 0x0030, &nv04_graph_ofuncs, NULL }, /* null */ | 19 | { 0x0030, &nv04_gr_ofuncs, NULL }, /* null */ |
20 | { 0x0039, &nv04_graph_ofuncs, NULL }, /* m2mf */ | 20 | { 0x0039, &nv04_gr_ofuncs, NULL }, /* m2mf */ |
21 | { 0x0043, &nv04_graph_ofuncs, NULL }, /* rop */ | 21 | { 0x0043, &nv04_gr_ofuncs, NULL }, /* rop */ |
22 | { 0x0044, &nv04_graph_ofuncs, NULL }, /* patt */ | 22 | { 0x0044, &nv04_gr_ofuncs, NULL }, /* patt */ |
23 | { 0x004a, &nv04_graph_ofuncs, NULL }, /* gdi */ | 23 | { 0x004a, &nv04_gr_ofuncs, NULL }, /* gdi */ |
24 | { 0x0062, &nv04_graph_ofuncs, NULL }, /* surf2d */ | 24 | { 0x0062, &nv04_gr_ofuncs, NULL }, /* surf2d */ |
25 | { 0x0072, &nv04_graph_ofuncs, NULL }, /* beta4 */ | 25 | { 0x0072, &nv04_gr_ofuncs, NULL }, /* beta4 */ |
26 | { 0x0089, &nv04_graph_ofuncs, NULL }, /* sifm */ | 26 | { 0x0089, &nv04_gr_ofuncs, NULL }, /* sifm */ |
27 | { 0x008a, &nv04_graph_ofuncs, NULL }, /* ifc */ | 27 | { 0x008a, &nv04_gr_ofuncs, NULL }, /* ifc */ |
28 | { 0x009f, &nv04_graph_ofuncs, NULL }, /* imageblit */ | 28 | { 0x009f, &nv04_gr_ofuncs, NULL }, /* imageblit */ |
29 | { 0x0362, &nv04_graph_ofuncs, NULL }, /* surf2d (nv30) */ | 29 | { 0x0362, &nv04_gr_ofuncs, NULL }, /* surf2d (nv30) */ |
30 | { 0x0389, &nv04_graph_ofuncs, NULL }, /* sifm (nv30) */ | 30 | { 0x0389, &nv04_gr_ofuncs, NULL }, /* sifm (nv30) */ |
31 | { 0x038a, &nv04_graph_ofuncs, NULL }, /* ifc (nv30) */ | 31 | { 0x038a, &nv04_gr_ofuncs, NULL }, /* ifc (nv30) */ |
32 | { 0x039e, &nv04_graph_ofuncs, NULL }, /* swzsurf (nv30) */ | 32 | { 0x039e, &nv04_gr_ofuncs, NULL }, /* swzsurf (nv30) */ |
33 | { 0x0497, &nv04_graph_ofuncs, NULL }, /* rankine */ | 33 | { 0x0497, &nv04_gr_ofuncs, NULL }, /* rankine */ |
34 | {}, | 34 | {}, |
35 | }; | 35 | }; |
36 | 36 | ||
@@ -39,15 +39,15 @@ nv35_graph_sclass[] = { | |||
39 | ******************************************************************************/ | 39 | ******************************************************************************/ |
40 | 40 | ||
41 | static int | 41 | static int |
42 | nv35_graph_context_ctor(struct nouveau_object *parent, | 42 | nv35_gr_context_ctor(struct nouveau_object *parent, |
43 | struct nouveau_object *engine, | 43 | struct nouveau_object *engine, |
44 | struct nouveau_oclass *oclass, void *data, u32 size, | 44 | struct nouveau_oclass *oclass, void *data, u32 size, |
45 | struct nouveau_object **pobject) | 45 | struct nouveau_object **pobject) |
46 | { | 46 | { |
47 | struct nv20_graph_chan *chan; | 47 | struct nv20_gr_chan *chan; |
48 | int ret, i; | 48 | int ret, i; |
49 | 49 | ||
50 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, 0x577c, | 50 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, 0x577c, |
51 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); | 51 | 16, NVOBJ_FLAG_ZERO_ALLOC, &chan); |
52 | *pobject = nv_object(chan); | 52 | *pobject = nv_object(chan); |
53 | if (ret) | 53 | if (ret) |
@@ -111,15 +111,15 @@ nv35_graph_context_ctor(struct nouveau_object *parent, | |||
111 | } | 111 | } |
112 | 112 | ||
113 | static struct nouveau_oclass | 113 | static struct nouveau_oclass |
114 | nv35_graph_cclass = { | 114 | nv35_gr_cclass = { |
115 | .handle = NV_ENGCTX(GR, 0x35), | 115 | .handle = NV_ENGCTX(GR, 0x35), |
116 | .ofuncs = &(struct nouveau_ofuncs) { | 116 | .ofuncs = &(struct nouveau_ofuncs) { |
117 | .ctor = nv35_graph_context_ctor, | 117 | .ctor = nv35_gr_context_ctor, |
118 | .dtor = _nouveau_graph_context_dtor, | 118 | .dtor = _nouveau_gr_context_dtor, |
119 | .init = nv20_graph_context_init, | 119 | .init = nv20_gr_context_init, |
120 | .fini = nv20_graph_context_fini, | 120 | .fini = nv20_gr_context_fini, |
121 | .rd32 = _nouveau_graph_context_rd32, | 121 | .rd32 = _nouveau_gr_context_rd32, |
122 | .wr32 = _nouveau_graph_context_wr32, | 122 | .wr32 = _nouveau_gr_context_wr32, |
123 | }, | 123 | }, |
124 | }; | 124 | }; |
125 | 125 | ||
@@ -128,14 +128,14 @@ nv35_graph_cclass = { | |||
128 | ******************************************************************************/ | 128 | ******************************************************************************/ |
129 | 129 | ||
130 | static int | 130 | static int |
131 | nv35_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 131 | nv35_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
132 | struct nouveau_oclass *oclass, void *data, u32 size, | 132 | struct nouveau_oclass *oclass, void *data, u32 size, |
133 | struct nouveau_object **pobject) | 133 | struct nouveau_object **pobject) |
134 | { | 134 | { |
135 | struct nv20_graph_priv *priv; | 135 | struct nv20_gr_priv *priv; |
136 | int ret; | 136 | int ret; |
137 | 137 | ||
138 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 138 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
139 | *pobject = nv_object(priv); | 139 | *pobject = nv_object(priv); |
140 | if (ret) | 140 | if (ret) |
141 | return ret; | 141 | return ret; |
@@ -146,20 +146,20 @@ nv35_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
146 | return ret; | 146 | return ret; |
147 | 147 | ||
148 | nv_subdev(priv)->unit = 0x00001000; | 148 | nv_subdev(priv)->unit = 0x00001000; |
149 | nv_subdev(priv)->intr = nv20_graph_intr; | 149 | nv_subdev(priv)->intr = nv20_gr_intr; |
150 | nv_engine(priv)->cclass = &nv35_graph_cclass; | 150 | nv_engine(priv)->cclass = &nv35_gr_cclass; |
151 | nv_engine(priv)->sclass = nv35_graph_sclass; | 151 | nv_engine(priv)->sclass = nv35_gr_sclass; |
152 | nv_engine(priv)->tile_prog = nv20_graph_tile_prog; | 152 | nv_engine(priv)->tile_prog = nv20_gr_tile_prog; |
153 | return 0; | 153 | return 0; |
154 | } | 154 | } |
155 | 155 | ||
156 | struct nouveau_oclass | 156 | struct nouveau_oclass |
157 | nv35_graph_oclass = { | 157 | nv35_gr_oclass = { |
158 | .handle = NV_ENGINE(GR, 0x35), | 158 | .handle = NV_ENGINE(GR, 0x35), |
159 | .ofuncs = &(struct nouveau_ofuncs) { | 159 | .ofuncs = &(struct nouveau_ofuncs) { |
160 | .ctor = nv35_graph_ctor, | 160 | .ctor = nv35_gr_ctor, |
161 | .dtor = nv20_graph_dtor, | 161 | .dtor = nv20_gr_dtor, |
162 | .init = nv30_graph_init, | 162 | .init = nv30_gr_init, |
163 | .fini = _nouveau_graph_fini, | 163 | .fini = _nouveau_gr_fini, |
164 | }, | 164 | }, |
165 | }; | 165 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c index 4f401174868d..6fadd830bc25 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c | |||
@@ -30,25 +30,25 @@ | |||
30 | #include <subdev/fb.h> | 30 | #include <subdev/fb.h> |
31 | #include <subdev/timer.h> | 31 | #include <subdev/timer.h> |
32 | 32 | ||
33 | #include <engine/graph.h> | 33 | #include <engine/gr.h> |
34 | #include <engine/fifo.h> | 34 | #include <engine/fifo.h> |
35 | 35 | ||
36 | #include "nv40.h" | 36 | #include "nv40.h" |
37 | #include "regs.h" | 37 | #include "regs.h" |
38 | 38 | ||
39 | struct nv40_graph_priv { | 39 | struct nv40_gr_priv { |
40 | struct nouveau_graph base; | 40 | struct nouveau_gr base; |
41 | u32 size; | 41 | u32 size; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | struct nv40_graph_chan { | 44 | struct nv40_gr_chan { |
45 | struct nouveau_graph_chan base; | 45 | struct nouveau_gr_chan base; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | static u64 | 48 | static u64 |
49 | nv40_graph_units(struct nouveau_graph *graph) | 49 | nv40_gr_units(struct nouveau_gr *gr) |
50 | { | 50 | { |
51 | struct nv40_graph_priv *priv = (void *)graph; | 51 | struct nv40_gr_priv *priv = (void *)gr; |
52 | 52 | ||
53 | return nv_rd32(priv, 0x1540); | 53 | return nv_rd32(priv, 0x1540); |
54 | } | 54 | } |
@@ -58,7 +58,7 @@ nv40_graph_units(struct nouveau_graph *graph) | |||
58 | ******************************************************************************/ | 58 | ******************************************************************************/ |
59 | 59 | ||
60 | static int | 60 | static int |
61 | nv40_graph_object_ctor(struct nouveau_object *parent, | 61 | nv40_gr_object_ctor(struct nouveau_object *parent, |
62 | struct nouveau_object *engine, | 62 | struct nouveau_object *engine, |
63 | struct nouveau_oclass *oclass, void *data, u32 size, | 63 | struct nouveau_oclass *oclass, void *data, u32 size, |
64 | struct nouveau_object **pobject) | 64 | struct nouveau_object **pobject) |
@@ -84,8 +84,8 @@ nv40_graph_object_ctor(struct nouveau_object *parent, | |||
84 | } | 84 | } |
85 | 85 | ||
86 | static struct nouveau_ofuncs | 86 | static struct nouveau_ofuncs |
87 | nv40_graph_ofuncs = { | 87 | nv40_gr_ofuncs = { |
88 | .ctor = nv40_graph_object_ctor, | 88 | .ctor = nv40_gr_object_ctor, |
89 | .dtor = _nouveau_gpuobj_dtor, | 89 | .dtor = _nouveau_gpuobj_dtor, |
90 | .init = _nouveau_gpuobj_init, | 90 | .init = _nouveau_gpuobj_init, |
91 | .fini = _nouveau_gpuobj_fini, | 91 | .fini = _nouveau_gpuobj_fini, |
@@ -94,44 +94,44 @@ nv40_graph_ofuncs = { | |||
94 | }; | 94 | }; |
95 | 95 | ||
96 | static struct nouveau_oclass | 96 | static struct nouveau_oclass |
97 | nv40_graph_sclass[] = { | 97 | nv40_gr_sclass[] = { |
98 | { 0x0012, &nv40_graph_ofuncs, NULL }, /* beta1 */ | 98 | { 0x0012, &nv40_gr_ofuncs, NULL }, /* beta1 */ |
99 | { 0x0019, &nv40_graph_ofuncs, NULL }, /* clip */ | 99 | { 0x0019, &nv40_gr_ofuncs, NULL }, /* clip */ |
100 | { 0x0030, &nv40_graph_ofuncs, NULL }, /* null */ | 100 | { 0x0030, &nv40_gr_ofuncs, NULL }, /* null */ |
101 | { 0x0039, &nv40_graph_ofuncs, NULL }, /* m2mf */ | 101 | { 0x0039, &nv40_gr_ofuncs, NULL }, /* m2mf */ |
102 | { 0x0043, &nv40_graph_ofuncs, NULL }, /* rop */ | 102 | { 0x0043, &nv40_gr_ofuncs, NULL }, /* rop */ |
103 | { 0x0044, &nv40_graph_ofuncs, NULL }, /* patt */ | 103 | { 0x0044, &nv40_gr_ofuncs, NULL }, /* patt */ |
104 | { 0x004a, &nv40_graph_ofuncs, NULL }, /* gdi */ | 104 | { 0x004a, &nv40_gr_ofuncs, NULL }, /* gdi */ |
105 | { 0x0062, &nv40_graph_ofuncs, NULL }, /* surf2d */ | 105 | { 0x0062, &nv40_gr_ofuncs, NULL }, /* surf2d */ |
106 | { 0x0072, &nv40_graph_ofuncs, NULL }, /* beta4 */ | 106 | { 0x0072, &nv40_gr_ofuncs, NULL }, /* beta4 */ |
107 | { 0x0089, &nv40_graph_ofuncs, NULL }, /* sifm */ | 107 | { 0x0089, &nv40_gr_ofuncs, NULL }, /* sifm */ |
108 | { 0x008a, &nv40_graph_ofuncs, NULL }, /* ifc */ | 108 | { 0x008a, &nv40_gr_ofuncs, NULL }, /* ifc */ |
109 | { 0x009f, &nv40_graph_ofuncs, NULL }, /* imageblit */ | 109 | { 0x009f, &nv40_gr_ofuncs, NULL }, /* imageblit */ |
110 | { 0x3062, &nv40_graph_ofuncs, NULL }, /* surf2d (nv40) */ | 110 | { 0x3062, &nv40_gr_ofuncs, NULL }, /* surf2d (nv40) */ |
111 | { 0x3089, &nv40_graph_ofuncs, NULL }, /* sifm (nv40) */ | 111 | { 0x3089, &nv40_gr_ofuncs, NULL }, /* sifm (nv40) */ |
112 | { 0x309e, &nv40_graph_ofuncs, NULL }, /* swzsurf (nv40) */ | 112 | { 0x309e, &nv40_gr_ofuncs, NULL }, /* swzsurf (nv40) */ |
113 | { 0x4097, &nv40_graph_ofuncs, NULL }, /* curie */ | 113 | { 0x4097, &nv40_gr_ofuncs, NULL }, /* curie */ |
114 | {}, | 114 | {}, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | static struct nouveau_oclass | 117 | static struct nouveau_oclass |
118 | nv44_graph_sclass[] = { | 118 | nv44_gr_sclass[] = { |
119 | { 0x0012, &nv40_graph_ofuncs, NULL }, /* beta1 */ | 119 | { 0x0012, &nv40_gr_ofuncs, NULL }, /* beta1 */ |
120 | { 0x0019, &nv40_graph_ofuncs, NULL }, /* clip */ | 120 | { 0x0019, &nv40_gr_ofuncs, NULL }, /* clip */ |
121 | { 0x0030, &nv40_graph_ofuncs, NULL }, /* null */ | 121 | { 0x0030, &nv40_gr_ofuncs, NULL }, /* null */ |
122 | { 0x0039, &nv40_graph_ofuncs, NULL }, /* m2mf */ | 122 | { 0x0039, &nv40_gr_ofuncs, NULL }, /* m2mf */ |
123 | { 0x0043, &nv40_graph_ofuncs, NULL }, /* rop */ | 123 | { 0x0043, &nv40_gr_ofuncs, NULL }, /* rop */ |
124 | { 0x0044, &nv40_graph_ofuncs, NULL }, /* patt */ | 124 | { 0x0044, &nv40_gr_ofuncs, NULL }, /* patt */ |
125 | { 0x004a, &nv40_graph_ofuncs, NULL }, /* gdi */ | 125 | { 0x004a, &nv40_gr_ofuncs, NULL }, /* gdi */ |
126 | { 0x0062, &nv40_graph_ofuncs, NULL }, /* surf2d */ | 126 | { 0x0062, &nv40_gr_ofuncs, NULL }, /* surf2d */ |
127 | { 0x0072, &nv40_graph_ofuncs, NULL }, /* beta4 */ | 127 | { 0x0072, &nv40_gr_ofuncs, NULL }, /* beta4 */ |
128 | { 0x0089, &nv40_graph_ofuncs, NULL }, /* sifm */ | 128 | { 0x0089, &nv40_gr_ofuncs, NULL }, /* sifm */ |
129 | { 0x008a, &nv40_graph_ofuncs, NULL }, /* ifc */ | 129 | { 0x008a, &nv40_gr_ofuncs, NULL }, /* ifc */ |
130 | { 0x009f, &nv40_graph_ofuncs, NULL }, /* imageblit */ | 130 | { 0x009f, &nv40_gr_ofuncs, NULL }, /* imageblit */ |
131 | { 0x3062, &nv40_graph_ofuncs, NULL }, /* surf2d (nv40) */ | 131 | { 0x3062, &nv40_gr_ofuncs, NULL }, /* surf2d (nv40) */ |
132 | { 0x3089, &nv40_graph_ofuncs, NULL }, /* sifm (nv40) */ | 132 | { 0x3089, &nv40_gr_ofuncs, NULL }, /* sifm (nv40) */ |
133 | { 0x309e, &nv40_graph_ofuncs, NULL }, /* swzsurf (nv40) */ | 133 | { 0x309e, &nv40_gr_ofuncs, NULL }, /* swzsurf (nv40) */ |
134 | { 0x4497, &nv40_graph_ofuncs, NULL }, /* curie */ | 134 | { 0x4497, &nv40_gr_ofuncs, NULL }, /* curie */ |
135 | {}, | 135 | {}, |
136 | }; | 136 | }; |
137 | 137 | ||
@@ -140,16 +140,16 @@ nv44_graph_sclass[] = { | |||
140 | ******************************************************************************/ | 140 | ******************************************************************************/ |
141 | 141 | ||
142 | static int | 142 | static int |
143 | nv40_graph_context_ctor(struct nouveau_object *parent, | 143 | nv40_gr_context_ctor(struct nouveau_object *parent, |
144 | struct nouveau_object *engine, | 144 | struct nouveau_object *engine, |
145 | struct nouveau_oclass *oclass, void *data, u32 size, | 145 | struct nouveau_oclass *oclass, void *data, u32 size, |
146 | struct nouveau_object **pobject) | 146 | struct nouveau_object **pobject) |
147 | { | 147 | { |
148 | struct nv40_graph_priv *priv = (void *)engine; | 148 | struct nv40_gr_priv *priv = (void *)engine; |
149 | struct nv40_graph_chan *chan; | 149 | struct nv40_gr_chan *chan; |
150 | int ret; | 150 | int ret; |
151 | 151 | ||
152 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, | 152 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, |
153 | priv->size, 16, | 153 | priv->size, 16, |
154 | NVOBJ_FLAG_ZERO_ALLOC, &chan); | 154 | NVOBJ_FLAG_ZERO_ALLOC, &chan); |
155 | *pobject = nv_object(chan); | 155 | *pobject = nv_object(chan); |
@@ -162,10 +162,10 @@ nv40_graph_context_ctor(struct nouveau_object *parent, | |||
162 | } | 162 | } |
163 | 163 | ||
164 | static int | 164 | static int |
165 | nv40_graph_context_fini(struct nouveau_object *object, bool suspend) | 165 | nv40_gr_context_fini(struct nouveau_object *object, bool suspend) |
166 | { | 166 | { |
167 | struct nv40_graph_priv *priv = (void *)object->engine; | 167 | struct nv40_gr_priv *priv = (void *)object->engine; |
168 | struct nv40_graph_chan *chan = (void *)object; | 168 | struct nv40_gr_chan *chan = (void *)object; |
169 | u32 inst = 0x01000000 | nv_gpuobj(chan)->addr >> 4; | 169 | u32 inst = 0x01000000 | nv_gpuobj(chan)->addr >> 4; |
170 | int ret = 0; | 170 | int ret = 0; |
171 | 171 | ||
@@ -195,15 +195,15 @@ nv40_graph_context_fini(struct nouveau_object *object, bool suspend) | |||
195 | } | 195 | } |
196 | 196 | ||
197 | static struct nouveau_oclass | 197 | static struct nouveau_oclass |
198 | nv40_graph_cclass = { | 198 | nv40_gr_cclass = { |
199 | .handle = NV_ENGCTX(GR, 0x40), | 199 | .handle = NV_ENGCTX(GR, 0x40), |
200 | .ofuncs = &(struct nouveau_ofuncs) { | 200 | .ofuncs = &(struct nouveau_ofuncs) { |
201 | .ctor = nv40_graph_context_ctor, | 201 | .ctor = nv40_gr_context_ctor, |
202 | .dtor = _nouveau_graph_context_dtor, | 202 | .dtor = _nouveau_gr_context_dtor, |
203 | .init = _nouveau_graph_context_init, | 203 | .init = _nouveau_gr_context_init, |
204 | .fini = nv40_graph_context_fini, | 204 | .fini = nv40_gr_context_fini, |
205 | .rd32 = _nouveau_graph_context_rd32, | 205 | .rd32 = _nouveau_gr_context_rd32, |
206 | .wr32 = _nouveau_graph_context_wr32, | 206 | .wr32 = _nouveau_gr_context_wr32, |
207 | }, | 207 | }, |
208 | }; | 208 | }; |
209 | 209 | ||
@@ -212,15 +212,15 @@ nv40_graph_cclass = { | |||
212 | ******************************************************************************/ | 212 | ******************************************************************************/ |
213 | 213 | ||
214 | static void | 214 | static void |
215 | nv40_graph_tile_prog(struct nouveau_engine *engine, int i) | 215 | nv40_gr_tile_prog(struct nouveau_engine *engine, int i) |
216 | { | 216 | { |
217 | struct nouveau_fb_tile *tile = &nouveau_fb(engine)->tile.region[i]; | 217 | struct nouveau_fb_tile *tile = &nouveau_fb(engine)->tile.region[i]; |
218 | struct nouveau_fifo *pfifo = nouveau_fifo(engine); | 218 | struct nouveau_fifo *pfifo = nouveau_fifo(engine); |
219 | struct nv40_graph_priv *priv = (void *)engine; | 219 | struct nv40_gr_priv *priv = (void *)engine; |
220 | unsigned long flags; | 220 | unsigned long flags; |
221 | 221 | ||
222 | pfifo->pause(pfifo, &flags); | 222 | pfifo->pause(pfifo, &flags); |
223 | nv04_graph_idle(priv); | 223 | nv04_gr_idle(priv); |
224 | 224 | ||
225 | switch (nv_device(priv)->chipset) { | 225 | switch (nv_device(priv)->chipset) { |
226 | case 0x40: | 226 | case 0x40: |
@@ -290,13 +290,13 @@ nv40_graph_tile_prog(struct nouveau_engine *engine, int i) | |||
290 | } | 290 | } |
291 | 291 | ||
292 | static void | 292 | static void |
293 | nv40_graph_intr(struct nouveau_subdev *subdev) | 293 | nv40_gr_intr(struct nouveau_subdev *subdev) |
294 | { | 294 | { |
295 | struct nouveau_fifo *pfifo = nouveau_fifo(subdev); | 295 | struct nouveau_fifo *pfifo = nouveau_fifo(subdev); |
296 | struct nouveau_engine *engine = nv_engine(subdev); | 296 | struct nouveau_engine *engine = nv_engine(subdev); |
297 | struct nouveau_object *engctx; | 297 | struct nouveau_object *engctx; |
298 | struct nouveau_handle *handle = NULL; | 298 | struct nouveau_handle *handle = NULL; |
299 | struct nv40_graph_priv *priv = (void *)subdev; | 299 | struct nv40_gr_priv *priv = (void *)subdev; |
300 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); | 300 | u32 stat = nv_rd32(priv, NV03_PGRAPH_INTR); |
301 | u32 nsource = nv_rd32(priv, NV03_PGRAPH_NSOURCE); | 301 | u32 nsource = nv_rd32(priv, NV03_PGRAPH_NSOURCE); |
302 | u32 nstatus = nv_rd32(priv, NV03_PGRAPH_NSTATUS); | 302 | u32 nstatus = nv_rd32(priv, NV03_PGRAPH_NSTATUS); |
@@ -330,11 +330,11 @@ nv40_graph_intr(struct nouveau_subdev *subdev) | |||
330 | 330 | ||
331 | if (show) { | 331 | if (show) { |
332 | nv_error(priv, "%s", ""); | 332 | nv_error(priv, "%s", ""); |
333 | nouveau_bitfield_print(nv10_graph_intr_name, show); | 333 | nouveau_bitfield_print(nv10_gr_intr_name, show); |
334 | pr_cont(" nsource:"); | 334 | pr_cont(" nsource:"); |
335 | nouveau_bitfield_print(nv04_graph_nsource, nsource); | 335 | nouveau_bitfield_print(nv04_gr_nsource, nsource); |
336 | pr_cont(" nstatus:"); | 336 | pr_cont(" nstatus:"); |
337 | nouveau_bitfield_print(nv10_graph_nstatus, nstatus); | 337 | nouveau_bitfield_print(nv10_gr_nstatus, nstatus); |
338 | pr_cont("\n"); | 338 | pr_cont("\n"); |
339 | nv_error(priv, | 339 | nv_error(priv, |
340 | "ch %d [0x%08x %s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", | 340 | "ch %d [0x%08x %s] subc %d class 0x%04x mthd 0x%04x data 0x%08x\n", |
@@ -346,41 +346,41 @@ nv40_graph_intr(struct nouveau_subdev *subdev) | |||
346 | } | 346 | } |
347 | 347 | ||
348 | static int | 348 | static int |
349 | nv40_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 349 | nv40_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
350 | struct nouveau_oclass *oclass, void *data, u32 size, | 350 | struct nouveau_oclass *oclass, void *data, u32 size, |
351 | struct nouveau_object **pobject) | 351 | struct nouveau_object **pobject) |
352 | { | 352 | { |
353 | struct nv40_graph_priv *priv; | 353 | struct nv40_gr_priv *priv; |
354 | int ret; | 354 | int ret; |
355 | 355 | ||
356 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 356 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
357 | *pobject = nv_object(priv); | 357 | *pobject = nv_object(priv); |
358 | if (ret) | 358 | if (ret) |
359 | return ret; | 359 | return ret; |
360 | 360 | ||
361 | nv_subdev(priv)->unit = 0x00001000; | 361 | nv_subdev(priv)->unit = 0x00001000; |
362 | nv_subdev(priv)->intr = nv40_graph_intr; | 362 | nv_subdev(priv)->intr = nv40_gr_intr; |
363 | nv_engine(priv)->cclass = &nv40_graph_cclass; | 363 | nv_engine(priv)->cclass = &nv40_gr_cclass; |
364 | if (nv44_graph_class(priv)) | 364 | if (nv44_gr_class(priv)) |
365 | nv_engine(priv)->sclass = nv44_graph_sclass; | 365 | nv_engine(priv)->sclass = nv44_gr_sclass; |
366 | else | 366 | else |
367 | nv_engine(priv)->sclass = nv40_graph_sclass; | 367 | nv_engine(priv)->sclass = nv40_gr_sclass; |
368 | nv_engine(priv)->tile_prog = nv40_graph_tile_prog; | 368 | nv_engine(priv)->tile_prog = nv40_gr_tile_prog; |
369 | 369 | ||
370 | priv->base.units = nv40_graph_units; | 370 | priv->base.units = nv40_gr_units; |
371 | return 0; | 371 | return 0; |
372 | } | 372 | } |
373 | 373 | ||
374 | static int | 374 | static int |
375 | nv40_graph_init(struct nouveau_object *object) | 375 | nv40_gr_init(struct nouveau_object *object) |
376 | { | 376 | { |
377 | struct nouveau_engine *engine = nv_engine(object); | 377 | struct nouveau_engine *engine = nv_engine(object); |
378 | struct nouveau_fb *pfb = nouveau_fb(object); | 378 | struct nouveau_fb *pfb = nouveau_fb(object); |
379 | struct nv40_graph_priv *priv = (void *)engine; | 379 | struct nv40_gr_priv *priv = (void *)engine; |
380 | int ret, i, j; | 380 | int ret, i, j; |
381 | u32 vramsz; | 381 | u32 vramsz; |
382 | 382 | ||
383 | ret = nouveau_graph_init(&priv->base); | 383 | ret = nouveau_gr_init(&priv->base); |
384 | if (ret) | 384 | if (ret) |
385 | return ret; | 385 | return ret; |
386 | 386 | ||
@@ -525,12 +525,12 @@ nv40_graph_init(struct nouveau_object *object) | |||
525 | } | 525 | } |
526 | 526 | ||
527 | struct nouveau_oclass | 527 | struct nouveau_oclass |
528 | nv40_graph_oclass = { | 528 | nv40_gr_oclass = { |
529 | .handle = NV_ENGINE(GR, 0x40), | 529 | .handle = NV_ENGINE(GR, 0x40), |
530 | .ofuncs = &(struct nouveau_ofuncs) { | 530 | .ofuncs = &(struct nouveau_ofuncs) { |
531 | .ctor = nv40_graph_ctor, | 531 | .ctor = nv40_gr_ctor, |
532 | .dtor = _nouveau_graph_dtor, | 532 | .dtor = _nouveau_gr_dtor, |
533 | .init = nv40_graph_init, | 533 | .init = nv40_gr_init, |
534 | .fini = _nouveau_graph_fini, | 534 | .fini = _nouveau_gr_fini, |
535 | }, | 535 | }, |
536 | }; | 536 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv40.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h index ad8209377529..40545f260c0d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv40.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __NV40_GRAPH_H__ | 1 | #ifndef __NV40_GR_H__ |
2 | #define __NV40_GRAPH_H__ | 2 | #define __NV40_GR_H__ |
3 | 3 | ||
4 | #include <core/device.h> | 4 | #include <core/device.h> |
5 | #include <core/gpuobj.h> | 5 | #include <core/gpuobj.h> |
@@ -8,7 +8,7 @@ | |||
8 | * helpful to determine a number of other hardware features | 8 | * helpful to determine a number of other hardware features |
9 | */ | 9 | */ |
10 | static inline int | 10 | static inline int |
11 | nv44_graph_class(void *priv) | 11 | nv44_gr_class(void *priv) |
12 | { | 12 | { |
13 | struct nouveau_device *device = nv_device(priv); | 13 | struct nouveau_device *device = nv_device(priv); |
14 | 14 | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c index 896e17b56f45..bd7687c683c8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c | |||
@@ -33,24 +33,24 @@ | |||
33 | #include <subdev/timer.h> | 33 | #include <subdev/timer.h> |
34 | 34 | ||
35 | #include <engine/fifo.h> | 35 | #include <engine/fifo.h> |
36 | #include <engine/graph.h> | 36 | #include <engine/gr.h> |
37 | 37 | ||
38 | #include "nv50.h" | 38 | #include "nv50.h" |
39 | 39 | ||
40 | struct nv50_graph_priv { | 40 | struct nv50_gr_priv { |
41 | struct nouveau_graph base; | 41 | struct nouveau_gr base; |
42 | spinlock_t lock; | 42 | spinlock_t lock; |
43 | u32 size; | 43 | u32 size; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | struct nv50_graph_chan { | 46 | struct nv50_gr_chan { |
47 | struct nouveau_graph_chan base; | 47 | struct nouveau_gr_chan base; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static u64 | 50 | static u64 |
51 | nv50_graph_units(struct nouveau_graph *graph) | 51 | nv50_gr_units(struct nouveau_gr *gr) |
52 | { | 52 | { |
53 | struct nv50_graph_priv *priv = (void *)graph; | 53 | struct nv50_gr_priv *priv = (void *)gr; |
54 | 54 | ||
55 | return nv_rd32(priv, 0x1540); | 55 | return nv_rd32(priv, 0x1540); |
56 | } | 56 | } |
@@ -60,7 +60,7 @@ nv50_graph_units(struct nouveau_graph *graph) | |||
60 | ******************************************************************************/ | 60 | ******************************************************************************/ |
61 | 61 | ||
62 | static int | 62 | static int |
63 | nv50_graph_object_ctor(struct nouveau_object *parent, | 63 | nv50_gr_object_ctor(struct nouveau_object *parent, |
64 | struct nouveau_object *engine, | 64 | struct nouveau_object *engine, |
65 | struct nouveau_oclass *oclass, void *data, u32 size, | 65 | struct nouveau_oclass *oclass, void *data, u32 size, |
66 | struct nouveau_object **pobject) | 66 | struct nouveau_object **pobject) |
@@ -82,8 +82,8 @@ nv50_graph_object_ctor(struct nouveau_object *parent, | |||
82 | } | 82 | } |
83 | 83 | ||
84 | static struct nouveau_ofuncs | 84 | static struct nouveau_ofuncs |
85 | nv50_graph_ofuncs = { | 85 | nv50_gr_ofuncs = { |
86 | .ctor = nv50_graph_object_ctor, | 86 | .ctor = nv50_gr_object_ctor, |
87 | .dtor = _nouveau_gpuobj_dtor, | 87 | .dtor = _nouveau_gpuobj_dtor, |
88 | .init = _nouveau_gpuobj_init, | 88 | .init = _nouveau_gpuobj_init, |
89 | .fini = _nouveau_gpuobj_fini, | 89 | .fini = _nouveau_gpuobj_fini, |
@@ -92,54 +92,54 @@ nv50_graph_ofuncs = { | |||
92 | }; | 92 | }; |
93 | 93 | ||
94 | static struct nouveau_oclass | 94 | static struct nouveau_oclass |
95 | nv50_graph_sclass[] = { | 95 | nv50_gr_sclass[] = { |
96 | { 0x0030, &nv50_graph_ofuncs }, | 96 | { 0x0030, &nv50_gr_ofuncs }, |
97 | { 0x502d, &nv50_graph_ofuncs }, | 97 | { 0x502d, &nv50_gr_ofuncs }, |
98 | { 0x5039, &nv50_graph_ofuncs }, | 98 | { 0x5039, &nv50_gr_ofuncs }, |
99 | { 0x5097, &nv50_graph_ofuncs }, | 99 | { 0x5097, &nv50_gr_ofuncs }, |
100 | { 0x50c0, &nv50_graph_ofuncs }, | 100 | { 0x50c0, &nv50_gr_ofuncs }, |
101 | {} | 101 | {} |
102 | }; | 102 | }; |
103 | 103 | ||
104 | static struct nouveau_oclass | 104 | static struct nouveau_oclass |
105 | nv84_graph_sclass[] = { | 105 | nv84_gr_sclass[] = { |
106 | { 0x0030, &nv50_graph_ofuncs }, | 106 | { 0x0030, &nv50_gr_ofuncs }, |
107 | { 0x502d, &nv50_graph_ofuncs }, | 107 | { 0x502d, &nv50_gr_ofuncs }, |
108 | { 0x5039, &nv50_graph_ofuncs }, | 108 | { 0x5039, &nv50_gr_ofuncs }, |
109 | { 0x50c0, &nv50_graph_ofuncs }, | 109 | { 0x50c0, &nv50_gr_ofuncs }, |
110 | { 0x8297, &nv50_graph_ofuncs }, | 110 | { 0x8297, &nv50_gr_ofuncs }, |
111 | {} | 111 | {} |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static struct nouveau_oclass | 114 | static struct nouveau_oclass |
115 | nva0_graph_sclass[] = { | 115 | nva0_gr_sclass[] = { |
116 | { 0x0030, &nv50_graph_ofuncs }, | 116 | { 0x0030, &nv50_gr_ofuncs }, |
117 | { 0x502d, &nv50_graph_ofuncs }, | 117 | { 0x502d, &nv50_gr_ofuncs }, |
118 | { 0x5039, &nv50_graph_ofuncs }, | 118 | { 0x5039, &nv50_gr_ofuncs }, |
119 | { 0x50c0, &nv50_graph_ofuncs }, | 119 | { 0x50c0, &nv50_gr_ofuncs }, |
120 | { 0x8397, &nv50_graph_ofuncs }, | 120 | { 0x8397, &nv50_gr_ofuncs }, |
121 | {} | 121 | {} |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static struct nouveau_oclass | 124 | static struct nouveau_oclass |
125 | nva3_graph_sclass[] = { | 125 | nva3_gr_sclass[] = { |
126 | { 0x0030, &nv50_graph_ofuncs }, | 126 | { 0x0030, &nv50_gr_ofuncs }, |
127 | { 0x502d, &nv50_graph_ofuncs }, | 127 | { 0x502d, &nv50_gr_ofuncs }, |
128 | { 0x5039, &nv50_graph_ofuncs }, | 128 | { 0x5039, &nv50_gr_ofuncs }, |
129 | { 0x50c0, &nv50_graph_ofuncs }, | 129 | { 0x50c0, &nv50_gr_ofuncs }, |
130 | { 0x8597, &nv50_graph_ofuncs }, | 130 | { 0x8597, &nv50_gr_ofuncs }, |
131 | { 0x85c0, &nv50_graph_ofuncs }, | 131 | { 0x85c0, &nv50_gr_ofuncs }, |
132 | {} | 132 | {} |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static struct nouveau_oclass | 135 | static struct nouveau_oclass |
136 | nvaf_graph_sclass[] = { | 136 | nvaf_gr_sclass[] = { |
137 | { 0x0030, &nv50_graph_ofuncs }, | 137 | { 0x0030, &nv50_gr_ofuncs }, |
138 | { 0x502d, &nv50_graph_ofuncs }, | 138 | { 0x502d, &nv50_gr_ofuncs }, |
139 | { 0x5039, &nv50_graph_ofuncs }, | 139 | { 0x5039, &nv50_gr_ofuncs }, |
140 | { 0x50c0, &nv50_graph_ofuncs }, | 140 | { 0x50c0, &nv50_gr_ofuncs }, |
141 | { 0x85c0, &nv50_graph_ofuncs }, | 141 | { 0x85c0, &nv50_gr_ofuncs }, |
142 | { 0x8697, &nv50_graph_ofuncs }, | 142 | { 0x8697, &nv50_gr_ofuncs }, |
143 | {} | 143 | {} |
144 | }; | 144 | }; |
145 | 145 | ||
@@ -148,16 +148,16 @@ nvaf_graph_sclass[] = { | |||
148 | ******************************************************************************/ | 148 | ******************************************************************************/ |
149 | 149 | ||
150 | static int | 150 | static int |
151 | nv50_graph_context_ctor(struct nouveau_object *parent, | 151 | nv50_gr_context_ctor(struct nouveau_object *parent, |
152 | struct nouveau_object *engine, | 152 | struct nouveau_object *engine, |
153 | struct nouveau_oclass *oclass, void *data, u32 size, | 153 | struct nouveau_oclass *oclass, void *data, u32 size, |
154 | struct nouveau_object **pobject) | 154 | struct nouveau_object **pobject) |
155 | { | 155 | { |
156 | struct nv50_graph_priv *priv = (void *)engine; | 156 | struct nv50_gr_priv *priv = (void *)engine; |
157 | struct nv50_graph_chan *chan; | 157 | struct nv50_gr_chan *chan; |
158 | int ret; | 158 | int ret; |
159 | 159 | ||
160 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, | 160 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, |
161 | priv->size, 0, | 161 | priv->size, 0, |
162 | NVOBJ_FLAG_ZERO_ALLOC, &chan); | 162 | NVOBJ_FLAG_ZERO_ALLOC, &chan); |
163 | *pobject = nv_object(chan); | 163 | *pobject = nv_object(chan); |
@@ -169,15 +169,15 @@ nv50_graph_context_ctor(struct nouveau_object *parent, | |||
169 | } | 169 | } |
170 | 170 | ||
171 | static struct nouveau_oclass | 171 | static struct nouveau_oclass |
172 | nv50_graph_cclass = { | 172 | nv50_gr_cclass = { |
173 | .handle = NV_ENGCTX(GR, 0x50), | 173 | .handle = NV_ENGCTX(GR, 0x50), |
174 | .ofuncs = &(struct nouveau_ofuncs) { | 174 | .ofuncs = &(struct nouveau_ofuncs) { |
175 | .ctor = nv50_graph_context_ctor, | 175 | .ctor = nv50_gr_context_ctor, |
176 | .dtor = _nouveau_graph_context_dtor, | 176 | .dtor = _nouveau_gr_context_dtor, |
177 | .init = _nouveau_graph_context_init, | 177 | .init = _nouveau_gr_context_init, |
178 | .fini = _nouveau_graph_context_fini, | 178 | .fini = _nouveau_gr_context_fini, |
179 | .rd32 = _nouveau_graph_context_rd32, | 179 | .rd32 = _nouveau_gr_context_rd32, |
180 | .wr32 = _nouveau_graph_context_wr32, | 180 | .wr32 = _nouveau_gr_context_wr32, |
181 | }, | 181 | }, |
182 | }; | 182 | }; |
183 | 183 | ||
@@ -185,7 +185,7 @@ nv50_graph_cclass = { | |||
185 | * PGRAPH engine/subdev functions | 185 | * PGRAPH engine/subdev functions |
186 | ******************************************************************************/ | 186 | ******************************************************************************/ |
187 | 187 | ||
188 | static const struct nouveau_bitfield nv50_pgraph_status[] = { | 188 | static const struct nouveau_bitfield nv50_pgr_status[] = { |
189 | { 0x00000001, "BUSY" }, /* set when any bit is set */ | 189 | { 0x00000001, "BUSY" }, /* set when any bit is set */ |
190 | { 0x00000002, "DISPATCH" }, | 190 | { 0x00000002, "DISPATCH" }, |
191 | { 0x00000004, "UNK2" }, | 191 | { 0x00000004, "UNK2" }, |
@@ -214,21 +214,21 @@ static const struct nouveau_bitfield nv50_pgraph_status[] = { | |||
214 | {} | 214 | {} |
215 | }; | 215 | }; |
216 | 216 | ||
217 | static const char *const nv50_pgraph_vstatus_0[] = { | 217 | static const char *const nv50_pgr_vstatus_0[] = { |
218 | "VFETCH", "CCACHE", "PREGEOM", "POSTGEOM", "VATTR", "STRMOUT", "VCLIP", | 218 | "VFETCH", "CCACHE", "PREGEOM", "POSTGEOM", "VATTR", "STRMOUT", "VCLIP", |
219 | NULL | 219 | NULL |
220 | }; | 220 | }; |
221 | 221 | ||
222 | static const char *const nv50_pgraph_vstatus_1[] = { | 222 | static const char *const nv50_pgr_vstatus_1[] = { |
223 | "TPC_RAST", "TPC_PROP", "TPC_TEX", "TPC_GEOM", "TPC_MP", NULL | 223 | "TPC_RAST", "TPC_PROP", "TPC_TEX", "TPC_GEOM", "TPC_MP", NULL |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static const char *const nv50_pgraph_vstatus_2[] = { | 226 | static const char *const nv50_pgr_vstatus_2[] = { |
227 | "RATTR", "APLANE", "TRAST", "CLIPID", "ZCULL", "ENG2D", "RMASK", | 227 | "RATTR", "APLANE", "TRAST", "CLIPID", "ZCULL", "ENG2D", "RMASK", |
228 | "ROP", NULL | 228 | "ROP", NULL |
229 | }; | 229 | }; |
230 | 230 | ||
231 | static void nouveau_pgraph_vstatus_print(struct nv50_graph_priv *priv, int r, | 231 | static void nouveau_pgr_vstatus_print(struct nv50_gr_priv *priv, int r, |
232 | const char *const units[], u32 status) | 232 | const char *const units[], u32 status) |
233 | { | 233 | { |
234 | int i; | 234 | int i; |
@@ -246,10 +246,10 @@ static void nouveau_pgraph_vstatus_print(struct nv50_graph_priv *priv, int r, | |||
246 | } | 246 | } |
247 | 247 | ||
248 | static int | 248 | static int |
249 | nv84_graph_tlb_flush(struct nouveau_engine *engine) | 249 | nv84_gr_tlb_flush(struct nouveau_engine *engine) |
250 | { | 250 | { |
251 | struct nouveau_timer *ptimer = nouveau_timer(engine); | 251 | struct nouveau_timer *ptimer = nouveau_timer(engine); |
252 | struct nv50_graph_priv *priv = (void *)engine; | 252 | struct nv50_gr_priv *priv = (void *)engine; |
253 | bool idle, timeout = false; | 253 | bool idle, timeout = false; |
254 | unsigned long flags; | 254 | unsigned long flags; |
255 | u64 start; | 255 | u64 start; |
@@ -284,14 +284,14 @@ nv84_graph_tlb_flush(struct nouveau_engine *engine) | |||
284 | 284 | ||
285 | tmp = nv_rd32(priv, 0x400700); | 285 | tmp = nv_rd32(priv, 0x400700); |
286 | nv_error(priv, "PGRAPH_STATUS : 0x%08x", tmp); | 286 | nv_error(priv, "PGRAPH_STATUS : 0x%08x", tmp); |
287 | nouveau_bitfield_print(nv50_pgraph_status, tmp); | 287 | nouveau_bitfield_print(nv50_pgr_status, tmp); |
288 | pr_cont("\n"); | 288 | pr_cont("\n"); |
289 | 289 | ||
290 | nouveau_pgraph_vstatus_print(priv, 0, nv50_pgraph_vstatus_0, | 290 | nouveau_pgr_vstatus_print(priv, 0, nv50_pgr_vstatus_0, |
291 | nv_rd32(priv, 0x400380)); | 291 | nv_rd32(priv, 0x400380)); |
292 | nouveau_pgraph_vstatus_print(priv, 1, nv50_pgraph_vstatus_1, | 292 | nouveau_pgr_vstatus_print(priv, 1, nv50_pgr_vstatus_1, |
293 | nv_rd32(priv, 0x400384)); | 293 | nv_rd32(priv, 0x400384)); |
294 | nouveau_pgraph_vstatus_print(priv, 2, nv50_pgraph_vstatus_2, | 294 | nouveau_pgr_vstatus_print(priv, 2, nv50_pgr_vstatus_2, |
295 | nv_rd32(priv, 0x400388)); | 295 | nv_rd32(priv, 0x400388)); |
296 | } | 296 | } |
297 | 297 | ||
@@ -338,24 +338,24 @@ static const struct nouveau_bitfield nv50_tex_traps[] = { | |||
338 | {} | 338 | {} |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static const struct nouveau_bitfield nv50_graph_trap_m2mf[] = { | 341 | static const struct nouveau_bitfield nv50_gr_trap_m2mf[] = { |
342 | { 0x00000001, "NOTIFY" }, | 342 | { 0x00000001, "NOTIFY" }, |
343 | { 0x00000002, "IN" }, | 343 | { 0x00000002, "IN" }, |
344 | { 0x00000004, "OUT" }, | 344 | { 0x00000004, "OUT" }, |
345 | {} | 345 | {} |
346 | }; | 346 | }; |
347 | 347 | ||
348 | static const struct nouveau_bitfield nv50_graph_trap_vfetch[] = { | 348 | static const struct nouveau_bitfield nv50_gr_trap_vfetch[] = { |
349 | { 0x00000001, "FAULT" }, | 349 | { 0x00000001, "FAULT" }, |
350 | {} | 350 | {} |
351 | }; | 351 | }; |
352 | 352 | ||
353 | static const struct nouveau_bitfield nv50_graph_trap_strmout[] = { | 353 | static const struct nouveau_bitfield nv50_gr_trap_strmout[] = { |
354 | { 0x00000001, "FAULT" }, | 354 | { 0x00000001, "FAULT" }, |
355 | {} | 355 | {} |
356 | }; | 356 | }; |
357 | 357 | ||
358 | static const struct nouveau_bitfield nv50_graph_trap_ccache[] = { | 358 | static const struct nouveau_bitfield nv50_gr_trap_ccache[] = { |
359 | { 0x00000001, "FAULT" }, | 359 | { 0x00000001, "FAULT" }, |
360 | {} | 360 | {} |
361 | }; | 361 | }; |
@@ -407,7 +407,7 @@ const struct nouveau_enum nv50_data_error_names[] = { | |||
407 | {} | 407 | {} |
408 | }; | 408 | }; |
409 | 409 | ||
410 | static const struct nouveau_bitfield nv50_graph_intr_name[] = { | 410 | static const struct nouveau_bitfield nv50_gr_intr_name[] = { |
411 | { 0x00000001, "NOTIFY" }, | 411 | { 0x00000001, "NOTIFY" }, |
412 | { 0x00000002, "COMPUTE_QUERY" }, | 412 | { 0x00000002, "COMPUTE_QUERY" }, |
413 | { 0x00000010, "ILLEGAL_MTHD" }, | 413 | { 0x00000010, "ILLEGAL_MTHD" }, |
@@ -421,7 +421,7 @@ static const struct nouveau_bitfield nv50_graph_intr_name[] = { | |||
421 | {} | 421 | {} |
422 | }; | 422 | }; |
423 | 423 | ||
424 | static const struct nouveau_bitfield nv50_graph_trap_prop[] = { | 424 | static const struct nouveau_bitfield nv50_gr_trap_prop[] = { |
425 | { 0x00000004, "SURF_WIDTH_OVERRUN" }, | 425 | { 0x00000004, "SURF_WIDTH_OVERRUN" }, |
426 | { 0x00000008, "SURF_HEIGHT_OVERRUN" }, | 426 | { 0x00000008, "SURF_HEIGHT_OVERRUN" }, |
427 | { 0x00000010, "DST2D_FAULT" }, | 427 | { 0x00000010, "DST2D_FAULT" }, |
@@ -437,7 +437,7 @@ static const struct nouveau_bitfield nv50_graph_trap_prop[] = { | |||
437 | }; | 437 | }; |
438 | 438 | ||
439 | static void | 439 | static void |
440 | nv50_priv_prop_trap(struct nv50_graph_priv *priv, | 440 | nv50_priv_prop_trap(struct nv50_gr_priv *priv, |
441 | u32 ustatus_addr, u32 ustatus, u32 tp) | 441 | u32 ustatus_addr, u32 ustatus, u32 tp) |
442 | { | 442 | { |
443 | u32 e0c = nv_rd32(priv, ustatus_addr + 0x04); | 443 | u32 e0c = nv_rd32(priv, ustatus_addr + 0x04); |
@@ -468,7 +468,7 @@ nv50_priv_prop_trap(struct nv50_graph_priv *priv, | |||
468 | } | 468 | } |
469 | if (ustatus) { | 469 | if (ustatus) { |
470 | nv_error(priv, "TRAP_PROP - TP %d -", tp); | 470 | nv_error(priv, "TRAP_PROP - TP %d -", tp); |
471 | nouveau_bitfield_print(nv50_graph_trap_prop, ustatus); | 471 | nouveau_bitfield_print(nv50_gr_trap_prop, ustatus); |
472 | pr_cont(" - Address %02x%08x\n", e14, e10); | 472 | pr_cont(" - Address %02x%08x\n", e14, e10); |
473 | } | 473 | } |
474 | nv_error(priv, "TRAP_PROP - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", | 474 | nv_error(priv, "TRAP_PROP - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", |
@@ -476,7 +476,7 @@ nv50_priv_prop_trap(struct nv50_graph_priv *priv, | |||
476 | } | 476 | } |
477 | 477 | ||
478 | static void | 478 | static void |
479 | nv50_priv_mp_trap(struct nv50_graph_priv *priv, int tpid, int display) | 479 | nv50_priv_mp_trap(struct nv50_gr_priv *priv, int tpid, int display) |
480 | { | 480 | { |
481 | u32 units = nv_rd32(priv, 0x1540); | 481 | u32 units = nv_rd32(priv, 0x1540); |
482 | u32 addr, mp10, status, pc, oplow, ophigh; | 482 | u32 addr, mp10, status, pc, oplow, ophigh; |
@@ -515,7 +515,7 @@ nv50_priv_mp_trap(struct nv50_graph_priv *priv, int tpid, int display) | |||
515 | } | 515 | } |
516 | 516 | ||
517 | static void | 517 | static void |
518 | nv50_priv_tp_trap(struct nv50_graph_priv *priv, int type, u32 ustatus_old, | 518 | nv50_priv_tp_trap(struct nv50_gr_priv *priv, int type, u32 ustatus_old, |
519 | u32 ustatus_new, int display, const char *name) | 519 | u32 ustatus_new, int display, const char *name) |
520 | { | 520 | { |
521 | int tps = 0; | 521 | int tps = 0; |
@@ -580,7 +580,7 @@ nv50_priv_tp_trap(struct nv50_graph_priv *priv, int type, u32 ustatus_old, | |||
580 | } | 580 | } |
581 | 581 | ||
582 | static int | 582 | static int |
583 | nv50_graph_trap_handler(struct nv50_graph_priv *priv, u32 display, | 583 | nv50_gr_trap_handler(struct nv50_gr_priv *priv, u32 display, |
584 | int chid, u64 inst, struct nouveau_object *engctx) | 584 | int chid, u64 inst, struct nouveau_object *engctx) |
585 | { | 585 | { |
586 | u32 status = nv_rd32(priv, 0x400108); | 586 | u32 status = nv_rd32(priv, 0x400108); |
@@ -670,7 +670,7 @@ nv50_graph_trap_handler(struct nv50_graph_priv *priv, u32 display, | |||
670 | u32 ustatus = nv_rd32(priv, 0x406800) & 0x7fffffff; | 670 | u32 ustatus = nv_rd32(priv, 0x406800) & 0x7fffffff; |
671 | if (display) { | 671 | if (display) { |
672 | nv_error(priv, "TRAP_M2MF"); | 672 | nv_error(priv, "TRAP_M2MF"); |
673 | nouveau_bitfield_print(nv50_graph_trap_m2mf, ustatus); | 673 | nouveau_bitfield_print(nv50_gr_trap_m2mf, ustatus); |
674 | pr_cont("\n"); | 674 | pr_cont("\n"); |
675 | nv_error(priv, "TRAP_M2MF %08x %08x %08x %08x\n", | 675 | nv_error(priv, "TRAP_M2MF %08x %08x %08x %08x\n", |
676 | nv_rd32(priv, 0x406804), nv_rd32(priv, 0x406808), | 676 | nv_rd32(priv, 0x406804), nv_rd32(priv, 0x406808), |
@@ -691,7 +691,7 @@ nv50_graph_trap_handler(struct nv50_graph_priv *priv, u32 display, | |||
691 | u32 ustatus = nv_rd32(priv, 0x400c04) & 0x7fffffff; | 691 | u32 ustatus = nv_rd32(priv, 0x400c04) & 0x7fffffff; |
692 | if (display) { | 692 | if (display) { |
693 | nv_error(priv, "TRAP_VFETCH"); | 693 | nv_error(priv, "TRAP_VFETCH"); |
694 | nouveau_bitfield_print(nv50_graph_trap_vfetch, ustatus); | 694 | nouveau_bitfield_print(nv50_gr_trap_vfetch, ustatus); |
695 | pr_cont("\n"); | 695 | pr_cont("\n"); |
696 | nv_error(priv, "TRAP_VFETCH %08x %08x %08x %08x\n", | 696 | nv_error(priv, "TRAP_VFETCH %08x %08x %08x %08x\n", |
697 | nv_rd32(priv, 0x400c00), nv_rd32(priv, 0x400c08), | 697 | nv_rd32(priv, 0x400c00), nv_rd32(priv, 0x400c08), |
@@ -708,7 +708,7 @@ nv50_graph_trap_handler(struct nv50_graph_priv *priv, u32 display, | |||
708 | ustatus = nv_rd32(priv, 0x401800) & 0x7fffffff; | 708 | ustatus = nv_rd32(priv, 0x401800) & 0x7fffffff; |
709 | if (display) { | 709 | if (display) { |
710 | nv_error(priv, "TRAP_STRMOUT"); | 710 | nv_error(priv, "TRAP_STRMOUT"); |
711 | nouveau_bitfield_print(nv50_graph_trap_strmout, ustatus); | 711 | nouveau_bitfield_print(nv50_gr_trap_strmout, ustatus); |
712 | pr_cont("\n"); | 712 | pr_cont("\n"); |
713 | nv_error(priv, "TRAP_STRMOUT %08x %08x %08x %08x\n", | 713 | nv_error(priv, "TRAP_STRMOUT %08x %08x %08x %08x\n", |
714 | nv_rd32(priv, 0x401804), nv_rd32(priv, 0x401808), | 714 | nv_rd32(priv, 0x401804), nv_rd32(priv, 0x401808), |
@@ -729,7 +729,7 @@ nv50_graph_trap_handler(struct nv50_graph_priv *priv, u32 display, | |||
729 | ustatus = nv_rd32(priv, 0x405018) & 0x7fffffff; | 729 | ustatus = nv_rd32(priv, 0x405018) & 0x7fffffff; |
730 | if (display) { | 730 | if (display) { |
731 | nv_error(priv, "TRAP_CCACHE"); | 731 | nv_error(priv, "TRAP_CCACHE"); |
732 | nouveau_bitfield_print(nv50_graph_trap_ccache, ustatus); | 732 | nouveau_bitfield_print(nv50_gr_trap_ccache, ustatus); |
733 | pr_cont("\n"); | 733 | pr_cont("\n"); |
734 | nv_error(priv, "TRAP_CCACHE %08x %08x %08x %08x" | 734 | nv_error(priv, "TRAP_CCACHE %08x %08x %08x %08x" |
735 | " %08x %08x %08x\n", | 735 | " %08x %08x %08x\n", |
@@ -791,13 +791,13 @@ nv50_graph_trap_handler(struct nv50_graph_priv *priv, u32 display, | |||
791 | } | 791 | } |
792 | 792 | ||
793 | static void | 793 | static void |
794 | nv50_graph_intr(struct nouveau_subdev *subdev) | 794 | nv50_gr_intr(struct nouveau_subdev *subdev) |
795 | { | 795 | { |
796 | struct nouveau_fifo *pfifo = nouveau_fifo(subdev); | 796 | struct nouveau_fifo *pfifo = nouveau_fifo(subdev); |
797 | struct nouveau_engine *engine = nv_engine(subdev); | 797 | struct nouveau_engine *engine = nv_engine(subdev); |
798 | struct nouveau_object *engctx; | 798 | struct nouveau_object *engctx; |
799 | struct nouveau_handle *handle = NULL; | 799 | struct nouveau_handle *handle = NULL; |
800 | struct nv50_graph_priv *priv = (void *)subdev; | 800 | struct nv50_gr_priv *priv = (void *)subdev; |
801 | u32 stat = nv_rd32(priv, 0x400100); | 801 | u32 stat = nv_rd32(priv, 0x400100); |
802 | u32 inst = nv_rd32(priv, 0x40032c) & 0x0fffffff; | 802 | u32 inst = nv_rd32(priv, 0x40032c) & 0x0fffffff; |
803 | u32 addr = nv_rd32(priv, 0x400704); | 803 | u32 addr = nv_rd32(priv, 0x400704); |
@@ -827,7 +827,7 @@ nv50_graph_intr(struct nouveau_subdev *subdev) | |||
827 | } | 827 | } |
828 | 828 | ||
829 | if (stat & 0x00200000) { | 829 | if (stat & 0x00200000) { |
830 | if (!nv50_graph_trap_handler(priv, show, chid, (u64)inst << 12, | 830 | if (!nv50_gr_trap_handler(priv, show, chid, (u64)inst << 12, |
831 | engctx)) | 831 | engctx)) |
832 | show &= ~0x00200000; | 832 | show &= ~0x00200000; |
833 | show_bitfield &= ~0x00200000; | 833 | show_bitfield &= ~0x00200000; |
@@ -840,7 +840,7 @@ nv50_graph_intr(struct nouveau_subdev *subdev) | |||
840 | show &= show_bitfield; | 840 | show &= show_bitfield; |
841 | if (show) { | 841 | if (show) { |
842 | nv_error(priv, "%s", ""); | 842 | nv_error(priv, "%s", ""); |
843 | nouveau_bitfield_print(nv50_graph_intr_name, show); | 843 | nouveau_bitfield_print(nv50_gr_intr_name, show); |
844 | pr_cont("\n"); | 844 | pr_cont("\n"); |
845 | } | 845 | } |
846 | nv_error(priv, | 846 | nv_error(priv, |
@@ -856,27 +856,27 @@ nv50_graph_intr(struct nouveau_subdev *subdev) | |||
856 | } | 856 | } |
857 | 857 | ||
858 | static int | 858 | static int |
859 | nv50_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 859 | nv50_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
860 | struct nouveau_oclass *oclass, void *data, u32 size, | 860 | struct nouveau_oclass *oclass, void *data, u32 size, |
861 | struct nouveau_object **pobject) | 861 | struct nouveau_object **pobject) |
862 | { | 862 | { |
863 | struct nv50_graph_priv *priv; | 863 | struct nv50_gr_priv *priv; |
864 | int ret; | 864 | int ret; |
865 | 865 | ||
866 | ret = nouveau_graph_create(parent, engine, oclass, true, &priv); | 866 | ret = nouveau_gr_create(parent, engine, oclass, true, &priv); |
867 | *pobject = nv_object(priv); | 867 | *pobject = nv_object(priv); |
868 | if (ret) | 868 | if (ret) |
869 | return ret; | 869 | return ret; |
870 | 870 | ||
871 | nv_subdev(priv)->unit = 0x00201000; | 871 | nv_subdev(priv)->unit = 0x00201000; |
872 | nv_subdev(priv)->intr = nv50_graph_intr; | 872 | nv_subdev(priv)->intr = nv50_gr_intr; |
873 | nv_engine(priv)->cclass = &nv50_graph_cclass; | 873 | nv_engine(priv)->cclass = &nv50_gr_cclass; |
874 | 874 | ||
875 | priv->base.units = nv50_graph_units; | 875 | priv->base.units = nv50_gr_units; |
876 | 876 | ||
877 | switch (nv_device(priv)->chipset) { | 877 | switch (nv_device(priv)->chipset) { |
878 | case 0x50: | 878 | case 0x50: |
879 | nv_engine(priv)->sclass = nv50_graph_sclass; | 879 | nv_engine(priv)->sclass = nv50_gr_sclass; |
880 | break; | 880 | break; |
881 | case 0x84: | 881 | case 0x84: |
882 | case 0x86: | 882 | case 0x86: |
@@ -884,20 +884,20 @@ nv50_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
884 | case 0x94: | 884 | case 0x94: |
885 | case 0x96: | 885 | case 0x96: |
886 | case 0x98: | 886 | case 0x98: |
887 | nv_engine(priv)->sclass = nv84_graph_sclass; | 887 | nv_engine(priv)->sclass = nv84_gr_sclass; |
888 | break; | 888 | break; |
889 | case 0xa0: | 889 | case 0xa0: |
890 | case 0xaa: | 890 | case 0xaa: |
891 | case 0xac: | 891 | case 0xac: |
892 | nv_engine(priv)->sclass = nva0_graph_sclass; | 892 | nv_engine(priv)->sclass = nva0_gr_sclass; |
893 | break; | 893 | break; |
894 | case 0xa3: | 894 | case 0xa3: |
895 | case 0xa5: | 895 | case 0xa5: |
896 | case 0xa8: | 896 | case 0xa8: |
897 | nv_engine(priv)->sclass = nva3_graph_sclass; | 897 | nv_engine(priv)->sclass = nva3_gr_sclass; |
898 | break; | 898 | break; |
899 | case 0xaf: | 899 | case 0xaf: |
900 | nv_engine(priv)->sclass = nvaf_graph_sclass; | 900 | nv_engine(priv)->sclass = nvaf_gr_sclass; |
901 | break; | 901 | break; |
902 | 902 | ||
903 | } | 903 | } |
@@ -905,19 +905,19 @@ nv50_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
905 | /* unfortunate hw bug workaround... */ | 905 | /* unfortunate hw bug workaround... */ |
906 | if (nv_device(priv)->chipset != 0x50 && | 906 | if (nv_device(priv)->chipset != 0x50 && |
907 | nv_device(priv)->chipset != 0xac) | 907 | nv_device(priv)->chipset != 0xac) |
908 | nv_engine(priv)->tlb_flush = nv84_graph_tlb_flush; | 908 | nv_engine(priv)->tlb_flush = nv84_gr_tlb_flush; |
909 | 909 | ||
910 | spin_lock_init(&priv->lock); | 910 | spin_lock_init(&priv->lock); |
911 | return 0; | 911 | return 0; |
912 | } | 912 | } |
913 | 913 | ||
914 | static int | 914 | static int |
915 | nv50_graph_init(struct nouveau_object *object) | 915 | nv50_gr_init(struct nouveau_object *object) |
916 | { | 916 | { |
917 | struct nv50_graph_priv *priv = (void *)object; | 917 | struct nv50_gr_priv *priv = (void *)object; |
918 | int ret, units, i; | 918 | int ret, units, i; |
919 | 919 | ||
920 | ret = nouveau_graph_init(&priv->base); | 920 | ret = nouveau_gr_init(&priv->base); |
921 | if (ret) | 921 | if (ret) |
922 | return ret; | 922 | return ret; |
923 | 923 | ||
@@ -998,12 +998,12 @@ nv50_graph_init(struct nouveau_object *object) | |||
998 | } | 998 | } |
999 | 999 | ||
1000 | struct nouveau_oclass | 1000 | struct nouveau_oclass |
1001 | nv50_graph_oclass = { | 1001 | nv50_gr_oclass = { |
1002 | .handle = NV_ENGINE(GR, 0x50), | 1002 | .handle = NV_ENGINE(GR, 0x50), |
1003 | .ofuncs = &(struct nouveau_ofuncs) { | 1003 | .ofuncs = &(struct nouveau_ofuncs) { |
1004 | .ctor = nv50_graph_ctor, | 1004 | .ctor = nv50_gr_ctor, |
1005 | .dtor = _nouveau_graph_dtor, | 1005 | .dtor = _nouveau_gr_dtor, |
1006 | .init = nv50_graph_init, | 1006 | .init = nv50_gr_init, |
1007 | .fini = _nouveau_graph_fini, | 1007 | .fini = _nouveau_gr_fini, |
1008 | }, | 1008 | }, |
1009 | }; | 1009 | }; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv50.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h index 0505fb419bde..eb39af055bbb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv50.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __NV50_GRAPH_H__ | 1 | #ifndef __NV50_GR_H__ |
2 | #define __NV50_GRAPH_H__ | 2 | #define __NV50_GR_H__ |
3 | 3 | ||
4 | int nv50_grctx_init(struct nouveau_device *, u32 *size); | 4 | int nv50_grctx_init(struct nouveau_device *, u32 *size); |
5 | void nv50_grctx_fill(struct nouveau_device *, struct nouveau_gpuobj *); | 5 | void nv50_grctx_fill(struct nouveau_device *, struct nouveau_gpuobj *); |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc0.c index 3e90e437dbbe..8133650b2777 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc0.c | |||
@@ -30,7 +30,7 @@ | |||
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | static void | 32 | static void |
33 | nvc0_graph_zbc_clear_color(struct nvc0_graph_priv *priv, int zbc) | 33 | nvc0_gr_zbc_clear_color(struct nvc0_gr_priv *priv, int zbc) |
34 | { | 34 | { |
35 | if (priv->zbc_color[zbc].format) { | 35 | if (priv->zbc_color[zbc].format) { |
36 | nv_wr32(priv, 0x405804, priv->zbc_color[zbc].ds[0]); | 36 | nv_wr32(priv, 0x405804, priv->zbc_color[zbc].ds[0]); |
@@ -44,7 +44,7 @@ nvc0_graph_zbc_clear_color(struct nvc0_graph_priv *priv, int zbc) | |||
44 | } | 44 | } |
45 | 45 | ||
46 | static int | 46 | static int |
47 | nvc0_graph_zbc_color_get(struct nvc0_graph_priv *priv, int format, | 47 | nvc0_gr_zbc_color_get(struct nvc0_gr_priv *priv, int format, |
48 | const u32 ds[4], const u32 l2[4]) | 48 | const u32 ds[4], const u32 l2[4]) |
49 | { | 49 | { |
50 | struct nouveau_ltc *ltc = nouveau_ltc(priv); | 50 | struct nouveau_ltc *ltc = nouveau_ltc(priv); |
@@ -75,12 +75,12 @@ nvc0_graph_zbc_color_get(struct nvc0_graph_priv *priv, int format, | |||
75 | memcpy(priv->zbc_color[zbc].l2, l2, sizeof(priv->zbc_color[zbc].l2)); | 75 | memcpy(priv->zbc_color[zbc].l2, l2, sizeof(priv->zbc_color[zbc].l2)); |
76 | priv->zbc_color[zbc].format = format; | 76 | priv->zbc_color[zbc].format = format; |
77 | ltc->zbc_color_get(ltc, zbc, l2); | 77 | ltc->zbc_color_get(ltc, zbc, l2); |
78 | nvc0_graph_zbc_clear_color(priv, zbc); | 78 | nvc0_gr_zbc_clear_color(priv, zbc); |
79 | return zbc; | 79 | return zbc; |
80 | } | 80 | } |
81 | 81 | ||
82 | static void | 82 | static void |
83 | nvc0_graph_zbc_clear_depth(struct nvc0_graph_priv *priv, int zbc) | 83 | nvc0_gr_zbc_clear_depth(struct nvc0_gr_priv *priv, int zbc) |
84 | { | 84 | { |
85 | if (priv->zbc_depth[zbc].format) | 85 | if (priv->zbc_depth[zbc].format) |
86 | nv_wr32(priv, 0x405818, priv->zbc_depth[zbc].ds); | 86 | nv_wr32(priv, 0x405818, priv->zbc_depth[zbc].ds); |
@@ -90,7 +90,7 @@ nvc0_graph_zbc_clear_depth(struct nvc0_graph_priv *priv, int zbc) | |||
90 | } | 90 | } |
91 | 91 | ||
92 | static int | 92 | static int |
93 | nvc0_graph_zbc_depth_get(struct nvc0_graph_priv *priv, int format, | 93 | nvc0_gr_zbc_depth_get(struct nvc0_gr_priv *priv, int format, |
94 | const u32 ds, const u32 l2) | 94 | const u32 ds, const u32 l2) |
95 | { | 95 | { |
96 | struct nouveau_ltc *ltc = nouveau_ltc(priv); | 96 | struct nouveau_ltc *ltc = nouveau_ltc(priv); |
@@ -119,7 +119,7 @@ nvc0_graph_zbc_depth_get(struct nvc0_graph_priv *priv, int format, | |||
119 | priv->zbc_depth[zbc].ds = ds; | 119 | priv->zbc_depth[zbc].ds = ds; |
120 | priv->zbc_depth[zbc].l2 = l2; | 120 | priv->zbc_depth[zbc].l2 = l2; |
121 | ltc->zbc_depth_get(ltc, zbc, l2); | 121 | ltc->zbc_depth_get(ltc, zbc, l2); |
122 | nvc0_graph_zbc_clear_depth(priv, zbc); | 122 | nvc0_gr_zbc_clear_depth(priv, zbc); |
123 | return zbc; | 123 | return zbc; |
124 | } | 124 | } |
125 | 125 | ||
@@ -130,7 +130,7 @@ nvc0_graph_zbc_depth_get(struct nvc0_graph_priv *priv, int format, | |||
130 | static int | 130 | static int |
131 | nvc0_fermi_mthd_zbc_color(struct nouveau_object *object, void *data, u32 size) | 131 | nvc0_fermi_mthd_zbc_color(struct nouveau_object *object, void *data, u32 size) |
132 | { | 132 | { |
133 | struct nvc0_graph_priv *priv = (void *)object->engine; | 133 | struct nvc0_gr_priv *priv = (void *)object->engine; |
134 | union { | 134 | union { |
135 | struct fermi_a_zbc_color_v0 v0; | 135 | struct fermi_a_zbc_color_v0 v0; |
136 | } *args = data; | 136 | } *args = data; |
@@ -157,7 +157,7 @@ nvc0_fermi_mthd_zbc_color(struct nouveau_object *object, void *data, u32 size) | |||
157 | case FERMI_A_ZBC_COLOR_V0_FMT_AU8BU8GU8RU8: | 157 | case FERMI_A_ZBC_COLOR_V0_FMT_AU8BU8GU8RU8: |
158 | case FERMI_A_ZBC_COLOR_V0_FMT_A2R10G10B10: | 158 | case FERMI_A_ZBC_COLOR_V0_FMT_A2R10G10B10: |
159 | case FERMI_A_ZBC_COLOR_V0_FMT_BF10GF11RF11: | 159 | case FERMI_A_ZBC_COLOR_V0_FMT_BF10GF11RF11: |
160 | ret = nvc0_graph_zbc_color_get(priv, args->v0.format, | 160 | ret = nvc0_gr_zbc_color_get(priv, args->v0.format, |
161 | args->v0.ds, | 161 | args->v0.ds, |
162 | args->v0.l2); | 162 | args->v0.l2); |
163 | if (ret >= 0) { | 163 | if (ret >= 0) { |
@@ -176,7 +176,7 @@ nvc0_fermi_mthd_zbc_color(struct nouveau_object *object, void *data, u32 size) | |||
176 | static int | 176 | static int |
177 | nvc0_fermi_mthd_zbc_depth(struct nouveau_object *object, void *data, u32 size) | 177 | nvc0_fermi_mthd_zbc_depth(struct nouveau_object *object, void *data, u32 size) |
178 | { | 178 | { |
179 | struct nvc0_graph_priv *priv = (void *)object->engine; | 179 | struct nvc0_gr_priv *priv = (void *)object->engine; |
180 | union { | 180 | union { |
181 | struct fermi_a_zbc_depth_v0 v0; | 181 | struct fermi_a_zbc_depth_v0 v0; |
182 | } *args = data; | 182 | } *args = data; |
@@ -185,7 +185,7 @@ nvc0_fermi_mthd_zbc_depth(struct nouveau_object *object, void *data, u32 size) | |||
185 | if (nvif_unpack(args->v0, 0, 0, false)) { | 185 | if (nvif_unpack(args->v0, 0, 0, false)) { |
186 | switch (args->v0.format) { | 186 | switch (args->v0.format) { |
187 | case FERMI_A_ZBC_DEPTH_V0_FMT_FP32: | 187 | case FERMI_A_ZBC_DEPTH_V0_FMT_FP32: |
188 | ret = nvc0_graph_zbc_depth_get(priv, args->v0.format, | 188 | ret = nvc0_gr_zbc_depth_get(priv, args->v0.format, |
189 | args->v0.ds, | 189 | args->v0.ds, |
190 | args->v0.l2); | 190 | args->v0.l2); |
191 | return (ret >= 0) ? 0 : -ENOSPC; | 191 | return (ret >= 0) ? 0 : -ENOSPC; |
@@ -221,10 +221,10 @@ nvc0_fermi_ofuncs = { | |||
221 | }; | 221 | }; |
222 | 222 | ||
223 | static int | 223 | static int |
224 | nvc0_graph_set_shader_exceptions(struct nouveau_object *object, u32 mthd, | 224 | nvc0_gr_set_shader_exceptions(struct nouveau_object *object, u32 mthd, |
225 | void *pdata, u32 size) | 225 | void *pdata, u32 size) |
226 | { | 226 | { |
227 | struct nvc0_graph_priv *priv = (void *)nv_engine(object); | 227 | struct nvc0_gr_priv *priv = (void *)nv_engine(object); |
228 | if (size >= sizeof(u32)) { | 228 | if (size >= sizeof(u32)) { |
229 | u32 data = *(u32 *)pdata ? 0xffffffff : 0x00000000; | 229 | u32 data = *(u32 *)pdata ? 0xffffffff : 0x00000000; |
230 | nv_wr32(priv, 0x419e44, data); | 230 | nv_wr32(priv, 0x419e44, data); |
@@ -235,23 +235,23 @@ nvc0_graph_set_shader_exceptions(struct nouveau_object *object, u32 mthd, | |||
235 | } | 235 | } |
236 | 236 | ||
237 | struct nouveau_omthds | 237 | struct nouveau_omthds |
238 | nvc0_graph_9097_omthds[] = { | 238 | nvc0_gr_9097_omthds[] = { |
239 | { 0x1528, 0x1528, nvc0_graph_set_shader_exceptions }, | 239 | { 0x1528, 0x1528, nvc0_gr_set_shader_exceptions }, |
240 | {} | 240 | {} |
241 | }; | 241 | }; |
242 | 242 | ||
243 | struct nouveau_omthds | 243 | struct nouveau_omthds |
244 | nvc0_graph_90c0_omthds[] = { | 244 | nvc0_gr_90c0_omthds[] = { |
245 | { 0x1528, 0x1528, nvc0_graph_set_shader_exceptions }, | 245 | { 0x1528, 0x1528, nvc0_gr_set_shader_exceptions }, |
246 | {} | 246 | {} |
247 | }; | 247 | }; |
248 | 248 | ||
249 | struct nouveau_oclass | 249 | struct nouveau_oclass |
250 | nvc0_graph_sclass[] = { | 250 | nvc0_gr_sclass[] = { |
251 | { 0x902d, &nouveau_object_ofuncs }, | 251 | { 0x902d, &nouveau_object_ofuncs }, |
252 | { 0x9039, &nouveau_object_ofuncs }, | 252 | { 0x9039, &nouveau_object_ofuncs }, |
253 | { FERMI_A, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 253 | { FERMI_A, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
254 | { FERMI_COMPUTE_A, &nouveau_object_ofuncs, nvc0_graph_90c0_omthds }, | 254 | { FERMI_COMPUTE_A, &nouveau_object_ofuncs, nvc0_gr_90c0_omthds }, |
255 | {} | 255 | {} |
256 | }; | 256 | }; |
257 | 257 | ||
@@ -260,20 +260,20 @@ nvc0_graph_sclass[] = { | |||
260 | ******************************************************************************/ | 260 | ******************************************************************************/ |
261 | 261 | ||
262 | int | 262 | int |
263 | nvc0_graph_context_ctor(struct nouveau_object *parent, | 263 | nvc0_gr_context_ctor(struct nouveau_object *parent, |
264 | struct nouveau_object *engine, | 264 | struct nouveau_object *engine, |
265 | struct nouveau_oclass *oclass, void *args, u32 size, | 265 | struct nouveau_oclass *oclass, void *args, u32 size, |
266 | struct nouveau_object **pobject) | 266 | struct nouveau_object **pobject) |
267 | { | 267 | { |
268 | struct nouveau_vm *vm = nouveau_client(parent)->vm; | 268 | struct nouveau_vm *vm = nouveau_client(parent)->vm; |
269 | struct nvc0_graph_priv *priv = (void *)engine; | 269 | struct nvc0_gr_priv *priv = (void *)engine; |
270 | struct nvc0_graph_data *data = priv->mmio_data; | 270 | struct nvc0_gr_data *data = priv->mmio_data; |
271 | struct nvc0_graph_mmio *mmio = priv->mmio_list; | 271 | struct nvc0_gr_mmio *mmio = priv->mmio_list; |
272 | struct nvc0_graph_chan *chan; | 272 | struct nvc0_gr_chan *chan; |
273 | int ret, i; | 273 | int ret, i; |
274 | 274 | ||
275 | /* allocate memory for context, and fill with default values */ | 275 | /* allocate memory for context, and fill with default values */ |
276 | ret = nouveau_graph_context_create(parent, engine, oclass, NULL, | 276 | ret = nouveau_gr_context_create(parent, engine, oclass, NULL, |
277 | priv->size, 0x100, | 277 | priv->size, 0x100, |
278 | NVOBJ_FLAG_ZERO_ALLOC, &chan); | 278 | NVOBJ_FLAG_ZERO_ALLOC, &chan); |
279 | *pobject = nv_object(chan); | 279 | *pobject = nv_object(chan); |
@@ -347,9 +347,9 @@ nvc0_graph_context_ctor(struct nouveau_object *parent, | |||
347 | } | 347 | } |
348 | 348 | ||
349 | void | 349 | void |
350 | nvc0_graph_context_dtor(struct nouveau_object *object) | 350 | nvc0_gr_context_dtor(struct nouveau_object *object) |
351 | { | 351 | { |
352 | struct nvc0_graph_chan *chan = (void *)object; | 352 | struct nvc0_gr_chan *chan = (void *)object; |
353 | int i; | 353 | int i; |
354 | 354 | ||
355 | for (i = 0; i < ARRAY_SIZE(chan->data); i++) { | 355 | for (i = 0; i < ARRAY_SIZE(chan->data); i++) { |
@@ -360,15 +360,15 @@ nvc0_graph_context_dtor(struct nouveau_object *object) | |||
360 | nouveau_gpuobj_unmap(&chan->mmio_vma); | 360 | nouveau_gpuobj_unmap(&chan->mmio_vma); |
361 | nouveau_gpuobj_ref(NULL, &chan->mmio); | 361 | nouveau_gpuobj_ref(NULL, &chan->mmio); |
362 | 362 | ||
363 | nouveau_graph_context_destroy(&chan->base); | 363 | nouveau_gr_context_destroy(&chan->base); |
364 | } | 364 | } |
365 | 365 | ||
366 | /******************************************************************************* | 366 | /******************************************************************************* |
367 | * PGRAPH register lists | 367 | * PGRAPH register lists |
368 | ******************************************************************************/ | 368 | ******************************************************************************/ |
369 | 369 | ||
370 | const struct nvc0_graph_init | 370 | const struct nvc0_gr_init |
371 | nvc0_graph_init_main_0[] = { | 371 | nvc0_gr_init_main_0[] = { |
372 | { 0x400080, 1, 0x04, 0x003083c2 }, | 372 | { 0x400080, 1, 0x04, 0x003083c2 }, |
373 | { 0x400088, 1, 0x04, 0x00006fe7 }, | 373 | { 0x400088, 1, 0x04, 0x00006fe7 }, |
374 | { 0x40008c, 1, 0x04, 0x00000000 }, | 374 | { 0x40008c, 1, 0x04, 0x00000000 }, |
@@ -383,53 +383,53 @@ nvc0_graph_init_main_0[] = { | |||
383 | {} | 383 | {} |
384 | }; | 384 | }; |
385 | 385 | ||
386 | const struct nvc0_graph_init | 386 | const struct nvc0_gr_init |
387 | nvc0_graph_init_fe_0[] = { | 387 | nvc0_gr_init_fe_0[] = { |
388 | { 0x40415c, 1, 0x04, 0x00000000 }, | 388 | { 0x40415c, 1, 0x04, 0x00000000 }, |
389 | { 0x404170, 1, 0x04, 0x00000000 }, | 389 | { 0x404170, 1, 0x04, 0x00000000 }, |
390 | {} | 390 | {} |
391 | }; | 391 | }; |
392 | 392 | ||
393 | const struct nvc0_graph_init | 393 | const struct nvc0_gr_init |
394 | nvc0_graph_init_pri_0[] = { | 394 | nvc0_gr_init_pri_0[] = { |
395 | { 0x404488, 2, 0x04, 0x00000000 }, | 395 | { 0x404488, 2, 0x04, 0x00000000 }, |
396 | {} | 396 | {} |
397 | }; | 397 | }; |
398 | 398 | ||
399 | const struct nvc0_graph_init | 399 | const struct nvc0_gr_init |
400 | nvc0_graph_init_rstr2d_0[] = { | 400 | nvc0_gr_init_rstr2d_0[] = { |
401 | { 0x407808, 1, 0x04, 0x00000000 }, | 401 | { 0x407808, 1, 0x04, 0x00000000 }, |
402 | {} | 402 | {} |
403 | }; | 403 | }; |
404 | 404 | ||
405 | const struct nvc0_graph_init | 405 | const struct nvc0_gr_init |
406 | nvc0_graph_init_pd_0[] = { | 406 | nvc0_gr_init_pd_0[] = { |
407 | { 0x406024, 1, 0x04, 0x00000000 }, | 407 | { 0x406024, 1, 0x04, 0x00000000 }, |
408 | {} | 408 | {} |
409 | }; | 409 | }; |
410 | 410 | ||
411 | const struct nvc0_graph_init | 411 | const struct nvc0_gr_init |
412 | nvc0_graph_init_ds_0[] = { | 412 | nvc0_gr_init_ds_0[] = { |
413 | { 0x405844, 1, 0x04, 0x00ffffff }, | 413 | { 0x405844, 1, 0x04, 0x00ffffff }, |
414 | { 0x405850, 1, 0x04, 0x00000000 }, | 414 | { 0x405850, 1, 0x04, 0x00000000 }, |
415 | { 0x405908, 1, 0x04, 0x00000000 }, | 415 | { 0x405908, 1, 0x04, 0x00000000 }, |
416 | {} | 416 | {} |
417 | }; | 417 | }; |
418 | 418 | ||
419 | const struct nvc0_graph_init | 419 | const struct nvc0_gr_init |
420 | nvc0_graph_init_scc_0[] = { | 420 | nvc0_gr_init_scc_0[] = { |
421 | { 0x40803c, 1, 0x04, 0x00000000 }, | 421 | { 0x40803c, 1, 0x04, 0x00000000 }, |
422 | {} | 422 | {} |
423 | }; | 423 | }; |
424 | 424 | ||
425 | const struct nvc0_graph_init | 425 | const struct nvc0_gr_init |
426 | nvc0_graph_init_prop_0[] = { | 426 | nvc0_gr_init_prop_0[] = { |
427 | { 0x4184a0, 1, 0x04, 0x00000000 }, | 427 | { 0x4184a0, 1, 0x04, 0x00000000 }, |
428 | {} | 428 | {} |
429 | }; | 429 | }; |
430 | 430 | ||
431 | const struct nvc0_graph_init | 431 | const struct nvc0_gr_init |
432 | nvc0_graph_init_gpc_unk_0[] = { | 432 | nvc0_gr_init_gpc_unk_0[] = { |
433 | { 0x418604, 1, 0x04, 0x00000000 }, | 433 | { 0x418604, 1, 0x04, 0x00000000 }, |
434 | { 0x418680, 1, 0x04, 0x00000000 }, | 434 | { 0x418680, 1, 0x04, 0x00000000 }, |
435 | { 0x418714, 1, 0x04, 0x80000000 }, | 435 | { 0x418714, 1, 0x04, 0x80000000 }, |
@@ -437,20 +437,20 @@ nvc0_graph_init_gpc_unk_0[] = { | |||
437 | {} | 437 | {} |
438 | }; | 438 | }; |
439 | 439 | ||
440 | const struct nvc0_graph_init | 440 | const struct nvc0_gr_init |
441 | nvc0_graph_init_setup_0[] = { | 441 | nvc0_gr_init_setup_0[] = { |
442 | { 0x418814, 3, 0x04, 0x00000000 }, | 442 | { 0x418814, 3, 0x04, 0x00000000 }, |
443 | {} | 443 | {} |
444 | }; | 444 | }; |
445 | 445 | ||
446 | const struct nvc0_graph_init | 446 | const struct nvc0_gr_init |
447 | nvc0_graph_init_crstr_0[] = { | 447 | nvc0_gr_init_crstr_0[] = { |
448 | { 0x418b04, 1, 0x04, 0x00000000 }, | 448 | { 0x418b04, 1, 0x04, 0x00000000 }, |
449 | {} | 449 | {} |
450 | }; | 450 | }; |
451 | 451 | ||
452 | const struct nvc0_graph_init | 452 | const struct nvc0_gr_init |
453 | nvc0_graph_init_setup_1[] = { | 453 | nvc0_gr_init_setup_1[] = { |
454 | { 0x4188c8, 1, 0x04, 0x80000000 }, | 454 | { 0x4188c8, 1, 0x04, 0x80000000 }, |
455 | { 0x4188cc, 1, 0x04, 0x00000000 }, | 455 | { 0x4188cc, 1, 0x04, 0x00000000 }, |
456 | { 0x4188d0, 1, 0x04, 0x00010000 }, | 456 | { 0x4188d0, 1, 0x04, 0x00010000 }, |
@@ -458,8 +458,8 @@ nvc0_graph_init_setup_1[] = { | |||
458 | {} | 458 | {} |
459 | }; | 459 | }; |
460 | 460 | ||
461 | const struct nvc0_graph_init | 461 | const struct nvc0_gr_init |
462 | nvc0_graph_init_zcull_0[] = { | 462 | nvc0_gr_init_zcull_0[] = { |
463 | { 0x418910, 1, 0x04, 0x00010001 }, | 463 | { 0x418910, 1, 0x04, 0x00010001 }, |
464 | { 0x418914, 1, 0x04, 0x00000301 }, | 464 | { 0x418914, 1, 0x04, 0x00000301 }, |
465 | { 0x418918, 1, 0x04, 0x00800000 }, | 465 | { 0x418918, 1, 0x04, 0x00800000 }, |
@@ -468,15 +468,15 @@ nvc0_graph_init_zcull_0[] = { | |||
468 | {} | 468 | {} |
469 | }; | 469 | }; |
470 | 470 | ||
471 | const struct nvc0_graph_init | 471 | const struct nvc0_gr_init |
472 | nvc0_graph_init_gpm_0[] = { | 472 | nvc0_gr_init_gpm_0[] = { |
473 | { 0x418c04, 1, 0x04, 0x00000000 }, | 473 | { 0x418c04, 1, 0x04, 0x00000000 }, |
474 | { 0x418c88, 1, 0x04, 0x00000000 }, | 474 | { 0x418c88, 1, 0x04, 0x00000000 }, |
475 | {} | 475 | {} |
476 | }; | 476 | }; |
477 | 477 | ||
478 | const struct nvc0_graph_init | 478 | const struct nvc0_gr_init |
479 | nvc0_graph_init_gpc_unk_1[] = { | 479 | nvc0_gr_init_gpc_unk_1[] = { |
480 | { 0x418d00, 1, 0x04, 0x00000000 }, | 480 | { 0x418d00, 1, 0x04, 0x00000000 }, |
481 | { 0x418f08, 1, 0x04, 0x00000000 }, | 481 | { 0x418f08, 1, 0x04, 0x00000000 }, |
482 | { 0x418e00, 1, 0x04, 0x00000050 }, | 482 | { 0x418e00, 1, 0x04, 0x00000050 }, |
@@ -484,30 +484,30 @@ nvc0_graph_init_gpc_unk_1[] = { | |||
484 | {} | 484 | {} |
485 | }; | 485 | }; |
486 | 486 | ||
487 | const struct nvc0_graph_init | 487 | const struct nvc0_gr_init |
488 | nvc0_graph_init_gcc_0[] = { | 488 | nvc0_gr_init_gcc_0[] = { |
489 | { 0x41900c, 1, 0x04, 0x00000000 }, | 489 | { 0x41900c, 1, 0x04, 0x00000000 }, |
490 | { 0x419018, 1, 0x04, 0x00000000 }, | 490 | { 0x419018, 1, 0x04, 0x00000000 }, |
491 | {} | 491 | {} |
492 | }; | 492 | }; |
493 | 493 | ||
494 | const struct nvc0_graph_init | 494 | const struct nvc0_gr_init |
495 | nvc0_graph_init_tpccs_0[] = { | 495 | nvc0_gr_init_tpccs_0[] = { |
496 | { 0x419d08, 2, 0x04, 0x00000000 }, | 496 | { 0x419d08, 2, 0x04, 0x00000000 }, |
497 | { 0x419d10, 1, 0x04, 0x00000014 }, | 497 | { 0x419d10, 1, 0x04, 0x00000014 }, |
498 | {} | 498 | {} |
499 | }; | 499 | }; |
500 | 500 | ||
501 | const struct nvc0_graph_init | 501 | const struct nvc0_gr_init |
502 | nvc0_graph_init_tex_0[] = { | 502 | nvc0_gr_init_tex_0[] = { |
503 | { 0x419ab0, 1, 0x04, 0x00000000 }, | 503 | { 0x419ab0, 1, 0x04, 0x00000000 }, |
504 | { 0x419ab8, 1, 0x04, 0x000000e7 }, | 504 | { 0x419ab8, 1, 0x04, 0x000000e7 }, |
505 | { 0x419abc, 2, 0x04, 0x00000000 }, | 505 | { 0x419abc, 2, 0x04, 0x00000000 }, |
506 | {} | 506 | {} |
507 | }; | 507 | }; |
508 | 508 | ||
509 | const struct nvc0_graph_init | 509 | const struct nvc0_gr_init |
510 | nvc0_graph_init_pe_0[] = { | 510 | nvc0_gr_init_pe_0[] = { |
511 | { 0x41980c, 3, 0x04, 0x00000000 }, | 511 | { 0x41980c, 3, 0x04, 0x00000000 }, |
512 | { 0x419844, 1, 0x04, 0x00000000 }, | 512 | { 0x419844, 1, 0x04, 0x00000000 }, |
513 | { 0x41984c, 1, 0x04, 0x00005bc5 }, | 513 | { 0x41984c, 1, 0x04, 0x00005bc5 }, |
@@ -515,8 +515,8 @@ nvc0_graph_init_pe_0[] = { | |||
515 | {} | 515 | {} |
516 | }; | 516 | }; |
517 | 517 | ||
518 | const struct nvc0_graph_init | 518 | const struct nvc0_gr_init |
519 | nvc0_graph_init_l1c_0[] = { | 519 | nvc0_gr_init_l1c_0[] = { |
520 | { 0x419c98, 1, 0x04, 0x00000000 }, | 520 | { 0x419c98, 1, 0x04, 0x00000000 }, |
521 | { 0x419ca8, 1, 0x04, 0x80000000 }, | 521 | { 0x419ca8, 1, 0x04, 0x80000000 }, |
522 | { 0x419cb4, 1, 0x04, 0x00000000 }, | 522 | { 0x419cb4, 1, 0x04, 0x00000000 }, |
@@ -526,27 +526,27 @@ nvc0_graph_init_l1c_0[] = { | |||
526 | {} | 526 | {} |
527 | }; | 527 | }; |
528 | 528 | ||
529 | const struct nvc0_graph_init | 529 | const struct nvc0_gr_init |
530 | nvc0_graph_init_wwdx_0[] = { | 530 | nvc0_gr_init_wwdx_0[] = { |
531 | { 0x419bd4, 1, 0x04, 0x00800000 }, | 531 | { 0x419bd4, 1, 0x04, 0x00800000 }, |
532 | { 0x419bdc, 1, 0x04, 0x00000000 }, | 532 | { 0x419bdc, 1, 0x04, 0x00000000 }, |
533 | {} | 533 | {} |
534 | }; | 534 | }; |
535 | 535 | ||
536 | const struct nvc0_graph_init | 536 | const struct nvc0_gr_init |
537 | nvc0_graph_init_tpccs_1[] = { | 537 | nvc0_gr_init_tpccs_1[] = { |
538 | { 0x419d2c, 1, 0x04, 0x00000000 }, | 538 | { 0x419d2c, 1, 0x04, 0x00000000 }, |
539 | {} | 539 | {} |
540 | }; | 540 | }; |
541 | 541 | ||
542 | const struct nvc0_graph_init | 542 | const struct nvc0_gr_init |
543 | nvc0_graph_init_mpc_0[] = { | 543 | nvc0_gr_init_mpc_0[] = { |
544 | { 0x419c0c, 1, 0x04, 0x00000000 }, | 544 | { 0x419c0c, 1, 0x04, 0x00000000 }, |
545 | {} | 545 | {} |
546 | }; | 546 | }; |
547 | 547 | ||
548 | static const struct nvc0_graph_init | 548 | static const struct nvc0_gr_init |
549 | nvc0_graph_init_sm_0[] = { | 549 | nvc0_gr_init_sm_0[] = { |
550 | { 0x419e00, 1, 0x04, 0x00000000 }, | 550 | { 0x419e00, 1, 0x04, 0x00000000 }, |
551 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 551 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
552 | { 0x419ea4, 1, 0x04, 0x00000100 }, | 552 | { 0x419ea4, 1, 0x04, 0x00000100 }, |
@@ -563,8 +563,8 @@ nvc0_graph_init_sm_0[] = { | |||
563 | {} | 563 | {} |
564 | }; | 564 | }; |
565 | 565 | ||
566 | const struct nvc0_graph_init | 566 | const struct nvc0_gr_init |
567 | nvc0_graph_init_be_0[] = { | 567 | nvc0_gr_init_be_0[] = { |
568 | { 0x40880c, 1, 0x04, 0x00000000 }, | 568 | { 0x40880c, 1, 0x04, 0x00000000 }, |
569 | { 0x408910, 9, 0x04, 0x00000000 }, | 569 | { 0x408910, 9, 0x04, 0x00000000 }, |
570 | { 0x408950, 1, 0x04, 0x00000000 }, | 570 | { 0x408950, 1, 0x04, 0x00000000 }, |
@@ -575,47 +575,47 @@ nvc0_graph_init_be_0[] = { | |||
575 | {} | 575 | {} |
576 | }; | 576 | }; |
577 | 577 | ||
578 | const struct nvc0_graph_init | 578 | const struct nvc0_gr_init |
579 | nvc0_graph_init_fe_1[] = { | 579 | nvc0_gr_init_fe_1[] = { |
580 | { 0x4040f0, 1, 0x04, 0x00000000 }, | 580 | { 0x4040f0, 1, 0x04, 0x00000000 }, |
581 | {} | 581 | {} |
582 | }; | 582 | }; |
583 | 583 | ||
584 | const struct nvc0_graph_init | 584 | const struct nvc0_gr_init |
585 | nvc0_graph_init_pe_1[] = { | 585 | nvc0_gr_init_pe_1[] = { |
586 | { 0x419880, 1, 0x04, 0x00000002 }, | 586 | { 0x419880, 1, 0x04, 0x00000002 }, |
587 | {} | 587 | {} |
588 | }; | 588 | }; |
589 | 589 | ||
590 | static const struct nvc0_graph_pack | 590 | static const struct nvc0_gr_pack |
591 | nvc0_graph_pack_mmio[] = { | 591 | nvc0_gr_pack_mmio[] = { |
592 | { nvc0_graph_init_main_0 }, | 592 | { nvc0_gr_init_main_0 }, |
593 | { nvc0_graph_init_fe_0 }, | 593 | { nvc0_gr_init_fe_0 }, |
594 | { nvc0_graph_init_pri_0 }, | 594 | { nvc0_gr_init_pri_0 }, |
595 | { nvc0_graph_init_rstr2d_0 }, | 595 | { nvc0_gr_init_rstr2d_0 }, |
596 | { nvc0_graph_init_pd_0 }, | 596 | { nvc0_gr_init_pd_0 }, |
597 | { nvc0_graph_init_ds_0 }, | 597 | { nvc0_gr_init_ds_0 }, |
598 | { nvc0_graph_init_scc_0 }, | 598 | { nvc0_gr_init_scc_0 }, |
599 | { nvc0_graph_init_prop_0 }, | 599 | { nvc0_gr_init_prop_0 }, |
600 | { nvc0_graph_init_gpc_unk_0 }, | 600 | { nvc0_gr_init_gpc_unk_0 }, |
601 | { nvc0_graph_init_setup_0 }, | 601 | { nvc0_gr_init_setup_0 }, |
602 | { nvc0_graph_init_crstr_0 }, | 602 | { nvc0_gr_init_crstr_0 }, |
603 | { nvc0_graph_init_setup_1 }, | 603 | { nvc0_gr_init_setup_1 }, |
604 | { nvc0_graph_init_zcull_0 }, | 604 | { nvc0_gr_init_zcull_0 }, |
605 | { nvc0_graph_init_gpm_0 }, | 605 | { nvc0_gr_init_gpm_0 }, |
606 | { nvc0_graph_init_gpc_unk_1 }, | 606 | { nvc0_gr_init_gpc_unk_1 }, |
607 | { nvc0_graph_init_gcc_0 }, | 607 | { nvc0_gr_init_gcc_0 }, |
608 | { nvc0_graph_init_tpccs_0 }, | 608 | { nvc0_gr_init_tpccs_0 }, |
609 | { nvc0_graph_init_tex_0 }, | 609 | { nvc0_gr_init_tex_0 }, |
610 | { nvc0_graph_init_pe_0 }, | 610 | { nvc0_gr_init_pe_0 }, |
611 | { nvc0_graph_init_l1c_0 }, | 611 | { nvc0_gr_init_l1c_0 }, |
612 | { nvc0_graph_init_wwdx_0 }, | 612 | { nvc0_gr_init_wwdx_0 }, |
613 | { nvc0_graph_init_tpccs_1 }, | 613 | { nvc0_gr_init_tpccs_1 }, |
614 | { nvc0_graph_init_mpc_0 }, | 614 | { nvc0_gr_init_mpc_0 }, |
615 | { nvc0_graph_init_sm_0 }, | 615 | { nvc0_gr_init_sm_0 }, |
616 | { nvc0_graph_init_be_0 }, | 616 | { nvc0_gr_init_be_0 }, |
617 | { nvc0_graph_init_fe_1 }, | 617 | { nvc0_gr_init_fe_1 }, |
618 | { nvc0_graph_init_pe_1 }, | 618 | { nvc0_gr_init_pe_1 }, |
619 | {} | 619 | {} |
620 | }; | 620 | }; |
621 | 621 | ||
@@ -624,7 +624,7 @@ nvc0_graph_pack_mmio[] = { | |||
624 | ******************************************************************************/ | 624 | ******************************************************************************/ |
625 | 625 | ||
626 | void | 626 | void |
627 | nvc0_graph_zbc_init(struct nvc0_graph_priv *priv) | 627 | nvc0_gr_zbc_init(struct nvc0_gr_priv *priv) |
628 | { | 628 | { |
629 | const u32 zero[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, | 629 | const u32 zero[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, |
630 | 0x00000000, 0x00000000, 0x00000000, 0x00000000 }; | 630 | 0x00000000, 0x00000000, 0x00000000, 0x00000000 }; |
@@ -638,25 +638,25 @@ nvc0_graph_zbc_init(struct nvc0_graph_priv *priv) | |||
638 | int index; | 638 | int index; |
639 | 639 | ||
640 | if (!priv->zbc_color[0].format) { | 640 | if (!priv->zbc_color[0].format) { |
641 | nvc0_graph_zbc_color_get(priv, 1, & zero[0], &zero[4]); | 641 | nvc0_gr_zbc_color_get(priv, 1, & zero[0], &zero[4]); |
642 | nvc0_graph_zbc_color_get(priv, 2, & one[0], &one[4]); | 642 | nvc0_gr_zbc_color_get(priv, 2, & one[0], &one[4]); |
643 | nvc0_graph_zbc_color_get(priv, 4, &f32_0[0], &f32_0[4]); | 643 | nvc0_gr_zbc_color_get(priv, 4, &f32_0[0], &f32_0[4]); |
644 | nvc0_graph_zbc_color_get(priv, 4, &f32_1[0], &f32_1[4]); | 644 | nvc0_gr_zbc_color_get(priv, 4, &f32_1[0], &f32_1[4]); |
645 | nvc0_graph_zbc_depth_get(priv, 1, 0x00000000, 0x00000000); | 645 | nvc0_gr_zbc_depth_get(priv, 1, 0x00000000, 0x00000000); |
646 | nvc0_graph_zbc_depth_get(priv, 1, 0x3f800000, 0x3f800000); | 646 | nvc0_gr_zbc_depth_get(priv, 1, 0x3f800000, 0x3f800000); |
647 | } | 647 | } |
648 | 648 | ||
649 | for (index = ltc->zbc_min; index <= ltc->zbc_max; index++) | 649 | for (index = ltc->zbc_min; index <= ltc->zbc_max; index++) |
650 | nvc0_graph_zbc_clear_color(priv, index); | 650 | nvc0_gr_zbc_clear_color(priv, index); |
651 | for (index = ltc->zbc_min; index <= ltc->zbc_max; index++) | 651 | for (index = ltc->zbc_min; index <= ltc->zbc_max; index++) |
652 | nvc0_graph_zbc_clear_depth(priv, index); | 652 | nvc0_gr_zbc_clear_depth(priv, index); |
653 | } | 653 | } |
654 | 654 | ||
655 | void | 655 | void |
656 | nvc0_graph_mmio(struct nvc0_graph_priv *priv, const struct nvc0_graph_pack *p) | 656 | nvc0_gr_mmio(struct nvc0_gr_priv *priv, const struct nvc0_gr_pack *p) |
657 | { | 657 | { |
658 | const struct nvc0_graph_pack *pack; | 658 | const struct nvc0_gr_pack *pack; |
659 | const struct nvc0_graph_init *init; | 659 | const struct nvc0_gr_init *init; |
660 | 660 | ||
661 | pack_for_each_init(init, pack, p) { | 661 | pack_for_each_init(init, pack, p) { |
662 | u32 next = init->addr + init->count * init->pitch; | 662 | u32 next = init->addr + init->count * init->pitch; |
@@ -669,10 +669,10 @@ nvc0_graph_mmio(struct nvc0_graph_priv *priv, const struct nvc0_graph_pack *p) | |||
669 | } | 669 | } |
670 | 670 | ||
671 | void | 671 | void |
672 | nvc0_graph_icmd(struct nvc0_graph_priv *priv, const struct nvc0_graph_pack *p) | 672 | nvc0_gr_icmd(struct nvc0_gr_priv *priv, const struct nvc0_gr_pack *p) |
673 | { | 673 | { |
674 | const struct nvc0_graph_pack *pack; | 674 | const struct nvc0_gr_pack *pack; |
675 | const struct nvc0_graph_init *init; | 675 | const struct nvc0_gr_init *init; |
676 | u32 data = 0; | 676 | u32 data = 0; |
677 | 677 | ||
678 | nv_wr32(priv, 0x400208, 0x80000000); | 678 | nv_wr32(priv, 0x400208, 0x80000000); |
@@ -697,10 +697,10 @@ nvc0_graph_icmd(struct nvc0_graph_priv *priv, const struct nvc0_graph_pack *p) | |||
697 | } | 697 | } |
698 | 698 | ||
699 | void | 699 | void |
700 | nvc0_graph_mthd(struct nvc0_graph_priv *priv, const struct nvc0_graph_pack *p) | 700 | nvc0_gr_mthd(struct nvc0_gr_priv *priv, const struct nvc0_gr_pack *p) |
701 | { | 701 | { |
702 | const struct nvc0_graph_pack *pack; | 702 | const struct nvc0_gr_pack *pack; |
703 | const struct nvc0_graph_init *init; | 703 | const struct nvc0_gr_init *init; |
704 | u32 data = 0; | 704 | u32 data = 0; |
705 | 705 | ||
706 | pack_for_each_init(init, pack, p) { | 706 | pack_for_each_init(init, pack, p) { |
@@ -721,9 +721,9 @@ nvc0_graph_mthd(struct nvc0_graph_priv *priv, const struct nvc0_graph_pack *p) | |||
721 | } | 721 | } |
722 | 722 | ||
723 | u64 | 723 | u64 |
724 | nvc0_graph_units(struct nouveau_graph *graph) | 724 | nvc0_gr_units(struct nouveau_gr *gr) |
725 | { | 725 | { |
726 | struct nvc0_graph_priv *priv = (void *)graph; | 726 | struct nvc0_gr_priv *priv = (void *)gr; |
727 | u64 cfg; | 727 | u64 cfg; |
728 | 728 | ||
729 | cfg = (u32)priv->gpc_nr; | 729 | cfg = (u32)priv->gpc_nr; |
@@ -759,7 +759,7 @@ static const struct nouveau_enum nvc0_gpc_rop_error[] = { | |||
759 | }; | 759 | }; |
760 | 760 | ||
761 | static void | 761 | static void |
762 | nvc0_graph_trap_gpc_rop(struct nvc0_graph_priv *priv, int gpc) | 762 | nvc0_gr_trap_gpc_rop(struct nvc0_gr_priv *priv, int gpc) |
763 | { | 763 | { |
764 | u32 trap[4]; | 764 | u32 trap[4]; |
765 | int i; | 765 | int i; |
@@ -804,7 +804,7 @@ static const struct nouveau_bitfield nvc0_mp_global_error[] = { | |||
804 | }; | 804 | }; |
805 | 805 | ||
806 | static void | 806 | static void |
807 | nvc0_graph_trap_mp(struct nvc0_graph_priv *priv, int gpc, int tpc) | 807 | nvc0_gr_trap_mp(struct nvc0_gr_priv *priv, int gpc, int tpc) |
808 | { | 808 | { |
809 | u32 werr = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x648)); | 809 | u32 werr = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x648)); |
810 | u32 gerr = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x650)); | 810 | u32 gerr = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x650)); |
@@ -822,7 +822,7 @@ nvc0_graph_trap_mp(struct nvc0_graph_priv *priv, int gpc, int tpc) | |||
822 | } | 822 | } |
823 | 823 | ||
824 | static void | 824 | static void |
825 | nvc0_graph_trap_tpc(struct nvc0_graph_priv *priv, int gpc, int tpc) | 825 | nvc0_gr_trap_tpc(struct nvc0_gr_priv *priv, int gpc, int tpc) |
826 | { | 826 | { |
827 | u32 stat = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x0508)); | 827 | u32 stat = nv_rd32(priv, TPC_UNIT(gpc, tpc, 0x0508)); |
828 | 828 | ||
@@ -834,7 +834,7 @@ nvc0_graph_trap_tpc(struct nvc0_graph_priv *priv, int gpc, int tpc) | |||
834 | } | 834 | } |
835 | 835 | ||
836 | if (stat & 0x00000002) { | 836 | if (stat & 0x00000002) { |
837 | nvc0_graph_trap_mp(priv, gpc, tpc); | 837 | nvc0_gr_trap_mp(priv, gpc, tpc); |
838 | stat &= ~0x00000002; | 838 | stat &= ~0x00000002; |
839 | } | 839 | } |
840 | 840 | ||
@@ -858,13 +858,13 @@ nvc0_graph_trap_tpc(struct nvc0_graph_priv *priv, int gpc, int tpc) | |||
858 | } | 858 | } |
859 | 859 | ||
860 | static void | 860 | static void |
861 | nvc0_graph_trap_gpc(struct nvc0_graph_priv *priv, int gpc) | 861 | nvc0_gr_trap_gpc(struct nvc0_gr_priv *priv, int gpc) |
862 | { | 862 | { |
863 | u32 stat = nv_rd32(priv, GPC_UNIT(gpc, 0x2c90)); | 863 | u32 stat = nv_rd32(priv, GPC_UNIT(gpc, 0x2c90)); |
864 | int tpc; | 864 | int tpc; |
865 | 865 | ||
866 | if (stat & 0x00000001) { | 866 | if (stat & 0x00000001) { |
867 | nvc0_graph_trap_gpc_rop(priv, gpc); | 867 | nvc0_gr_trap_gpc_rop(priv, gpc); |
868 | stat &= ~0x00000001; | 868 | stat &= ~0x00000001; |
869 | } | 869 | } |
870 | 870 | ||
@@ -892,7 +892,7 @@ nvc0_graph_trap_gpc(struct nvc0_graph_priv *priv, int gpc) | |||
892 | for (tpc = 0; tpc < priv->tpc_nr[gpc]; tpc++) { | 892 | for (tpc = 0; tpc < priv->tpc_nr[gpc]; tpc++) { |
893 | u32 mask = 0x00010000 << tpc; | 893 | u32 mask = 0x00010000 << tpc; |
894 | if (stat & mask) { | 894 | if (stat & mask) { |
895 | nvc0_graph_trap_tpc(priv, gpc, tpc); | 895 | nvc0_gr_trap_tpc(priv, gpc, tpc); |
896 | nv_wr32(priv, GPC_UNIT(gpc, 0x2c90), mask); | 896 | nv_wr32(priv, GPC_UNIT(gpc, 0x2c90), mask); |
897 | stat &= ~mask; | 897 | stat &= ~mask; |
898 | } | 898 | } |
@@ -904,7 +904,7 @@ nvc0_graph_trap_gpc(struct nvc0_graph_priv *priv, int gpc) | |||
904 | } | 904 | } |
905 | 905 | ||
906 | static void | 906 | static void |
907 | nvc0_graph_trap_intr(struct nvc0_graph_priv *priv) | 907 | nvc0_gr_trap_intr(struct nvc0_gr_priv *priv) |
908 | { | 908 | { |
909 | u32 trap = nv_rd32(priv, 0x400108); | 909 | u32 trap = nv_rd32(priv, 0x400108); |
910 | int rop, gpc, i; | 910 | int rop, gpc, i; |
@@ -980,7 +980,7 @@ nvc0_graph_trap_intr(struct nvc0_graph_priv *priv) | |||
980 | for (gpc = 0; stat && gpc < priv->gpc_nr; gpc++) { | 980 | for (gpc = 0; stat && gpc < priv->gpc_nr; gpc++) { |
981 | u32 mask = 0x00000001 << gpc; | 981 | u32 mask = 0x00000001 << gpc; |
982 | if (stat & mask) { | 982 | if (stat & mask) { |
983 | nvc0_graph_trap_gpc(priv, gpc); | 983 | nvc0_gr_trap_gpc(priv, gpc); |
984 | nv_wr32(priv, 0x400118, mask); | 984 | nv_wr32(priv, 0x400118, mask); |
985 | stat &= ~mask; | 985 | stat &= ~mask; |
986 | } | 986 | } |
@@ -1009,7 +1009,7 @@ nvc0_graph_trap_intr(struct nvc0_graph_priv *priv) | |||
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | static void | 1011 | static void |
1012 | nvc0_graph_ctxctl_debug_unit(struct nvc0_graph_priv *priv, u32 base) | 1012 | nvc0_gr_ctxctl_debug_unit(struct nvc0_gr_priv *priv, u32 base) |
1013 | { | 1013 | { |
1014 | nv_error(priv, "%06x - done 0x%08x\n", base, | 1014 | nv_error(priv, "%06x - done 0x%08x\n", base, |
1015 | nv_rd32(priv, base + 0x400)); | 1015 | nv_rd32(priv, base + 0x400)); |
@@ -1022,18 +1022,18 @@ nvc0_graph_ctxctl_debug_unit(struct nvc0_graph_priv *priv, u32 base) | |||
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | void | 1024 | void |
1025 | nvc0_graph_ctxctl_debug(struct nvc0_graph_priv *priv) | 1025 | nvc0_gr_ctxctl_debug(struct nvc0_gr_priv *priv) |
1026 | { | 1026 | { |
1027 | u32 gpcnr = nv_rd32(priv, 0x409604) & 0xffff; | 1027 | u32 gpcnr = nv_rd32(priv, 0x409604) & 0xffff; |
1028 | u32 gpc; | 1028 | u32 gpc; |
1029 | 1029 | ||
1030 | nvc0_graph_ctxctl_debug_unit(priv, 0x409000); | 1030 | nvc0_gr_ctxctl_debug_unit(priv, 0x409000); |
1031 | for (gpc = 0; gpc < gpcnr; gpc++) | 1031 | for (gpc = 0; gpc < gpcnr; gpc++) |
1032 | nvc0_graph_ctxctl_debug_unit(priv, 0x502000 + (gpc * 0x8000)); | 1032 | nvc0_gr_ctxctl_debug_unit(priv, 0x502000 + (gpc * 0x8000)); |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | static void | 1035 | static void |
1036 | nvc0_graph_ctxctl_isr(struct nvc0_graph_priv *priv) | 1036 | nvc0_gr_ctxctl_isr(struct nvc0_gr_priv *priv) |
1037 | { | 1037 | { |
1038 | u32 stat = nv_rd32(priv, 0x409c18); | 1038 | u32 stat = nv_rd32(priv, 0x409c18); |
1039 | 1039 | ||
@@ -1059,26 +1059,26 @@ nvc0_graph_ctxctl_isr(struct nvc0_graph_priv *priv) | |||
1059 | 1059 | ||
1060 | if (stat & 0x00080000) { | 1060 | if (stat & 0x00080000) { |
1061 | nv_error(priv, "FECS watchdog timeout\n"); | 1061 | nv_error(priv, "FECS watchdog timeout\n"); |
1062 | nvc0_graph_ctxctl_debug(priv); | 1062 | nvc0_gr_ctxctl_debug(priv); |
1063 | nv_wr32(priv, 0x409c20, 0x00080000); | 1063 | nv_wr32(priv, 0x409c20, 0x00080000); |
1064 | stat &= ~0x00080000; | 1064 | stat &= ~0x00080000; |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | if (stat) { | 1067 | if (stat) { |
1068 | nv_error(priv, "FECS 0x%08x\n", stat); | 1068 | nv_error(priv, "FECS 0x%08x\n", stat); |
1069 | nvc0_graph_ctxctl_debug(priv); | 1069 | nvc0_gr_ctxctl_debug(priv); |
1070 | nv_wr32(priv, 0x409c20, stat); | 1070 | nv_wr32(priv, 0x409c20, stat); |
1071 | } | 1071 | } |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | static void | 1074 | static void |
1075 | nvc0_graph_intr(struct nouveau_subdev *subdev) | 1075 | nvc0_gr_intr(struct nouveau_subdev *subdev) |
1076 | { | 1076 | { |
1077 | struct nouveau_fifo *pfifo = nouveau_fifo(subdev); | 1077 | struct nouveau_fifo *pfifo = nouveau_fifo(subdev); |
1078 | struct nouveau_engine *engine = nv_engine(subdev); | 1078 | struct nouveau_engine *engine = nv_engine(subdev); |
1079 | struct nouveau_object *engctx; | 1079 | struct nouveau_object *engctx; |
1080 | struct nouveau_handle *handle; | 1080 | struct nouveau_handle *handle; |
1081 | struct nvc0_graph_priv *priv = (void *)subdev; | 1081 | struct nvc0_gr_priv *priv = (void *)subdev; |
1082 | u64 inst = nv_rd32(priv, 0x409b00) & 0x0fffffff; | 1082 | u64 inst = nv_rd32(priv, 0x409b00) & 0x0fffffff; |
1083 | u32 stat = nv_rd32(priv, 0x400100); | 1083 | u32 stat = nv_rd32(priv, 0x400100); |
1084 | u32 addr = nv_rd32(priv, 0x400704); | 1084 | u32 addr = nv_rd32(priv, 0x400704); |
@@ -1127,13 +1127,13 @@ nvc0_graph_intr(struct nouveau_subdev *subdev) | |||
1127 | if (stat & 0x00200000) { | 1127 | if (stat & 0x00200000) { |
1128 | nv_error(priv, "TRAP ch %d [0x%010llx %s]\n", chid, inst << 12, | 1128 | nv_error(priv, "TRAP ch %d [0x%010llx %s]\n", chid, inst << 12, |
1129 | nouveau_client_name(engctx)); | 1129 | nouveau_client_name(engctx)); |
1130 | nvc0_graph_trap_intr(priv); | 1130 | nvc0_gr_trap_intr(priv); |
1131 | nv_wr32(priv, 0x400100, 0x00200000); | 1131 | nv_wr32(priv, 0x400100, 0x00200000); |
1132 | stat &= ~0x00200000; | 1132 | stat &= ~0x00200000; |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | if (stat & 0x00080000) { | 1135 | if (stat & 0x00080000) { |
1136 | nvc0_graph_ctxctl_isr(priv); | 1136 | nvc0_gr_ctxctl_isr(priv); |
1137 | nv_wr32(priv, 0x400100, 0x00080000); | 1137 | nv_wr32(priv, 0x400100, 0x00080000); |
1138 | stat &= ~0x00080000; | 1138 | stat &= ~0x00080000; |
1139 | } | 1139 | } |
@@ -1148,8 +1148,8 @@ nvc0_graph_intr(struct nouveau_subdev *subdev) | |||
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | void | 1150 | void |
1151 | nvc0_graph_init_fw(struct nvc0_graph_priv *priv, u32 fuc_base, | 1151 | nvc0_gr_init_fw(struct nvc0_gr_priv *priv, u32 fuc_base, |
1152 | struct nvc0_graph_fuc *code, struct nvc0_graph_fuc *data) | 1152 | struct nvc0_gr_fuc *code, struct nvc0_gr_fuc *data) |
1153 | { | 1153 | { |
1154 | int i; | 1154 | int i; |
1155 | 1155 | ||
@@ -1170,12 +1170,12 @@ nvc0_graph_init_fw(struct nvc0_graph_priv *priv, u32 fuc_base, | |||
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | static void | 1172 | static void |
1173 | nvc0_graph_init_csdata(struct nvc0_graph_priv *priv, | 1173 | nvc0_gr_init_csdata(struct nvc0_gr_priv *priv, |
1174 | const struct nvc0_graph_pack *pack, | 1174 | const struct nvc0_gr_pack *pack, |
1175 | u32 falcon, u32 starstar, u32 base) | 1175 | u32 falcon, u32 starstar, u32 base) |
1176 | { | 1176 | { |
1177 | const struct nvc0_graph_pack *iter; | 1177 | const struct nvc0_gr_pack *iter; |
1178 | const struct nvc0_graph_init *init; | 1178 | const struct nvc0_gr_init *init; |
1179 | u32 addr = ~0, prev = ~0, xfer = 0; | 1179 | u32 addr = ~0, prev = ~0, xfer = 0; |
1180 | u32 star, temp; | 1180 | u32 star, temp; |
1181 | 1181 | ||
@@ -1211,18 +1211,18 @@ nvc0_graph_init_csdata(struct nvc0_graph_priv *priv, | |||
1211 | } | 1211 | } |
1212 | 1212 | ||
1213 | int | 1213 | int |
1214 | nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv) | 1214 | nvc0_gr_init_ctxctl(struct nvc0_gr_priv *priv) |
1215 | { | 1215 | { |
1216 | struct nvc0_graph_oclass *oclass = (void *)nv_object(priv)->oclass; | 1216 | struct nvc0_gr_oclass *oclass = (void *)nv_object(priv)->oclass; |
1217 | struct nvc0_grctx_oclass *cclass = (void *)nv_engine(priv)->cclass; | 1217 | struct nvc0_grctx_oclass *cclass = (void *)nv_engine(priv)->cclass; |
1218 | int i; | 1218 | int i; |
1219 | 1219 | ||
1220 | if (priv->firmware) { | 1220 | if (priv->firmware) { |
1221 | /* load fuc microcode */ | 1221 | /* load fuc microcode */ |
1222 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); | 1222 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 0); |
1223 | nvc0_graph_init_fw(priv, 0x409000, &priv->fuc409c, | 1223 | nvc0_gr_init_fw(priv, 0x409000, &priv->fuc409c, |
1224 | &priv->fuc409d); | 1224 | &priv->fuc409d); |
1225 | nvc0_graph_init_fw(priv, 0x41a000, &priv->fuc41ac, | 1225 | nvc0_gr_init_fw(priv, 0x41a000, &priv->fuc41ac, |
1226 | &priv->fuc41ad); | 1226 | &priv->fuc41ad); |
1227 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); | 1227 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); |
1228 | 1228 | ||
@@ -1337,17 +1337,17 @@ nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv) | |||
1337 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); | 1337 | nouveau_mc(priv)->unk260(nouveau_mc(priv), 1); |
1338 | 1338 | ||
1339 | /* load register lists */ | 1339 | /* load register lists */ |
1340 | nvc0_graph_init_csdata(priv, cclass->hub, 0x409000, 0x000, 0x000000); | 1340 | nvc0_gr_init_csdata(priv, cclass->hub, 0x409000, 0x000, 0x000000); |
1341 | nvc0_graph_init_csdata(priv, cclass->gpc, 0x41a000, 0x000, 0x418000); | 1341 | nvc0_gr_init_csdata(priv, cclass->gpc, 0x41a000, 0x000, 0x418000); |
1342 | nvc0_graph_init_csdata(priv, cclass->tpc, 0x41a000, 0x004, 0x419800); | 1342 | nvc0_gr_init_csdata(priv, cclass->tpc, 0x41a000, 0x004, 0x419800); |
1343 | nvc0_graph_init_csdata(priv, cclass->ppc, 0x41a000, 0x008, 0x41be00); | 1343 | nvc0_gr_init_csdata(priv, cclass->ppc, 0x41a000, 0x008, 0x41be00); |
1344 | 1344 | ||
1345 | /* start HUB ucode running, it'll init the GPCs */ | 1345 | /* start HUB ucode running, it'll init the GPCs */ |
1346 | nv_wr32(priv, 0x40910c, 0x00000000); | 1346 | nv_wr32(priv, 0x40910c, 0x00000000); |
1347 | nv_wr32(priv, 0x409100, 0x00000002); | 1347 | nv_wr32(priv, 0x409100, 0x00000002); |
1348 | if (!nv_wait(priv, 0x409800, 0x80000000, 0x80000000)) { | 1348 | if (!nv_wait(priv, 0x409800, 0x80000000, 0x80000000)) { |
1349 | nv_error(priv, "HUB_INIT timed out\n"); | 1349 | nv_error(priv, "HUB_INIT timed out\n"); |
1350 | nvc0_graph_ctxctl_debug(priv); | 1350 | nvc0_gr_ctxctl_debug(priv); |
1351 | return -EBUSY; | 1351 | return -EBUSY; |
1352 | } | 1352 | } |
1353 | 1353 | ||
@@ -1364,17 +1364,17 @@ nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv) | |||
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | int | 1366 | int |
1367 | nvc0_graph_init(struct nouveau_object *object) | 1367 | nvc0_gr_init(struct nouveau_object *object) |
1368 | { | 1368 | { |
1369 | struct nvc0_graph_oclass *oclass = (void *)object->oclass; | 1369 | struct nvc0_gr_oclass *oclass = (void *)object->oclass; |
1370 | struct nvc0_graph_priv *priv = (void *)object; | 1370 | struct nvc0_gr_priv *priv = (void *)object; |
1371 | const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tpc_total); | 1371 | const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tpc_total); |
1372 | u32 data[TPC_MAX / 8] = {}; | 1372 | u32 data[TPC_MAX / 8] = {}; |
1373 | u8 tpcnr[GPC_MAX]; | 1373 | u8 tpcnr[GPC_MAX]; |
1374 | int gpc, tpc, rop; | 1374 | int gpc, tpc, rop; |
1375 | int ret, i; | 1375 | int ret, i; |
1376 | 1376 | ||
1377 | ret = nouveau_graph_init(&priv->base); | 1377 | ret = nouveau_gr_init(&priv->base); |
1378 | if (ret) | 1378 | if (ret) |
1379 | return ret; | 1379 | return ret; |
1380 | 1380 | ||
@@ -1387,7 +1387,7 @@ nvc0_graph_init(struct nouveau_object *object) | |||
1387 | nv_wr32(priv, GPC_BCAST(0x08b4), priv->unk4188b4->addr >> 8); | 1387 | nv_wr32(priv, GPC_BCAST(0x08b4), priv->unk4188b4->addr >> 8); |
1388 | nv_wr32(priv, GPC_BCAST(0x08b8), priv->unk4188b8->addr >> 8); | 1388 | nv_wr32(priv, GPC_BCAST(0x08b8), priv->unk4188b8->addr >> 8); |
1389 | 1389 | ||
1390 | nvc0_graph_mmio(priv, oclass->mmio); | 1390 | nvc0_gr_mmio(priv, oclass->mmio); |
1391 | 1391 | ||
1392 | memcpy(tpcnr, priv->tpc_nr, sizeof(priv->tpc_nr)); | 1392 | memcpy(tpcnr, priv->tpc_nr, sizeof(priv->tpc_nr)); |
1393 | for (i = 0, gpc = -1; i < priv->tpc_total; i++) { | 1393 | for (i = 0, gpc = -1; i < priv->tpc_total; i++) { |
@@ -1470,21 +1470,21 @@ nvc0_graph_init(struct nouveau_object *object) | |||
1470 | 1470 | ||
1471 | nv_wr32(priv, 0x400054, 0x34ce3464); | 1471 | nv_wr32(priv, 0x400054, 0x34ce3464); |
1472 | 1472 | ||
1473 | nvc0_graph_zbc_init(priv); | 1473 | nvc0_gr_zbc_init(priv); |
1474 | 1474 | ||
1475 | return nvc0_graph_init_ctxctl(priv); | 1475 | return nvc0_gr_init_ctxctl(priv); |
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | static void | 1478 | static void |
1479 | nvc0_graph_dtor_fw(struct nvc0_graph_fuc *fuc) | 1479 | nvc0_gr_dtor_fw(struct nvc0_gr_fuc *fuc) |
1480 | { | 1480 | { |
1481 | kfree(fuc->data); | 1481 | kfree(fuc->data); |
1482 | fuc->data = NULL; | 1482 | fuc->data = NULL; |
1483 | } | 1483 | } |
1484 | 1484 | ||
1485 | int | 1485 | int |
1486 | nvc0_graph_ctor_fw(struct nvc0_graph_priv *priv, const char *fwname, | 1486 | nvc0_gr_ctor_fw(struct nvc0_gr_priv *priv, const char *fwname, |
1487 | struct nvc0_graph_fuc *fuc) | 1487 | struct nvc0_gr_fuc *fuc) |
1488 | { | 1488 | { |
1489 | struct nouveau_device *device = nv_device(priv); | 1489 | struct nouveau_device *device = nv_device(priv); |
1490 | const struct firmware *fw; | 1490 | const struct firmware *fw; |
@@ -1509,31 +1509,31 @@ nvc0_graph_ctor_fw(struct nvc0_graph_priv *priv, const char *fwname, | |||
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | void | 1511 | void |
1512 | nvc0_graph_dtor(struct nouveau_object *object) | 1512 | nvc0_gr_dtor(struct nouveau_object *object) |
1513 | { | 1513 | { |
1514 | struct nvc0_graph_priv *priv = (void *)object; | 1514 | struct nvc0_gr_priv *priv = (void *)object; |
1515 | 1515 | ||
1516 | kfree(priv->data); | 1516 | kfree(priv->data); |
1517 | 1517 | ||
1518 | nvc0_graph_dtor_fw(&priv->fuc409c); | 1518 | nvc0_gr_dtor_fw(&priv->fuc409c); |
1519 | nvc0_graph_dtor_fw(&priv->fuc409d); | 1519 | nvc0_gr_dtor_fw(&priv->fuc409d); |
1520 | nvc0_graph_dtor_fw(&priv->fuc41ac); | 1520 | nvc0_gr_dtor_fw(&priv->fuc41ac); |
1521 | nvc0_graph_dtor_fw(&priv->fuc41ad); | 1521 | nvc0_gr_dtor_fw(&priv->fuc41ad); |
1522 | 1522 | ||
1523 | nouveau_gpuobj_ref(NULL, &priv->unk4188b8); | 1523 | nouveau_gpuobj_ref(NULL, &priv->unk4188b8); |
1524 | nouveau_gpuobj_ref(NULL, &priv->unk4188b4); | 1524 | nouveau_gpuobj_ref(NULL, &priv->unk4188b4); |
1525 | 1525 | ||
1526 | nouveau_graph_destroy(&priv->base); | 1526 | nouveau_gr_destroy(&priv->base); |
1527 | } | 1527 | } |
1528 | 1528 | ||
1529 | int | 1529 | int |
1530 | nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | 1530 | nvc0_gr_ctor(struct nouveau_object *parent, struct nouveau_object *engine, |
1531 | struct nouveau_oclass *bclass, void *data, u32 size, | 1531 | struct nouveau_oclass *bclass, void *data, u32 size, |
1532 | struct nouveau_object **pobject) | 1532 | struct nouveau_object **pobject) |
1533 | { | 1533 | { |
1534 | struct nvc0_graph_oclass *oclass = (void *)bclass; | 1534 | struct nvc0_gr_oclass *oclass = (void *)bclass; |
1535 | struct nouveau_device *device = nv_device(parent); | 1535 | struct nouveau_device *device = nv_device(parent); |
1536 | struct nvc0_graph_priv *priv; | 1536 | struct nvc0_gr_priv *priv; |
1537 | bool use_ext_fw, enable; | 1537 | bool use_ext_fw, enable; |
1538 | int ret, i, j; | 1538 | int ret, i, j; |
1539 | 1539 | ||
@@ -1541,22 +1541,22 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
1541 | oclass->fecs.ucode == NULL); | 1541 | oclass->fecs.ucode == NULL); |
1542 | enable = use_ext_fw || oclass->fecs.ucode != NULL; | 1542 | enable = use_ext_fw || oclass->fecs.ucode != NULL; |
1543 | 1543 | ||
1544 | ret = nouveau_graph_create(parent, engine, bclass, enable, &priv); | 1544 | ret = nouveau_gr_create(parent, engine, bclass, enable, &priv); |
1545 | *pobject = nv_object(priv); | 1545 | *pobject = nv_object(priv); |
1546 | if (ret) | 1546 | if (ret) |
1547 | return ret; | 1547 | return ret; |
1548 | 1548 | ||
1549 | nv_subdev(priv)->unit = 0x08001000; | 1549 | nv_subdev(priv)->unit = 0x08001000; |
1550 | nv_subdev(priv)->intr = nvc0_graph_intr; | 1550 | nv_subdev(priv)->intr = nvc0_gr_intr; |
1551 | 1551 | ||
1552 | priv->base.units = nvc0_graph_units; | 1552 | priv->base.units = nvc0_gr_units; |
1553 | 1553 | ||
1554 | if (use_ext_fw) { | 1554 | if (use_ext_fw) { |
1555 | nv_info(priv, "using external firmware\n"); | 1555 | nv_info(priv, "using external firmware\n"); |
1556 | if (nvc0_graph_ctor_fw(priv, "fuc409c", &priv->fuc409c) || | 1556 | if (nvc0_gr_ctor_fw(priv, "fuc409c", &priv->fuc409c) || |
1557 | nvc0_graph_ctor_fw(priv, "fuc409d", &priv->fuc409d) || | 1557 | nvc0_gr_ctor_fw(priv, "fuc409d", &priv->fuc409d) || |
1558 | nvc0_graph_ctor_fw(priv, "fuc41ac", &priv->fuc41ac) || | 1558 | nvc0_gr_ctor_fw(priv, "fuc41ac", &priv->fuc41ac) || |
1559 | nvc0_graph_ctor_fw(priv, "fuc41ad", &priv->fuc41ad)) | 1559 | nvc0_gr_ctor_fw(priv, "fuc41ad", &priv->fuc41ad)) |
1560 | return -ENODEV; | 1560 | return -ENODEV; |
1561 | priv->firmware = true; | 1561 | priv->firmware = true; |
1562 | } | 1562 | } |
@@ -1632,8 +1632,8 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
1632 | 1632 | ||
1633 | #include "fuc/hubnvc0.fuc3.h" | 1633 | #include "fuc/hubnvc0.fuc3.h" |
1634 | 1634 | ||
1635 | struct nvc0_graph_ucode | 1635 | struct nvc0_gr_ucode |
1636 | nvc0_graph_fecs_ucode = { | 1636 | nvc0_gr_fecs_ucode = { |
1637 | .code.data = nvc0_grhub_code, | 1637 | .code.data = nvc0_grhub_code, |
1638 | .code.size = sizeof(nvc0_grhub_code), | 1638 | .code.size = sizeof(nvc0_grhub_code), |
1639 | .data.data = nvc0_grhub_data, | 1639 | .data.data = nvc0_grhub_data, |
@@ -1642,8 +1642,8 @@ nvc0_graph_fecs_ucode = { | |||
1642 | 1642 | ||
1643 | #include "fuc/gpcnvc0.fuc3.h" | 1643 | #include "fuc/gpcnvc0.fuc3.h" |
1644 | 1644 | ||
1645 | struct nvc0_graph_ucode | 1645 | struct nvc0_gr_ucode |
1646 | nvc0_graph_gpccs_ucode = { | 1646 | nvc0_gr_gpccs_ucode = { |
1647 | .code.data = nvc0_grgpc_code, | 1647 | .code.data = nvc0_grgpc_code, |
1648 | .code.size = sizeof(nvc0_grgpc_code), | 1648 | .code.size = sizeof(nvc0_grgpc_code), |
1649 | .data.data = nvc0_grgpc_data, | 1649 | .data.data = nvc0_grgpc_data, |
@@ -1651,17 +1651,17 @@ nvc0_graph_gpccs_ucode = { | |||
1651 | }; | 1651 | }; |
1652 | 1652 | ||
1653 | struct nouveau_oclass * | 1653 | struct nouveau_oclass * |
1654 | nvc0_graph_oclass = &(struct nvc0_graph_oclass) { | 1654 | nvc0_gr_oclass = &(struct nvc0_gr_oclass) { |
1655 | .base.handle = NV_ENGINE(GR, 0xc0), | 1655 | .base.handle = NV_ENGINE(GR, 0xc0), |
1656 | .base.ofuncs = &(struct nouveau_ofuncs) { | 1656 | .base.ofuncs = &(struct nouveau_ofuncs) { |
1657 | .ctor = nvc0_graph_ctor, | 1657 | .ctor = nvc0_gr_ctor, |
1658 | .dtor = nvc0_graph_dtor, | 1658 | .dtor = nvc0_gr_dtor, |
1659 | .init = nvc0_graph_init, | 1659 | .init = nvc0_gr_init, |
1660 | .fini = _nouveau_graph_fini, | 1660 | .fini = _nouveau_gr_fini, |
1661 | }, | 1661 | }, |
1662 | .cclass = &nvc0_grctx_oclass, | 1662 | .cclass = &nvc0_grctx_oclass, |
1663 | .sclass = nvc0_graph_sclass, | 1663 | .sclass = nvc0_gr_sclass, |
1664 | .mmio = nvc0_graph_pack_mmio, | 1664 | .mmio = nvc0_gr_pack_mmio, |
1665 | .fecs.ucode = &nvc0_graph_fecs_ucode, | 1665 | .fecs.ucode = &nvc0_gr_fecs_ucode, |
1666 | .gpccs.ucode = &nvc0_graph_gpccs_ucode, | 1666 | .gpccs.ucode = &nvc0_gr_gpccs_ucode, |
1667 | }.base; | 1667 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc0.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc0.h new file mode 100644 index 000000000000..f2818a2b6d68 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc0.h | |||
@@ -0,0 +1,270 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Red Hat Inc. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * Authors: Ben Skeggs | ||
23 | */ | ||
24 | |||
25 | #ifndef __NVC0_GR_H__ | ||
26 | #define __NVC0_GR_H__ | ||
27 | |||
28 | #include <core/client.h> | ||
29 | #include <core/handle.h> | ||
30 | #include <core/gpuobj.h> | ||
31 | #include <core/option.h> | ||
32 | |||
33 | #include <nvif/unpack.h> | ||
34 | #include <nvif/class.h> | ||
35 | |||
36 | #include <subdev/fb.h> | ||
37 | #include <subdev/mmu.h> | ||
38 | #include <subdev/bar.h> | ||
39 | #include <subdev/timer.h> | ||
40 | #include <subdev/mc.h> | ||
41 | #include <subdev/ltc.h> | ||
42 | |||
43 | #include <engine/fifo.h> | ||
44 | #include <engine/gr.h> | ||
45 | |||
46 | #include "fuc/os.h" | ||
47 | |||
48 | #define GPC_MAX 32 | ||
49 | #define TPC_MAX (GPC_MAX * 8) | ||
50 | |||
51 | #define ROP_BCAST(r) (0x408800 + (r)) | ||
52 | #define ROP_UNIT(u, r) (0x410000 + (u) * 0x400 + (r)) | ||
53 | #define GPC_BCAST(r) (0x418000 + (r)) | ||
54 | #define GPC_UNIT(t, r) (0x500000 + (t) * 0x8000 + (r)) | ||
55 | #define PPC_UNIT(t, m, r) (0x503000 + (t) * 0x8000 + (m) * 0x200 + (r)) | ||
56 | #define TPC_UNIT(t, m, r) (0x504000 + (t) * 0x8000 + (m) * 0x800 + (r)) | ||
57 | |||
58 | struct nvc0_gr_data { | ||
59 | u32 size; | ||
60 | u32 align; | ||
61 | u32 access; | ||
62 | }; | ||
63 | |||
64 | struct nvc0_gr_mmio { | ||
65 | u32 addr; | ||
66 | u32 data; | ||
67 | u32 shift; | ||
68 | int buffer; | ||
69 | }; | ||
70 | |||
71 | struct nvc0_gr_fuc { | ||
72 | u32 *data; | ||
73 | u32 size; | ||
74 | }; | ||
75 | |||
76 | struct nvc0_gr_zbc_color { | ||
77 | u32 format; | ||
78 | u32 ds[4]; | ||
79 | u32 l2[4]; | ||
80 | }; | ||
81 | |||
82 | struct nvc0_gr_zbc_depth { | ||
83 | u32 format; | ||
84 | u32 ds; | ||
85 | u32 l2; | ||
86 | }; | ||
87 | |||
88 | struct nvc0_gr_priv { | ||
89 | struct nouveau_gr base; | ||
90 | |||
91 | struct nvc0_gr_fuc fuc409c; | ||
92 | struct nvc0_gr_fuc fuc409d; | ||
93 | struct nvc0_gr_fuc fuc41ac; | ||
94 | struct nvc0_gr_fuc fuc41ad; | ||
95 | bool firmware; | ||
96 | |||
97 | struct nvc0_gr_zbc_color zbc_color[NOUVEAU_LTC_MAX_ZBC_CNT]; | ||
98 | struct nvc0_gr_zbc_depth zbc_depth[NOUVEAU_LTC_MAX_ZBC_CNT]; | ||
99 | |||
100 | u8 rop_nr; | ||
101 | u8 gpc_nr; | ||
102 | u8 tpc_nr[GPC_MAX]; | ||
103 | u8 tpc_total; | ||
104 | u8 ppc_nr[GPC_MAX]; | ||
105 | u8 ppc_tpc_nr[GPC_MAX][4]; | ||
106 | |||
107 | struct nouveau_gpuobj *unk4188b4; | ||
108 | struct nouveau_gpuobj *unk4188b8; | ||
109 | |||
110 | struct nvc0_gr_data mmio_data[4]; | ||
111 | struct nvc0_gr_mmio mmio_list[4096/8]; | ||
112 | u32 size; | ||
113 | u32 *data; | ||
114 | |||
115 | u8 magic_not_rop_nr; | ||
116 | }; | ||
117 | |||
118 | struct nvc0_gr_chan { | ||
119 | struct nouveau_gr_chan base; | ||
120 | |||
121 | struct nouveau_gpuobj *mmio; | ||
122 | struct nouveau_vma mmio_vma; | ||
123 | int mmio_nr; | ||
124 | struct { | ||
125 | struct nouveau_gpuobj *mem; | ||
126 | struct nouveau_vma vma; | ||
127 | } data[4]; | ||
128 | }; | ||
129 | |||
130 | int nvc0_gr_context_ctor(struct nouveau_object *, struct nouveau_object *, | ||
131 | struct nouveau_oclass *, void *, u32, | ||
132 | struct nouveau_object **); | ||
133 | void nvc0_gr_context_dtor(struct nouveau_object *); | ||
134 | |||
135 | void nvc0_gr_ctxctl_debug(struct nvc0_gr_priv *); | ||
136 | |||
137 | u64 nvc0_gr_units(struct nouveau_gr *); | ||
138 | int nvc0_gr_ctor(struct nouveau_object *, struct nouveau_object *, | ||
139 | struct nouveau_oclass *, void *data, u32 size, | ||
140 | struct nouveau_object **); | ||
141 | void nvc0_gr_dtor(struct nouveau_object *); | ||
142 | int nvc0_gr_init(struct nouveau_object *); | ||
143 | void nvc0_gr_zbc_init(struct nvc0_gr_priv *); | ||
144 | |||
145 | int nve4_gr_fini(struct nouveau_object *, bool); | ||
146 | int nve4_gr_init(struct nouveau_object *); | ||
147 | |||
148 | int nvf0_gr_fini(struct nouveau_object *, bool); | ||
149 | |||
150 | extern struct nouveau_ofuncs nvc0_fermi_ofuncs; | ||
151 | |||
152 | extern struct nouveau_oclass nvc0_gr_sclass[]; | ||
153 | extern struct nouveau_omthds nvc0_gr_9097_omthds[]; | ||
154 | extern struct nouveau_omthds nvc0_gr_90c0_omthds[]; | ||
155 | extern struct nouveau_oclass nvc8_gr_sclass[]; | ||
156 | extern struct nouveau_oclass nvf0_gr_sclass[]; | ||
157 | |||
158 | struct nvc0_gr_init { | ||
159 | u32 addr; | ||
160 | u8 count; | ||
161 | u8 pitch; | ||
162 | u32 data; | ||
163 | }; | ||
164 | |||
165 | struct nvc0_gr_pack { | ||
166 | const struct nvc0_gr_init *init; | ||
167 | u32 type; | ||
168 | }; | ||
169 | |||
170 | #define pack_for_each_init(init, pack, head) \ | ||
171 | for (pack = head; pack && pack->init; pack++) \ | ||
172 | for (init = pack->init; init && init->count; init++) | ||
173 | |||
174 | struct nvc0_gr_ucode { | ||
175 | struct nvc0_gr_fuc code; | ||
176 | struct nvc0_gr_fuc data; | ||
177 | }; | ||
178 | |||
179 | extern struct nvc0_gr_ucode nvc0_gr_fecs_ucode; | ||
180 | extern struct nvc0_gr_ucode nvc0_gr_gpccs_ucode; | ||
181 | |||
182 | extern struct nvc0_gr_ucode nvf0_gr_fecs_ucode; | ||
183 | extern struct nvc0_gr_ucode nvf0_gr_gpccs_ucode; | ||
184 | |||
185 | struct nvc0_gr_oclass { | ||
186 | struct nouveau_oclass base; | ||
187 | struct nouveau_oclass **cclass; | ||
188 | struct nouveau_oclass *sclass; | ||
189 | const struct nvc0_gr_pack *mmio; | ||
190 | struct { | ||
191 | struct nvc0_gr_ucode *ucode; | ||
192 | } fecs; | ||
193 | struct { | ||
194 | struct nvc0_gr_ucode *ucode; | ||
195 | } gpccs; | ||
196 | int ppc_nr; | ||
197 | }; | ||
198 | |||
199 | void nvc0_gr_mmio(struct nvc0_gr_priv *, const struct nvc0_gr_pack *); | ||
200 | void nvc0_gr_icmd(struct nvc0_gr_priv *, const struct nvc0_gr_pack *); | ||
201 | void nvc0_gr_mthd(struct nvc0_gr_priv *, const struct nvc0_gr_pack *); | ||
202 | int nvc0_gr_init_ctxctl(struct nvc0_gr_priv *); | ||
203 | |||
204 | /* register init value lists */ | ||
205 | |||
206 | extern const struct nvc0_gr_init nvc0_gr_init_main_0[]; | ||
207 | extern const struct nvc0_gr_init nvc0_gr_init_fe_0[]; | ||
208 | extern const struct nvc0_gr_init nvc0_gr_init_pri_0[]; | ||
209 | extern const struct nvc0_gr_init nvc0_gr_init_rstr2d_0[]; | ||
210 | extern const struct nvc0_gr_init nvc0_gr_init_pd_0[]; | ||
211 | extern const struct nvc0_gr_init nvc0_gr_init_ds_0[]; | ||
212 | extern const struct nvc0_gr_init nvc0_gr_init_scc_0[]; | ||
213 | extern const struct nvc0_gr_init nvc0_gr_init_prop_0[]; | ||
214 | extern const struct nvc0_gr_init nvc0_gr_init_gpc_unk_0[]; | ||
215 | extern const struct nvc0_gr_init nvc0_gr_init_setup_0[]; | ||
216 | extern const struct nvc0_gr_init nvc0_gr_init_crstr_0[]; | ||
217 | extern const struct nvc0_gr_init nvc0_gr_init_setup_1[]; | ||
218 | extern const struct nvc0_gr_init nvc0_gr_init_zcull_0[]; | ||
219 | extern const struct nvc0_gr_init nvc0_gr_init_gpm_0[]; | ||
220 | extern const struct nvc0_gr_init nvc0_gr_init_gpc_unk_1[]; | ||
221 | extern const struct nvc0_gr_init nvc0_gr_init_gcc_0[]; | ||
222 | extern const struct nvc0_gr_init nvc0_gr_init_tpccs_0[]; | ||
223 | extern const struct nvc0_gr_init nvc0_gr_init_tex_0[]; | ||
224 | extern const struct nvc0_gr_init nvc0_gr_init_pe_0[]; | ||
225 | extern const struct nvc0_gr_init nvc0_gr_init_l1c_0[]; | ||
226 | extern const struct nvc0_gr_init nvc0_gr_init_wwdx_0[]; | ||
227 | extern const struct nvc0_gr_init nvc0_gr_init_tpccs_1[]; | ||
228 | extern const struct nvc0_gr_init nvc0_gr_init_mpc_0[]; | ||
229 | extern const struct nvc0_gr_init nvc0_gr_init_be_0[]; | ||
230 | extern const struct nvc0_gr_init nvc0_gr_init_fe_1[]; | ||
231 | extern const struct nvc0_gr_init nvc0_gr_init_pe_1[]; | ||
232 | |||
233 | extern const struct nvc0_gr_init nvc4_gr_init_ds_0[]; | ||
234 | extern const struct nvc0_gr_init nvc4_gr_init_tex_0[]; | ||
235 | extern const struct nvc0_gr_init nvc4_gr_init_sm_0[]; | ||
236 | |||
237 | extern const struct nvc0_gr_init nvc1_gr_init_gpc_unk_0[]; | ||
238 | extern const struct nvc0_gr_init nvc1_gr_init_setup_1[]; | ||
239 | |||
240 | extern const struct nvc0_gr_init nvd9_gr_init_pd_0[]; | ||
241 | extern const struct nvc0_gr_init nvd9_gr_init_ds_0[]; | ||
242 | extern const struct nvc0_gr_init nvd9_gr_init_prop_0[]; | ||
243 | extern const struct nvc0_gr_init nvd9_gr_init_gpm_0[]; | ||
244 | extern const struct nvc0_gr_init nvd9_gr_init_gpc_unk_1[]; | ||
245 | extern const struct nvc0_gr_init nvd9_gr_init_tex_0[]; | ||
246 | extern const struct nvc0_gr_init nvd9_gr_init_sm_0[]; | ||
247 | extern const struct nvc0_gr_init nvd9_gr_init_fe_1[]; | ||
248 | |||
249 | extern const struct nvc0_gr_init nvd7_gr_init_pes_0[]; | ||
250 | extern const struct nvc0_gr_init nvd7_gr_init_wwdx_0[]; | ||
251 | extern const struct nvc0_gr_init nvd7_gr_init_cbm_0[]; | ||
252 | |||
253 | extern const struct nvc0_gr_init nve4_gr_init_main_0[]; | ||
254 | extern const struct nvc0_gr_init nve4_gr_init_tpccs_0[]; | ||
255 | extern const struct nvc0_gr_init nve4_gr_init_pe_0[]; | ||
256 | extern const struct nvc0_gr_init nve4_gr_init_be_0[]; | ||
257 | extern const struct nvc0_gr_pack nve4_gr_pack_mmio[]; | ||
258 | |||
259 | extern const struct nvc0_gr_init nvf0_gr_init_fe_0[]; | ||
260 | extern const struct nvc0_gr_init nvf0_gr_init_ds_0[]; | ||
261 | extern const struct nvc0_gr_init nvf0_gr_init_sked_0[]; | ||
262 | extern const struct nvc0_gr_init nvf0_gr_init_cwd_0[]; | ||
263 | extern const struct nvc0_gr_init nvf0_gr_init_gpc_unk_1[]; | ||
264 | extern const struct nvc0_gr_init nvf0_gr_init_tex_0[]; | ||
265 | extern const struct nvc0_gr_init nvf0_gr_init_sm_0[]; | ||
266 | |||
267 | extern const struct nvc0_gr_init nv108_gr_init_gpc_unk_0[]; | ||
268 | |||
269 | |||
270 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc1.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc1.c index 93d58e5b82c2..4a70ea30bae9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc1.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc1.c | |||
@@ -30,12 +30,12 @@ | |||
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | static struct nouveau_oclass | 32 | static struct nouveau_oclass |
33 | nvc1_graph_sclass[] = { | 33 | nvc1_gr_sclass[] = { |
34 | { 0x902d, &nouveau_object_ofuncs }, | 34 | { 0x902d, &nouveau_object_ofuncs }, |
35 | { 0x9039, &nouveau_object_ofuncs }, | 35 | { 0x9039, &nouveau_object_ofuncs }, |
36 | { FERMI_A, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 36 | { FERMI_A, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
37 | { FERMI_B, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 37 | { FERMI_B, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
38 | { FERMI_COMPUTE_A, &nouveau_object_ofuncs, nvc0_graph_90c0_omthds }, | 38 | { FERMI_COMPUTE_A, &nouveau_object_ofuncs, nvc0_gr_90c0_omthds }, |
39 | {} | 39 | {} |
40 | }; | 40 | }; |
41 | 41 | ||
@@ -43,8 +43,8 @@ nvc1_graph_sclass[] = { | |||
43 | * PGRAPH register lists | 43 | * PGRAPH register lists |
44 | ******************************************************************************/ | 44 | ******************************************************************************/ |
45 | 45 | ||
46 | const struct nvc0_graph_init | 46 | const struct nvc0_gr_init |
47 | nvc1_graph_init_gpc_unk_0[] = { | 47 | nvc1_gr_init_gpc_unk_0[] = { |
48 | { 0x418604, 1, 0x04, 0x00000000 }, | 48 | { 0x418604, 1, 0x04, 0x00000000 }, |
49 | { 0x418680, 1, 0x04, 0x00000000 }, | 49 | { 0x418680, 1, 0x04, 0x00000000 }, |
50 | { 0x418714, 1, 0x04, 0x00000000 }, | 50 | { 0x418714, 1, 0x04, 0x00000000 }, |
@@ -52,16 +52,16 @@ nvc1_graph_init_gpc_unk_0[] = { | |||
52 | {} | 52 | {} |
53 | }; | 53 | }; |
54 | 54 | ||
55 | const struct nvc0_graph_init | 55 | const struct nvc0_gr_init |
56 | nvc1_graph_init_setup_1[] = { | 56 | nvc1_gr_init_setup_1[] = { |
57 | { 0x4188c8, 2, 0x04, 0x00000000 }, | 57 | { 0x4188c8, 2, 0x04, 0x00000000 }, |
58 | { 0x4188d0, 1, 0x04, 0x00010000 }, | 58 | { 0x4188d0, 1, 0x04, 0x00010000 }, |
59 | { 0x4188d4, 1, 0x04, 0x00000001 }, | 59 | { 0x4188d4, 1, 0x04, 0x00000001 }, |
60 | {} | 60 | {} |
61 | }; | 61 | }; |
62 | 62 | ||
63 | static const struct nvc0_graph_init | 63 | static const struct nvc0_gr_init |
64 | nvc1_graph_init_gpc_unk_1[] = { | 64 | nvc1_gr_init_gpc_unk_1[] = { |
65 | { 0x418d00, 1, 0x04, 0x00000000 }, | 65 | { 0x418d00, 1, 0x04, 0x00000000 }, |
66 | { 0x418f08, 1, 0x04, 0x00000000 }, | 66 | { 0x418f08, 1, 0x04, 0x00000000 }, |
67 | { 0x418e00, 1, 0x04, 0x00000003 }, | 67 | { 0x418e00, 1, 0x04, 0x00000003 }, |
@@ -69,8 +69,8 @@ nvc1_graph_init_gpc_unk_1[] = { | |||
69 | {} | 69 | {} |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static const struct nvc0_graph_init | 72 | static const struct nvc0_gr_init |
73 | nvc1_graph_init_pe_0[] = { | 73 | nvc1_gr_init_pe_0[] = { |
74 | { 0x41980c, 1, 0x04, 0x00000010 }, | 74 | { 0x41980c, 1, 0x04, 0x00000010 }, |
75 | { 0x419810, 1, 0x04, 0x00000000 }, | 75 | { 0x419810, 1, 0x04, 0x00000000 }, |
76 | { 0x419814, 1, 0x04, 0x00000004 }, | 76 | { 0x419814, 1, 0x04, 0x00000004 }, |
@@ -81,34 +81,34 @@ nvc1_graph_init_pe_0[] = { | |||
81 | {} | 81 | {} |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static const struct nvc0_graph_pack | 84 | static const struct nvc0_gr_pack |
85 | nvc1_graph_pack_mmio[] = { | 85 | nvc1_gr_pack_mmio[] = { |
86 | { nvc0_graph_init_main_0 }, | 86 | { nvc0_gr_init_main_0 }, |
87 | { nvc0_graph_init_fe_0 }, | 87 | { nvc0_gr_init_fe_0 }, |
88 | { nvc0_graph_init_pri_0 }, | 88 | { nvc0_gr_init_pri_0 }, |
89 | { nvc0_graph_init_rstr2d_0 }, | 89 | { nvc0_gr_init_rstr2d_0 }, |
90 | { nvc0_graph_init_pd_0 }, | 90 | { nvc0_gr_init_pd_0 }, |
91 | { nvc4_graph_init_ds_0 }, | 91 | { nvc4_gr_init_ds_0 }, |
92 | { nvc0_graph_init_scc_0 }, | 92 | { nvc0_gr_init_scc_0 }, |
93 | { nvc0_graph_init_prop_0 }, | 93 | { nvc0_gr_init_prop_0 }, |
94 | { nvc1_graph_init_gpc_unk_0 }, | 94 | { nvc1_gr_init_gpc_unk_0 }, |
95 | { nvc0_graph_init_setup_0 }, | 95 | { nvc0_gr_init_setup_0 }, |
96 | { nvc0_graph_init_crstr_0 }, | 96 | { nvc0_gr_init_crstr_0 }, |
97 | { nvc1_graph_init_setup_1 }, | 97 | { nvc1_gr_init_setup_1 }, |
98 | { nvc0_graph_init_zcull_0 }, | 98 | { nvc0_gr_init_zcull_0 }, |
99 | { nvc0_graph_init_gpm_0 }, | 99 | { nvc0_gr_init_gpm_0 }, |
100 | { nvc1_graph_init_gpc_unk_1 }, | 100 | { nvc1_gr_init_gpc_unk_1 }, |
101 | { nvc0_graph_init_gcc_0 }, | 101 | { nvc0_gr_init_gcc_0 }, |
102 | { nvc0_graph_init_tpccs_0 }, | 102 | { nvc0_gr_init_tpccs_0 }, |
103 | { nvc4_graph_init_tex_0 }, | 103 | { nvc4_gr_init_tex_0 }, |
104 | { nvc1_graph_init_pe_0 }, | 104 | { nvc1_gr_init_pe_0 }, |
105 | { nvc0_graph_init_l1c_0 }, | 105 | { nvc0_gr_init_l1c_0 }, |
106 | { nvc0_graph_init_wwdx_0 }, | 106 | { nvc0_gr_init_wwdx_0 }, |
107 | { nvc0_graph_init_tpccs_1 }, | 107 | { nvc0_gr_init_tpccs_1 }, |
108 | { nvc0_graph_init_mpc_0 }, | 108 | { nvc0_gr_init_mpc_0 }, |
109 | { nvc4_graph_init_sm_0 }, | 109 | { nvc4_gr_init_sm_0 }, |
110 | { nvc0_graph_init_be_0 }, | 110 | { nvc0_gr_init_be_0 }, |
111 | { nvc0_graph_init_fe_1 }, | 111 | { nvc0_gr_init_fe_1 }, |
112 | {} | 112 | {} |
113 | }; | 113 | }; |
114 | 114 | ||
@@ -117,17 +117,17 @@ nvc1_graph_pack_mmio[] = { | |||
117 | ******************************************************************************/ | 117 | ******************************************************************************/ |
118 | 118 | ||
119 | struct nouveau_oclass * | 119 | struct nouveau_oclass * |
120 | nvc1_graph_oclass = &(struct nvc0_graph_oclass) { | 120 | nvc1_gr_oclass = &(struct nvc0_gr_oclass) { |
121 | .base.handle = NV_ENGINE(GR, 0xc1), | 121 | .base.handle = NV_ENGINE(GR, 0xc1), |
122 | .base.ofuncs = &(struct nouveau_ofuncs) { | 122 | .base.ofuncs = &(struct nouveau_ofuncs) { |
123 | .ctor = nvc0_graph_ctor, | 123 | .ctor = nvc0_gr_ctor, |
124 | .dtor = nvc0_graph_dtor, | 124 | .dtor = nvc0_gr_dtor, |
125 | .init = nvc0_graph_init, | 125 | .init = nvc0_gr_init, |
126 | .fini = _nouveau_graph_fini, | 126 | .fini = _nouveau_gr_fini, |
127 | }, | 127 | }, |
128 | .cclass = &nvc1_grctx_oclass, | 128 | .cclass = &nvc1_grctx_oclass, |
129 | .sclass = nvc1_graph_sclass, | 129 | .sclass = nvc1_gr_sclass, |
130 | .mmio = nvc1_graph_pack_mmio, | 130 | .mmio = nvc1_gr_pack_mmio, |
131 | .fecs.ucode = &nvc0_graph_fecs_ucode, | 131 | .fecs.ucode = &nvc0_gr_fecs_ucode, |
132 | .gpccs.ucode = &nvc0_graph_gpccs_ucode, | 132 | .gpccs.ucode = &nvc0_gr_gpccs_ucode, |
133 | }.base; | 133 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc4.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc4.c index e82e70c53132..0af6335efa50 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc4.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc4.c | |||
@@ -29,8 +29,8 @@ | |||
29 | * PGRAPH register lists | 29 | * PGRAPH register lists |
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | const struct nvc0_graph_init | 32 | const struct nvc0_gr_init |
33 | nvc4_graph_init_ds_0[] = { | 33 | nvc4_gr_init_ds_0[] = { |
34 | { 0x405844, 1, 0x04, 0x00ffffff }, | 34 | { 0x405844, 1, 0x04, 0x00ffffff }, |
35 | { 0x405850, 1, 0x04, 0x00000000 }, | 35 | { 0x405850, 1, 0x04, 0x00000000 }, |
36 | { 0x405900, 1, 0x04, 0x00002834 }, | 36 | { 0x405900, 1, 0x04, 0x00002834 }, |
@@ -38,8 +38,8 @@ nvc4_graph_init_ds_0[] = { | |||
38 | {} | 38 | {} |
39 | }; | 39 | }; |
40 | 40 | ||
41 | const struct nvc0_graph_init | 41 | const struct nvc0_gr_init |
42 | nvc4_graph_init_tex_0[] = { | 42 | nvc4_gr_init_tex_0[] = { |
43 | { 0x419ab0, 1, 0x04, 0x00000000 }, | 43 | { 0x419ab0, 1, 0x04, 0x00000000 }, |
44 | { 0x419ac8, 1, 0x04, 0x00000000 }, | 44 | { 0x419ac8, 1, 0x04, 0x00000000 }, |
45 | { 0x419ab8, 1, 0x04, 0x000000e7 }, | 45 | { 0x419ab8, 1, 0x04, 0x000000e7 }, |
@@ -47,8 +47,8 @@ nvc4_graph_init_tex_0[] = { | |||
47 | {} | 47 | {} |
48 | }; | 48 | }; |
49 | 49 | ||
50 | static const struct nvc0_graph_init | 50 | static const struct nvc0_gr_init |
51 | nvc4_graph_init_pe_0[] = { | 51 | nvc4_gr_init_pe_0[] = { |
52 | { 0x41980c, 3, 0x04, 0x00000000 }, | 52 | { 0x41980c, 3, 0x04, 0x00000000 }, |
53 | { 0x419844, 1, 0x04, 0x00000000 }, | 53 | { 0x419844, 1, 0x04, 0x00000000 }, |
54 | { 0x41984c, 1, 0x04, 0x00005bc5 }, | 54 | { 0x41984c, 1, 0x04, 0x00005bc5 }, |
@@ -57,8 +57,8 @@ nvc4_graph_init_pe_0[] = { | |||
57 | {} | 57 | {} |
58 | }; | 58 | }; |
59 | 59 | ||
60 | const struct nvc0_graph_init | 60 | const struct nvc0_gr_init |
61 | nvc4_graph_init_sm_0[] = { | 61 | nvc4_gr_init_sm_0[] = { |
62 | { 0x419e00, 1, 0x04, 0x00000000 }, | 62 | { 0x419e00, 1, 0x04, 0x00000000 }, |
63 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 63 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
64 | { 0x419ea4, 1, 0x04, 0x00000100 }, | 64 | { 0x419ea4, 1, 0x04, 0x00000100 }, |
@@ -76,34 +76,34 @@ nvc4_graph_init_sm_0[] = { | |||
76 | {} | 76 | {} |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static const struct nvc0_graph_pack | 79 | static const struct nvc0_gr_pack |
80 | nvc4_graph_pack_mmio[] = { | 80 | nvc4_gr_pack_mmio[] = { |
81 | { nvc0_graph_init_main_0 }, | 81 | { nvc0_gr_init_main_0 }, |
82 | { nvc0_graph_init_fe_0 }, | 82 | { nvc0_gr_init_fe_0 }, |
83 | { nvc0_graph_init_pri_0 }, | 83 | { nvc0_gr_init_pri_0 }, |
84 | { nvc0_graph_init_rstr2d_0 }, | 84 | { nvc0_gr_init_rstr2d_0 }, |
85 | { nvc0_graph_init_pd_0 }, | 85 | { nvc0_gr_init_pd_0 }, |
86 | { nvc4_graph_init_ds_0 }, | 86 | { nvc4_gr_init_ds_0 }, |
87 | { nvc0_graph_init_scc_0 }, | 87 | { nvc0_gr_init_scc_0 }, |
88 | { nvc0_graph_init_prop_0 }, | 88 | { nvc0_gr_init_prop_0 }, |
89 | { nvc0_graph_init_gpc_unk_0 }, | 89 | { nvc0_gr_init_gpc_unk_0 }, |
90 | { nvc0_graph_init_setup_0 }, | 90 | { nvc0_gr_init_setup_0 }, |
91 | { nvc0_graph_init_crstr_0 }, | 91 | { nvc0_gr_init_crstr_0 }, |
92 | { nvc0_graph_init_setup_1 }, | 92 | { nvc0_gr_init_setup_1 }, |
93 | { nvc0_graph_init_zcull_0 }, | 93 | { nvc0_gr_init_zcull_0 }, |
94 | { nvc0_graph_init_gpm_0 }, | 94 | { nvc0_gr_init_gpm_0 }, |
95 | { nvc0_graph_init_gpc_unk_1 }, | 95 | { nvc0_gr_init_gpc_unk_1 }, |
96 | { nvc0_graph_init_gcc_0 }, | 96 | { nvc0_gr_init_gcc_0 }, |
97 | { nvc0_graph_init_tpccs_0 }, | 97 | { nvc0_gr_init_tpccs_0 }, |
98 | { nvc4_graph_init_tex_0 }, | 98 | { nvc4_gr_init_tex_0 }, |
99 | { nvc4_graph_init_pe_0 }, | 99 | { nvc4_gr_init_pe_0 }, |
100 | { nvc0_graph_init_l1c_0 }, | 100 | { nvc0_gr_init_l1c_0 }, |
101 | { nvc0_graph_init_wwdx_0 }, | 101 | { nvc0_gr_init_wwdx_0 }, |
102 | { nvc0_graph_init_tpccs_1 }, | 102 | { nvc0_gr_init_tpccs_1 }, |
103 | { nvc0_graph_init_mpc_0 }, | 103 | { nvc0_gr_init_mpc_0 }, |
104 | { nvc4_graph_init_sm_0 }, | 104 | { nvc4_gr_init_sm_0 }, |
105 | { nvc0_graph_init_be_0 }, | 105 | { nvc0_gr_init_be_0 }, |
106 | { nvc0_graph_init_fe_1 }, | 106 | { nvc0_gr_init_fe_1 }, |
107 | {} | 107 | {} |
108 | }; | 108 | }; |
109 | 109 | ||
@@ -112,17 +112,17 @@ nvc4_graph_pack_mmio[] = { | |||
112 | ******************************************************************************/ | 112 | ******************************************************************************/ |
113 | 113 | ||
114 | struct nouveau_oclass * | 114 | struct nouveau_oclass * |
115 | nvc4_graph_oclass = &(struct nvc0_graph_oclass) { | 115 | nvc4_gr_oclass = &(struct nvc0_gr_oclass) { |
116 | .base.handle = NV_ENGINE(GR, 0xc3), | 116 | .base.handle = NV_ENGINE(GR, 0xc3), |
117 | .base.ofuncs = &(struct nouveau_ofuncs) { | 117 | .base.ofuncs = &(struct nouveau_ofuncs) { |
118 | .ctor = nvc0_graph_ctor, | 118 | .ctor = nvc0_gr_ctor, |
119 | .dtor = nvc0_graph_dtor, | 119 | .dtor = nvc0_gr_dtor, |
120 | .init = nvc0_graph_init, | 120 | .init = nvc0_gr_init, |
121 | .fini = _nouveau_graph_fini, | 121 | .fini = _nouveau_gr_fini, |
122 | }, | 122 | }, |
123 | .cclass = &nvc4_grctx_oclass, | 123 | .cclass = &nvc4_grctx_oclass, |
124 | .sclass = nvc0_graph_sclass, | 124 | .sclass = nvc0_gr_sclass, |
125 | .mmio = nvc4_graph_pack_mmio, | 125 | .mmio = nvc4_gr_pack_mmio, |
126 | .fecs.ucode = &nvc0_graph_fecs_ucode, | 126 | .fecs.ucode = &nvc0_gr_fecs_ucode, |
127 | .gpccs.ucode = &nvc0_graph_gpccs_ucode, | 127 | .gpccs.ucode = &nvc0_gr_gpccs_ucode, |
128 | }.base; | 128 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc8.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc8.c index 692e1eda0eb4..692ee30855fb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc8.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvc8.c | |||
@@ -30,13 +30,13 @@ | |||
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | struct nouveau_oclass | 32 | struct nouveau_oclass |
33 | nvc8_graph_sclass[] = { | 33 | nvc8_gr_sclass[] = { |
34 | { 0x902d, &nouveau_object_ofuncs }, | 34 | { 0x902d, &nouveau_object_ofuncs }, |
35 | { 0x9039, &nouveau_object_ofuncs }, | 35 | { 0x9039, &nouveau_object_ofuncs }, |
36 | { FERMI_A, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 36 | { FERMI_A, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
37 | { FERMI_B, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 37 | { FERMI_B, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
38 | { FERMI_C, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 38 | { FERMI_C, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
39 | { FERMI_COMPUTE_A, &nouveau_object_ofuncs, nvc0_graph_90c0_omthds }, | 39 | { FERMI_COMPUTE_A, &nouveau_object_ofuncs, nvc0_gr_90c0_omthds }, |
40 | {} | 40 | {} |
41 | }; | 41 | }; |
42 | 42 | ||
@@ -44,8 +44,8 @@ nvc8_graph_sclass[] = { | |||
44 | * PGRAPH register lists | 44 | * PGRAPH register lists |
45 | ******************************************************************************/ | 45 | ******************************************************************************/ |
46 | 46 | ||
47 | static const struct nvc0_graph_init | 47 | static const struct nvc0_gr_init |
48 | nvc8_graph_init_sm_0[] = { | 48 | nvc8_gr_init_sm_0[] = { |
49 | { 0x419e00, 1, 0x04, 0x00000000 }, | 49 | { 0x419e00, 1, 0x04, 0x00000000 }, |
50 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 50 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
51 | { 0x419ea4, 1, 0x04, 0x00000100 }, | 51 | { 0x419ea4, 1, 0x04, 0x00000100 }, |
@@ -62,35 +62,35 @@ nvc8_graph_init_sm_0[] = { | |||
62 | {} | 62 | {} |
63 | }; | 63 | }; |
64 | 64 | ||
65 | static const struct nvc0_graph_pack | 65 | static const struct nvc0_gr_pack |
66 | nvc8_graph_pack_mmio[] = { | 66 | nvc8_gr_pack_mmio[] = { |
67 | { nvc0_graph_init_main_0 }, | 67 | { nvc0_gr_init_main_0 }, |
68 | { nvc0_graph_init_fe_0 }, | 68 | { nvc0_gr_init_fe_0 }, |
69 | { nvc0_graph_init_pri_0 }, | 69 | { nvc0_gr_init_pri_0 }, |
70 | { nvc0_graph_init_rstr2d_0 }, | 70 | { nvc0_gr_init_rstr2d_0 }, |
71 | { nvc0_graph_init_pd_0 }, | 71 | { nvc0_gr_init_pd_0 }, |
72 | { nvc0_graph_init_ds_0 }, | 72 | { nvc0_gr_init_ds_0 }, |
73 | { nvc0_graph_init_scc_0 }, | 73 | { nvc0_gr_init_scc_0 }, |
74 | { nvc0_graph_init_prop_0 }, | 74 | { nvc0_gr_init_prop_0 }, |
75 | { nvc0_graph_init_gpc_unk_0 }, | 75 | { nvc0_gr_init_gpc_unk_0 }, |
76 | { nvc0_graph_init_setup_0 }, | 76 | { nvc0_gr_init_setup_0 }, |
77 | { nvc0_graph_init_crstr_0 }, | 77 | { nvc0_gr_init_crstr_0 }, |
78 | { nvc1_graph_init_setup_1 }, | 78 | { nvc1_gr_init_setup_1 }, |
79 | { nvc0_graph_init_zcull_0 }, | 79 | { nvc0_gr_init_zcull_0 }, |
80 | { nvc0_graph_init_gpm_0 }, | 80 | { nvc0_gr_init_gpm_0 }, |
81 | { nvc0_graph_init_gpc_unk_1 }, | 81 | { nvc0_gr_init_gpc_unk_1 }, |
82 | { nvc0_graph_init_gcc_0 }, | 82 | { nvc0_gr_init_gcc_0 }, |
83 | { nvc0_graph_init_tpccs_0 }, | 83 | { nvc0_gr_init_tpccs_0 }, |
84 | { nvc0_graph_init_tex_0 }, | 84 | { nvc0_gr_init_tex_0 }, |
85 | { nvc0_graph_init_pe_0 }, | 85 | { nvc0_gr_init_pe_0 }, |
86 | { nvc0_graph_init_l1c_0 }, | 86 | { nvc0_gr_init_l1c_0 }, |
87 | { nvc0_graph_init_wwdx_0 }, | 87 | { nvc0_gr_init_wwdx_0 }, |
88 | { nvc0_graph_init_tpccs_1 }, | 88 | { nvc0_gr_init_tpccs_1 }, |
89 | { nvc0_graph_init_mpc_0 }, | 89 | { nvc0_gr_init_mpc_0 }, |
90 | { nvc8_graph_init_sm_0 }, | 90 | { nvc8_gr_init_sm_0 }, |
91 | { nvc0_graph_init_be_0 }, | 91 | { nvc0_gr_init_be_0 }, |
92 | { nvc0_graph_init_fe_1 }, | 92 | { nvc0_gr_init_fe_1 }, |
93 | { nvc0_graph_init_pe_1 }, | 93 | { nvc0_gr_init_pe_1 }, |
94 | {} | 94 | {} |
95 | }; | 95 | }; |
96 | 96 | ||
@@ -99,17 +99,17 @@ nvc8_graph_pack_mmio[] = { | |||
99 | ******************************************************************************/ | 99 | ******************************************************************************/ |
100 | 100 | ||
101 | struct nouveau_oclass * | 101 | struct nouveau_oclass * |
102 | nvc8_graph_oclass = &(struct nvc0_graph_oclass) { | 102 | nvc8_gr_oclass = &(struct nvc0_gr_oclass) { |
103 | .base.handle = NV_ENGINE(GR, 0xc8), | 103 | .base.handle = NV_ENGINE(GR, 0xc8), |
104 | .base.ofuncs = &(struct nouveau_ofuncs) { | 104 | .base.ofuncs = &(struct nouveau_ofuncs) { |
105 | .ctor = nvc0_graph_ctor, | 105 | .ctor = nvc0_gr_ctor, |
106 | .dtor = nvc0_graph_dtor, | 106 | .dtor = nvc0_gr_dtor, |
107 | .init = nvc0_graph_init, | 107 | .init = nvc0_gr_init, |
108 | .fini = _nouveau_graph_fini, | 108 | .fini = _nouveau_gr_fini, |
109 | }, | 109 | }, |
110 | .cclass = &nvc8_grctx_oclass, | 110 | .cclass = &nvc8_grctx_oclass, |
111 | .sclass = nvc8_graph_sclass, | 111 | .sclass = nvc8_gr_sclass, |
112 | .mmio = nvc8_graph_pack_mmio, | 112 | .mmio = nvc8_gr_pack_mmio, |
113 | .fecs.ucode = &nvc0_graph_fecs_ucode, | 113 | .fecs.ucode = &nvc0_gr_fecs_ucode, |
114 | .gpccs.ucode = &nvc0_graph_gpccs_ucode, | 114 | .gpccs.ucode = &nvc0_gr_gpccs_ucode, |
115 | }.base; | 115 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvd7.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvd7.c index 6f9f5ede5588..a2371a9f21de 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvd7.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvd7.c | |||
@@ -29,8 +29,8 @@ | |||
29 | * PGRAPH register lists | 29 | * PGRAPH register lists |
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | static const struct nvc0_graph_init | 32 | static const struct nvc0_gr_init |
33 | nvd7_graph_init_pe_0[] = { | 33 | nvd7_gr_init_pe_0[] = { |
34 | { 0x41980c, 1, 0x04, 0x00000010 }, | 34 | { 0x41980c, 1, 0x04, 0x00000010 }, |
35 | { 0x419844, 1, 0x04, 0x00000000 }, | 35 | { 0x419844, 1, 0x04, 0x00000000 }, |
36 | { 0x41984c, 1, 0x04, 0x00005bc8 }, | 36 | { 0x41984c, 1, 0x04, 0x00005bc8 }, |
@@ -38,8 +38,8 @@ nvd7_graph_init_pe_0[] = { | |||
38 | {} | 38 | {} |
39 | }; | 39 | }; |
40 | 40 | ||
41 | const struct nvc0_graph_init | 41 | const struct nvc0_gr_init |
42 | nvd7_graph_init_pes_0[] = { | 42 | nvd7_gr_init_pes_0[] = { |
43 | { 0x41be04, 1, 0x04, 0x00000000 }, | 43 | { 0x41be04, 1, 0x04, 0x00000000 }, |
44 | { 0x41be08, 1, 0x04, 0x00000004 }, | 44 | { 0x41be08, 1, 0x04, 0x00000004 }, |
45 | { 0x41be0c, 1, 0x04, 0x00000000 }, | 45 | { 0x41be0c, 1, 0x04, 0x00000000 }, |
@@ -48,50 +48,50 @@ nvd7_graph_init_pes_0[] = { | |||
48 | {} | 48 | {} |
49 | }; | 49 | }; |
50 | 50 | ||
51 | const struct nvc0_graph_init | 51 | const struct nvc0_gr_init |
52 | nvd7_graph_init_wwdx_0[] = { | 52 | nvd7_gr_init_wwdx_0[] = { |
53 | { 0x41bfd4, 1, 0x04, 0x00800000 }, | 53 | { 0x41bfd4, 1, 0x04, 0x00800000 }, |
54 | { 0x41bfdc, 1, 0x04, 0x00000000 }, | 54 | { 0x41bfdc, 1, 0x04, 0x00000000 }, |
55 | { 0x41bff8, 2, 0x04, 0x00000000 }, | 55 | { 0x41bff8, 2, 0x04, 0x00000000 }, |
56 | {} | 56 | {} |
57 | }; | 57 | }; |
58 | 58 | ||
59 | const struct nvc0_graph_init | 59 | const struct nvc0_gr_init |
60 | nvd7_graph_init_cbm_0[] = { | 60 | nvd7_gr_init_cbm_0[] = { |
61 | { 0x41becc, 1, 0x04, 0x00000000 }, | 61 | { 0x41becc, 1, 0x04, 0x00000000 }, |
62 | { 0x41bee8, 2, 0x04, 0x00000000 }, | 62 | { 0x41bee8, 2, 0x04, 0x00000000 }, |
63 | {} | 63 | {} |
64 | }; | 64 | }; |
65 | 65 | ||
66 | static const struct nvc0_graph_pack | 66 | static const struct nvc0_gr_pack |
67 | nvd7_graph_pack_mmio[] = { | 67 | nvd7_gr_pack_mmio[] = { |
68 | { nvc0_graph_init_main_0 }, | 68 | { nvc0_gr_init_main_0 }, |
69 | { nvc0_graph_init_fe_0 }, | 69 | { nvc0_gr_init_fe_0 }, |
70 | { nvc0_graph_init_pri_0 }, | 70 | { nvc0_gr_init_pri_0 }, |
71 | { nvc0_graph_init_rstr2d_0 }, | 71 | { nvc0_gr_init_rstr2d_0 }, |
72 | { nvd9_graph_init_pd_0 }, | 72 | { nvd9_gr_init_pd_0 }, |
73 | { nvd9_graph_init_ds_0 }, | 73 | { nvd9_gr_init_ds_0 }, |
74 | { nvc0_graph_init_scc_0 }, | 74 | { nvc0_gr_init_scc_0 }, |
75 | { nvd9_graph_init_prop_0 }, | 75 | { nvd9_gr_init_prop_0 }, |
76 | { nvc1_graph_init_gpc_unk_0 }, | 76 | { nvc1_gr_init_gpc_unk_0 }, |
77 | { nvc0_graph_init_setup_0 }, | 77 | { nvc0_gr_init_setup_0 }, |
78 | { nvc0_graph_init_crstr_0 }, | 78 | { nvc0_gr_init_crstr_0 }, |
79 | { nvc1_graph_init_setup_1 }, | 79 | { nvc1_gr_init_setup_1 }, |
80 | { nvc0_graph_init_zcull_0 }, | 80 | { nvc0_gr_init_zcull_0 }, |
81 | { nvd9_graph_init_gpm_0 }, | 81 | { nvd9_gr_init_gpm_0 }, |
82 | { nvd9_graph_init_gpc_unk_1 }, | 82 | { nvd9_gr_init_gpc_unk_1 }, |
83 | { nvc0_graph_init_gcc_0 }, | 83 | { nvc0_gr_init_gcc_0 }, |
84 | { nvc0_graph_init_tpccs_0 }, | 84 | { nvc0_gr_init_tpccs_0 }, |
85 | { nvd9_graph_init_tex_0 }, | 85 | { nvd9_gr_init_tex_0 }, |
86 | { nvd7_graph_init_pe_0 }, | 86 | { nvd7_gr_init_pe_0 }, |
87 | { nvc0_graph_init_l1c_0 }, | 87 | { nvc0_gr_init_l1c_0 }, |
88 | { nvc0_graph_init_mpc_0 }, | 88 | { nvc0_gr_init_mpc_0 }, |
89 | { nvd9_graph_init_sm_0 }, | 89 | { nvd9_gr_init_sm_0 }, |
90 | { nvd7_graph_init_pes_0 }, | 90 | { nvd7_gr_init_pes_0 }, |
91 | { nvd7_graph_init_wwdx_0 }, | 91 | { nvd7_gr_init_wwdx_0 }, |
92 | { nvd7_graph_init_cbm_0 }, | 92 | { nvd7_gr_init_cbm_0 }, |
93 | { nvc0_graph_init_be_0 }, | 93 | { nvc0_gr_init_be_0 }, |
94 | { nvd9_graph_init_fe_1 }, | 94 | { nvd9_gr_init_fe_1 }, |
95 | {} | 95 | {} |
96 | }; | 96 | }; |
97 | 97 | ||
@@ -101,8 +101,8 @@ nvd7_graph_pack_mmio[] = { | |||
101 | 101 | ||
102 | #include "fuc/hubnvd7.fuc3.h" | 102 | #include "fuc/hubnvd7.fuc3.h" |
103 | 103 | ||
104 | struct nvc0_graph_ucode | 104 | struct nvc0_gr_ucode |
105 | nvd7_graph_fecs_ucode = { | 105 | nvd7_gr_fecs_ucode = { |
106 | .code.data = nvd7_grhub_code, | 106 | .code.data = nvd7_grhub_code, |
107 | .code.size = sizeof(nvd7_grhub_code), | 107 | .code.size = sizeof(nvd7_grhub_code), |
108 | .data.data = nvd7_grhub_data, | 108 | .data.data = nvd7_grhub_data, |
@@ -111,8 +111,8 @@ nvd7_graph_fecs_ucode = { | |||
111 | 111 | ||
112 | #include "fuc/gpcnvd7.fuc3.h" | 112 | #include "fuc/gpcnvd7.fuc3.h" |
113 | 113 | ||
114 | struct nvc0_graph_ucode | 114 | struct nvc0_gr_ucode |
115 | nvd7_graph_gpccs_ucode = { | 115 | nvd7_gr_gpccs_ucode = { |
116 | .code.data = nvd7_grgpc_code, | 116 | .code.data = nvd7_grgpc_code, |
117 | .code.size = sizeof(nvd7_grgpc_code), | 117 | .code.size = sizeof(nvd7_grgpc_code), |
118 | .data.data = nvd7_grgpc_data, | 118 | .data.data = nvd7_grgpc_data, |
@@ -120,18 +120,18 @@ nvd7_graph_gpccs_ucode = { | |||
120 | }; | 120 | }; |
121 | 121 | ||
122 | struct nouveau_oclass * | 122 | struct nouveau_oclass * |
123 | nvd7_graph_oclass = &(struct nvc0_graph_oclass) { | 123 | nvd7_gr_oclass = &(struct nvc0_gr_oclass) { |
124 | .base.handle = NV_ENGINE(GR, 0xd7), | 124 | .base.handle = NV_ENGINE(GR, 0xd7), |
125 | .base.ofuncs = &(struct nouveau_ofuncs) { | 125 | .base.ofuncs = &(struct nouveau_ofuncs) { |
126 | .ctor = nvc0_graph_ctor, | 126 | .ctor = nvc0_gr_ctor, |
127 | .dtor = nvc0_graph_dtor, | 127 | .dtor = nvc0_gr_dtor, |
128 | .init = nvc0_graph_init, | 128 | .init = nvc0_gr_init, |
129 | .fini = _nouveau_graph_fini, | 129 | .fini = _nouveau_gr_fini, |
130 | }, | 130 | }, |
131 | .cclass = &nvd7_grctx_oclass, | 131 | .cclass = &nvd7_grctx_oclass, |
132 | .sclass = nvc8_graph_sclass, | 132 | .sclass = nvc8_gr_sclass, |
133 | .mmio = nvd7_graph_pack_mmio, | 133 | .mmio = nvd7_gr_pack_mmio, |
134 | .fecs.ucode = &nvd7_graph_fecs_ucode, | 134 | .fecs.ucode = &nvd7_gr_fecs_ucode, |
135 | .gpccs.ucode = &nvd7_graph_gpccs_ucode, | 135 | .gpccs.ucode = &nvd7_gr_gpccs_ucode, |
136 | .ppc_nr = 1, | 136 | .ppc_nr = 1, |
137 | }.base; | 137 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvd9.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvd9.c index 00fdf202fb92..25f5905a2b78 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvd9.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvd9.c | |||
@@ -29,15 +29,15 @@ | |||
29 | * PGRAPH register lists | 29 | * PGRAPH register lists |
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | const struct nvc0_graph_init | 32 | const struct nvc0_gr_init |
33 | nvd9_graph_init_pd_0[] = { | 33 | nvd9_gr_init_pd_0[] = { |
34 | { 0x406024, 1, 0x04, 0x00000000 }, | 34 | { 0x406024, 1, 0x04, 0x00000000 }, |
35 | { 0x4064f0, 3, 0x04, 0x00000000 }, | 35 | { 0x4064f0, 3, 0x04, 0x00000000 }, |
36 | {} | 36 | {} |
37 | }; | 37 | }; |
38 | 38 | ||
39 | const struct nvc0_graph_init | 39 | const struct nvc0_gr_init |
40 | nvd9_graph_init_ds_0[] = { | 40 | nvd9_gr_init_ds_0[] = { |
41 | { 0x405844, 1, 0x04, 0x00ffffff }, | 41 | { 0x405844, 1, 0x04, 0x00ffffff }, |
42 | { 0x405850, 1, 0x04, 0x00000000 }, | 42 | { 0x405850, 1, 0x04, 0x00000000 }, |
43 | { 0x405900, 1, 0x04, 0x00002834 }, | 43 | { 0x405900, 1, 0x04, 0x00002834 }, |
@@ -46,15 +46,15 @@ nvd9_graph_init_ds_0[] = { | |||
46 | {} | 46 | {} |
47 | }; | 47 | }; |
48 | 48 | ||
49 | const struct nvc0_graph_init | 49 | const struct nvc0_gr_init |
50 | nvd9_graph_init_prop_0[] = { | 50 | nvd9_gr_init_prop_0[] = { |
51 | { 0x418408, 1, 0x04, 0x00000000 }, | 51 | { 0x418408, 1, 0x04, 0x00000000 }, |
52 | { 0x4184a0, 3, 0x04, 0x00000000 }, | 52 | { 0x4184a0, 3, 0x04, 0x00000000 }, |
53 | {} | 53 | {} |
54 | }; | 54 | }; |
55 | 55 | ||
56 | const struct nvc0_graph_init | 56 | const struct nvc0_gr_init |
57 | nvd9_graph_init_gpm_0[] = { | 57 | nvd9_gr_init_gpm_0[] = { |
58 | { 0x418c04, 1, 0x04, 0x00000000 }, | 58 | { 0x418c04, 1, 0x04, 0x00000000 }, |
59 | { 0x418c64, 2, 0x04, 0x00000000 }, | 59 | { 0x418c64, 2, 0x04, 0x00000000 }, |
60 | { 0x418c88, 1, 0x04, 0x00000000 }, | 60 | { 0x418c88, 1, 0x04, 0x00000000 }, |
@@ -62,8 +62,8 @@ nvd9_graph_init_gpm_0[] = { | |||
62 | {} | 62 | {} |
63 | }; | 63 | }; |
64 | 64 | ||
65 | const struct nvc0_graph_init | 65 | const struct nvc0_gr_init |
66 | nvd9_graph_init_gpc_unk_1[] = { | 66 | nvd9_gr_init_gpc_unk_1[] = { |
67 | { 0x418d00, 1, 0x04, 0x00000000 }, | 67 | { 0x418d00, 1, 0x04, 0x00000000 }, |
68 | { 0x418d28, 2, 0x04, 0x00000000 }, | 68 | { 0x418d28, 2, 0x04, 0x00000000 }, |
69 | { 0x418f00, 1, 0x04, 0x00000000 }, | 69 | { 0x418f00, 1, 0x04, 0x00000000 }, |
@@ -75,8 +75,8 @@ nvd9_graph_init_gpc_unk_1[] = { | |||
75 | {} | 75 | {} |
76 | }; | 76 | }; |
77 | 77 | ||
78 | const struct nvc0_graph_init | 78 | const struct nvc0_gr_init |
79 | nvd9_graph_init_tex_0[] = { | 79 | nvd9_gr_init_tex_0[] = { |
80 | { 0x419ab0, 1, 0x04, 0x00000000 }, | 80 | { 0x419ab0, 1, 0x04, 0x00000000 }, |
81 | { 0x419ac8, 1, 0x04, 0x00000000 }, | 81 | { 0x419ac8, 1, 0x04, 0x00000000 }, |
82 | { 0x419ab8, 1, 0x04, 0x000000e7 }, | 82 | { 0x419ab8, 1, 0x04, 0x000000e7 }, |
@@ -85,8 +85,8 @@ nvd9_graph_init_tex_0[] = { | |||
85 | {} | 85 | {} |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static const struct nvc0_graph_init | 88 | static const struct nvc0_gr_init |
89 | nvd9_graph_init_pe_0[] = { | 89 | nvd9_gr_init_pe_0[] = { |
90 | { 0x41980c, 1, 0x04, 0x00000010 }, | 90 | { 0x41980c, 1, 0x04, 0x00000010 }, |
91 | { 0x419810, 1, 0x04, 0x00000000 }, | 91 | { 0x419810, 1, 0x04, 0x00000000 }, |
92 | { 0x419814, 1, 0x04, 0x00000004 }, | 92 | { 0x419814, 1, 0x04, 0x00000004 }, |
@@ -97,23 +97,23 @@ nvd9_graph_init_pe_0[] = { | |||
97 | {} | 97 | {} |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static const struct nvc0_graph_init | 100 | static const struct nvc0_gr_init |
101 | nvd9_graph_init_wwdx_0[] = { | 101 | nvd9_gr_init_wwdx_0[] = { |
102 | { 0x419bd4, 1, 0x04, 0x00800000 }, | 102 | { 0x419bd4, 1, 0x04, 0x00800000 }, |
103 | { 0x419bdc, 1, 0x04, 0x00000000 }, | 103 | { 0x419bdc, 1, 0x04, 0x00000000 }, |
104 | { 0x419bf8, 2, 0x04, 0x00000000 }, | 104 | { 0x419bf8, 2, 0x04, 0x00000000 }, |
105 | {} | 105 | {} |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static const struct nvc0_graph_init | 108 | static const struct nvc0_gr_init |
109 | nvd9_graph_init_tpccs_1[] = { | 109 | nvd9_gr_init_tpccs_1[] = { |
110 | { 0x419d2c, 1, 0x04, 0x00000000 }, | 110 | { 0x419d2c, 1, 0x04, 0x00000000 }, |
111 | { 0x419d48, 2, 0x04, 0x00000000 }, | 111 | { 0x419d48, 2, 0x04, 0x00000000 }, |
112 | {} | 112 | {} |
113 | }; | 113 | }; |
114 | 114 | ||
115 | const struct nvc0_graph_init | 115 | const struct nvc0_gr_init |
116 | nvd9_graph_init_sm_0[] = { | 116 | nvd9_gr_init_sm_0[] = { |
117 | { 0x419e00, 1, 0x04, 0x00000000 }, | 117 | { 0x419e00, 1, 0x04, 0x00000000 }, |
118 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 118 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
119 | { 0x419ea4, 1, 0x04, 0x00000100 }, | 119 | { 0x419ea4, 1, 0x04, 0x00000100 }, |
@@ -131,42 +131,42 @@ nvd9_graph_init_sm_0[] = { | |||
131 | {} | 131 | {} |
132 | }; | 132 | }; |
133 | 133 | ||
134 | const struct nvc0_graph_init | 134 | const struct nvc0_gr_init |
135 | nvd9_graph_init_fe_1[] = { | 135 | nvd9_gr_init_fe_1[] = { |
136 | { 0x40402c, 1, 0x04, 0x00000000 }, | 136 | { 0x40402c, 1, 0x04, 0x00000000 }, |
137 | { 0x4040f0, 1, 0x04, 0x00000000 }, | 137 | { 0x4040f0, 1, 0x04, 0x00000000 }, |
138 | { 0x404174, 1, 0x04, 0x00000000 }, | 138 | { 0x404174, 1, 0x04, 0x00000000 }, |
139 | {} | 139 | {} |
140 | }; | 140 | }; |
141 | 141 | ||
142 | static const struct nvc0_graph_pack | 142 | static const struct nvc0_gr_pack |
143 | nvd9_graph_pack_mmio[] = { | 143 | nvd9_gr_pack_mmio[] = { |
144 | { nvc0_graph_init_main_0 }, | 144 | { nvc0_gr_init_main_0 }, |
145 | { nvc0_graph_init_fe_0 }, | 145 | { nvc0_gr_init_fe_0 }, |
146 | { nvc0_graph_init_pri_0 }, | 146 | { nvc0_gr_init_pri_0 }, |
147 | { nvc0_graph_init_rstr2d_0 }, | 147 | { nvc0_gr_init_rstr2d_0 }, |
148 | { nvd9_graph_init_pd_0 }, | 148 | { nvd9_gr_init_pd_0 }, |
149 | { nvd9_graph_init_ds_0 }, | 149 | { nvd9_gr_init_ds_0 }, |
150 | { nvc0_graph_init_scc_0 }, | 150 | { nvc0_gr_init_scc_0 }, |
151 | { nvd9_graph_init_prop_0 }, | 151 | { nvd9_gr_init_prop_0 }, |
152 | { nvc1_graph_init_gpc_unk_0 }, | 152 | { nvc1_gr_init_gpc_unk_0 }, |
153 | { nvc0_graph_init_setup_0 }, | 153 | { nvc0_gr_init_setup_0 }, |
154 | { nvc0_graph_init_crstr_0 }, | 154 | { nvc0_gr_init_crstr_0 }, |
155 | { nvc1_graph_init_setup_1 }, | 155 | { nvc1_gr_init_setup_1 }, |
156 | { nvc0_graph_init_zcull_0 }, | 156 | { nvc0_gr_init_zcull_0 }, |
157 | { nvd9_graph_init_gpm_0 }, | 157 | { nvd9_gr_init_gpm_0 }, |
158 | { nvd9_graph_init_gpc_unk_1 }, | 158 | { nvd9_gr_init_gpc_unk_1 }, |
159 | { nvc0_graph_init_gcc_0 }, | 159 | { nvc0_gr_init_gcc_0 }, |
160 | { nvc0_graph_init_tpccs_0 }, | 160 | { nvc0_gr_init_tpccs_0 }, |
161 | { nvd9_graph_init_tex_0 }, | 161 | { nvd9_gr_init_tex_0 }, |
162 | { nvd9_graph_init_pe_0 }, | 162 | { nvd9_gr_init_pe_0 }, |
163 | { nvc0_graph_init_l1c_0 }, | 163 | { nvc0_gr_init_l1c_0 }, |
164 | { nvd9_graph_init_wwdx_0 }, | 164 | { nvd9_gr_init_wwdx_0 }, |
165 | { nvd9_graph_init_tpccs_1 }, | 165 | { nvd9_gr_init_tpccs_1 }, |
166 | { nvc0_graph_init_mpc_0 }, | 166 | { nvc0_gr_init_mpc_0 }, |
167 | { nvd9_graph_init_sm_0 }, | 167 | { nvd9_gr_init_sm_0 }, |
168 | { nvc0_graph_init_be_0 }, | 168 | { nvc0_gr_init_be_0 }, |
169 | { nvd9_graph_init_fe_1 }, | 169 | { nvd9_gr_init_fe_1 }, |
170 | {} | 170 | {} |
171 | }; | 171 | }; |
172 | 172 | ||
@@ -175,17 +175,17 @@ nvd9_graph_pack_mmio[] = { | |||
175 | ******************************************************************************/ | 175 | ******************************************************************************/ |
176 | 176 | ||
177 | struct nouveau_oclass * | 177 | struct nouveau_oclass * |
178 | nvd9_graph_oclass = &(struct nvc0_graph_oclass) { | 178 | nvd9_gr_oclass = &(struct nvc0_gr_oclass) { |
179 | .base.handle = NV_ENGINE(GR, 0xd9), | 179 | .base.handle = NV_ENGINE(GR, 0xd9), |
180 | .base.ofuncs = &(struct nouveau_ofuncs) { | 180 | .base.ofuncs = &(struct nouveau_ofuncs) { |
181 | .ctor = nvc0_graph_ctor, | 181 | .ctor = nvc0_gr_ctor, |
182 | .dtor = nvc0_graph_dtor, | 182 | .dtor = nvc0_gr_dtor, |
183 | .init = nvc0_graph_init, | 183 | .init = nvc0_gr_init, |
184 | .fini = _nouveau_graph_fini, | 184 | .fini = _nouveau_gr_fini, |
185 | }, | 185 | }, |
186 | .cclass = &nvd9_grctx_oclass, | 186 | .cclass = &nvd9_grctx_oclass, |
187 | .sclass = nvc8_graph_sclass, | 187 | .sclass = nvc8_gr_sclass, |
188 | .mmio = nvd9_graph_pack_mmio, | 188 | .mmio = nvd9_gr_pack_mmio, |
189 | .fecs.ucode = &nvc0_graph_fecs_ucode, | 189 | .fecs.ucode = &nvc0_gr_fecs_ucode, |
190 | .gpccs.ucode = &nvc0_graph_gpccs_ucode, | 190 | .gpccs.ucode = &nvc0_gr_gpccs_ucode, |
191 | }.base; | 191 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nve4.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nve4.c index 8e6b62c4706c..f03ef38e8157 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nve4.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nve4.c | |||
@@ -32,11 +32,11 @@ | |||
32 | ******************************************************************************/ | 32 | ******************************************************************************/ |
33 | 33 | ||
34 | static struct nouveau_oclass | 34 | static struct nouveau_oclass |
35 | nve4_graph_sclass[] = { | 35 | nve4_gr_sclass[] = { |
36 | { 0x902d, &nouveau_object_ofuncs }, | 36 | { 0x902d, &nouveau_object_ofuncs }, |
37 | { 0xa040, &nouveau_object_ofuncs }, | 37 | { 0xa040, &nouveau_object_ofuncs }, |
38 | { KEPLER_A, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 38 | { KEPLER_A, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
39 | { KEPLER_COMPUTE_A, &nouveau_object_ofuncs, nvc0_graph_90c0_omthds }, | 39 | { KEPLER_COMPUTE_A, &nouveau_object_ofuncs, nvc0_gr_90c0_omthds }, |
40 | {} | 40 | {} |
41 | }; | 41 | }; |
42 | 42 | ||
@@ -44,8 +44,8 @@ nve4_graph_sclass[] = { | |||
44 | * PGRAPH register lists | 44 | * PGRAPH register lists |
45 | ******************************************************************************/ | 45 | ******************************************************************************/ |
46 | 46 | ||
47 | const struct nvc0_graph_init | 47 | const struct nvc0_gr_init |
48 | nve4_graph_init_main_0[] = { | 48 | nve4_gr_init_main_0[] = { |
49 | { 0x400080, 1, 0x04, 0x003083c2 }, | 49 | { 0x400080, 1, 0x04, 0x003083c2 }, |
50 | { 0x400088, 1, 0x04, 0x0001ffe7 }, | 50 | { 0x400088, 1, 0x04, 0x0001ffe7 }, |
51 | { 0x40008c, 1, 0x04, 0x00000000 }, | 51 | { 0x40008c, 1, 0x04, 0x00000000 }, |
@@ -60,8 +60,8 @@ nve4_graph_init_main_0[] = { | |||
60 | {} | 60 | {} |
61 | }; | 61 | }; |
62 | 62 | ||
63 | static const struct nvc0_graph_init | 63 | static const struct nvc0_gr_init |
64 | nve4_graph_init_ds_0[] = { | 64 | nve4_gr_init_ds_0[] = { |
65 | { 0x405844, 1, 0x04, 0x00ffffff }, | 65 | { 0x405844, 1, 0x04, 0x00ffffff }, |
66 | { 0x405850, 1, 0x04, 0x00000000 }, | 66 | { 0x405850, 1, 0x04, 0x00000000 }, |
67 | { 0x405900, 1, 0x04, 0x0000ff34 }, | 67 | { 0x405900, 1, 0x04, 0x0000ff34 }, |
@@ -70,20 +70,20 @@ nve4_graph_init_ds_0[] = { | |||
70 | {} | 70 | {} |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static const struct nvc0_graph_init | 73 | static const struct nvc0_gr_init |
74 | nve4_graph_init_sked_0[] = { | 74 | nve4_gr_init_sked_0[] = { |
75 | { 0x407010, 1, 0x04, 0x00000000 }, | 75 | { 0x407010, 1, 0x04, 0x00000000 }, |
76 | {} | 76 | {} |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static const struct nvc0_graph_init | 79 | static const struct nvc0_gr_init |
80 | nve4_graph_init_cwd_0[] = { | 80 | nve4_gr_init_cwd_0[] = { |
81 | { 0x405b50, 1, 0x04, 0x00000000 }, | 81 | { 0x405b50, 1, 0x04, 0x00000000 }, |
82 | {} | 82 | {} |
83 | }; | 83 | }; |
84 | 84 | ||
85 | static const struct nvc0_graph_init | 85 | static const struct nvc0_gr_init |
86 | nve4_graph_init_gpc_unk_1[] = { | 86 | nve4_gr_init_gpc_unk_1[] = { |
87 | { 0x418d00, 1, 0x04, 0x00000000 }, | 87 | { 0x418d00, 1, 0x04, 0x00000000 }, |
88 | { 0x418d28, 2, 0x04, 0x00000000 }, | 88 | { 0x418d28, 2, 0x04, 0x00000000 }, |
89 | { 0x418f00, 1, 0x04, 0x00000000 }, | 89 | { 0x418f00, 1, 0x04, 0x00000000 }, |
@@ -95,15 +95,15 @@ nve4_graph_init_gpc_unk_1[] = { | |||
95 | {} | 95 | {} |
96 | }; | 96 | }; |
97 | 97 | ||
98 | const struct nvc0_graph_init | 98 | const struct nvc0_gr_init |
99 | nve4_graph_init_tpccs_0[] = { | 99 | nve4_gr_init_tpccs_0[] = { |
100 | { 0x419d0c, 1, 0x04, 0x00000000 }, | 100 | { 0x419d0c, 1, 0x04, 0x00000000 }, |
101 | { 0x419d10, 1, 0x04, 0x00000014 }, | 101 | { 0x419d10, 1, 0x04, 0x00000014 }, |
102 | {} | 102 | {} |
103 | }; | 103 | }; |
104 | 104 | ||
105 | const struct nvc0_graph_init | 105 | const struct nvc0_gr_init |
106 | nve4_graph_init_pe_0[] = { | 106 | nve4_gr_init_pe_0[] = { |
107 | { 0x41980c, 1, 0x04, 0x00000010 }, | 107 | { 0x41980c, 1, 0x04, 0x00000010 }, |
108 | { 0x419844, 1, 0x04, 0x00000000 }, | 108 | { 0x419844, 1, 0x04, 0x00000000 }, |
109 | { 0x419850, 1, 0x04, 0x00000004 }, | 109 | { 0x419850, 1, 0x04, 0x00000004 }, |
@@ -111,8 +111,8 @@ nve4_graph_init_pe_0[] = { | |||
111 | {} | 111 | {} |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static const struct nvc0_graph_init | 114 | static const struct nvc0_gr_init |
115 | nve4_graph_init_l1c_0[] = { | 115 | nve4_gr_init_l1c_0[] = { |
116 | { 0x419c98, 1, 0x04, 0x00000000 }, | 116 | { 0x419c98, 1, 0x04, 0x00000000 }, |
117 | { 0x419ca8, 1, 0x04, 0x00000000 }, | 117 | { 0x419ca8, 1, 0x04, 0x00000000 }, |
118 | { 0x419cb0, 1, 0x04, 0x01000000 }, | 118 | { 0x419cb0, 1, 0x04, 0x01000000 }, |
@@ -125,8 +125,8 @@ nve4_graph_init_l1c_0[] = { | |||
125 | {} | 125 | {} |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static const struct nvc0_graph_init | 128 | static const struct nvc0_gr_init |
129 | nve4_graph_init_sm_0[] = { | 129 | nve4_gr_init_sm_0[] = { |
130 | { 0x419e00, 1, 0x04, 0x00000000 }, | 130 | { 0x419e00, 1, 0x04, 0x00000000 }, |
131 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 131 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
132 | { 0x419ee4, 1, 0x04, 0x00000000 }, | 132 | { 0x419ee4, 1, 0x04, 0x00000000 }, |
@@ -139,8 +139,8 @@ nve4_graph_init_sm_0[] = { | |||
139 | {} | 139 | {} |
140 | }; | 140 | }; |
141 | 141 | ||
142 | const struct nvc0_graph_init | 142 | const struct nvc0_gr_init |
143 | nve4_graph_init_be_0[] = { | 143 | nve4_gr_init_be_0[] = { |
144 | { 0x40880c, 1, 0x04, 0x00000000 }, | 144 | { 0x40880c, 1, 0x04, 0x00000000 }, |
145 | { 0x408850, 1, 0x04, 0x00000004 }, | 145 | { 0x408850, 1, 0x04, 0x00000004 }, |
146 | { 0x408910, 9, 0x04, 0x00000000 }, | 146 | { 0x408910, 9, 0x04, 0x00000000 }, |
@@ -153,37 +153,37 @@ nve4_graph_init_be_0[] = { | |||
153 | {} | 153 | {} |
154 | }; | 154 | }; |
155 | 155 | ||
156 | const struct nvc0_graph_pack | 156 | const struct nvc0_gr_pack |
157 | nve4_graph_pack_mmio[] = { | 157 | nve4_gr_pack_mmio[] = { |
158 | { nve4_graph_init_main_0 }, | 158 | { nve4_gr_init_main_0 }, |
159 | { nvc0_graph_init_fe_0 }, | 159 | { nvc0_gr_init_fe_0 }, |
160 | { nvc0_graph_init_pri_0 }, | 160 | { nvc0_gr_init_pri_0 }, |
161 | { nvc0_graph_init_rstr2d_0 }, | 161 | { nvc0_gr_init_rstr2d_0 }, |
162 | { nvd9_graph_init_pd_0 }, | 162 | { nvd9_gr_init_pd_0 }, |
163 | { nve4_graph_init_ds_0 }, | 163 | { nve4_gr_init_ds_0 }, |
164 | { nvc0_graph_init_scc_0 }, | 164 | { nvc0_gr_init_scc_0 }, |
165 | { nve4_graph_init_sked_0 }, | 165 | { nve4_gr_init_sked_0 }, |
166 | { nve4_graph_init_cwd_0 }, | 166 | { nve4_gr_init_cwd_0 }, |
167 | { nvd9_graph_init_prop_0 }, | 167 | { nvd9_gr_init_prop_0 }, |
168 | { nvc1_graph_init_gpc_unk_0 }, | 168 | { nvc1_gr_init_gpc_unk_0 }, |
169 | { nvc0_graph_init_setup_0 }, | 169 | { nvc0_gr_init_setup_0 }, |
170 | { nvc0_graph_init_crstr_0 }, | 170 | { nvc0_gr_init_crstr_0 }, |
171 | { nvc1_graph_init_setup_1 }, | 171 | { nvc1_gr_init_setup_1 }, |
172 | { nvc0_graph_init_zcull_0 }, | 172 | { nvc0_gr_init_zcull_0 }, |
173 | { nvd9_graph_init_gpm_0 }, | 173 | { nvd9_gr_init_gpm_0 }, |
174 | { nve4_graph_init_gpc_unk_1 }, | 174 | { nve4_gr_init_gpc_unk_1 }, |
175 | { nvc0_graph_init_gcc_0 }, | 175 | { nvc0_gr_init_gcc_0 }, |
176 | { nve4_graph_init_tpccs_0 }, | 176 | { nve4_gr_init_tpccs_0 }, |
177 | { nvd9_graph_init_tex_0 }, | 177 | { nvd9_gr_init_tex_0 }, |
178 | { nve4_graph_init_pe_0 }, | 178 | { nve4_gr_init_pe_0 }, |
179 | { nve4_graph_init_l1c_0 }, | 179 | { nve4_gr_init_l1c_0 }, |
180 | { nvc0_graph_init_mpc_0 }, | 180 | { nvc0_gr_init_mpc_0 }, |
181 | { nve4_graph_init_sm_0 }, | 181 | { nve4_gr_init_sm_0 }, |
182 | { nvd7_graph_init_pes_0 }, | 182 | { nvd7_gr_init_pes_0 }, |
183 | { nvd7_graph_init_wwdx_0 }, | 183 | { nvd7_gr_init_wwdx_0 }, |
184 | { nvd7_graph_init_cbm_0 }, | 184 | { nvd7_gr_init_cbm_0 }, |
185 | { nve4_graph_init_be_0 }, | 185 | { nve4_gr_init_be_0 }, |
186 | { nvc0_graph_init_fe_1 }, | 186 | { nvc0_gr_init_fe_1 }, |
187 | {} | 187 | {} |
188 | }; | 188 | }; |
189 | 189 | ||
@@ -192,10 +192,10 @@ nve4_graph_pack_mmio[] = { | |||
192 | ******************************************************************************/ | 192 | ******************************************************************************/ |
193 | 193 | ||
194 | int | 194 | int |
195 | nve4_graph_init(struct nouveau_object *object) | 195 | nve4_gr_init(struct nouveau_object *object) |
196 | { | 196 | { |
197 | struct nvc0_graph_oclass *oclass = (void *)object->oclass; | 197 | struct nvc0_gr_oclass *oclass = (void *)object->oclass; |
198 | struct nvc0_graph_priv *priv = (void *)object; | 198 | struct nvc0_gr_priv *priv = (void *)object; |
199 | struct nouveau_pmu *pmu = nouveau_pmu(priv); | 199 | struct nouveau_pmu *pmu = nouveau_pmu(priv); |
200 | const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tpc_total); | 200 | const u32 magicgpc918 = DIV_ROUND_UP(0x00800000, priv->tpc_total); |
201 | u32 data[TPC_MAX / 8] = {}; | 201 | u32 data[TPC_MAX / 8] = {}; |
@@ -206,7 +206,7 @@ nve4_graph_init(struct nouveau_object *object) | |||
206 | if (pmu) | 206 | if (pmu) |
207 | pmu->pgob(pmu, false); | 207 | pmu->pgob(pmu, false); |
208 | 208 | ||
209 | ret = nouveau_graph_init(&priv->base); | 209 | ret = nouveau_gr_init(&priv->base); |
210 | if (ret) | 210 | if (ret) |
211 | return ret; | 211 | return ret; |
212 | 212 | ||
@@ -219,7 +219,7 @@ nve4_graph_init(struct nouveau_object *object) | |||
219 | nv_wr32(priv, GPC_BCAST(0x08b4), priv->unk4188b4->addr >> 8); | 219 | nv_wr32(priv, GPC_BCAST(0x08b4), priv->unk4188b4->addr >> 8); |
220 | nv_wr32(priv, GPC_BCAST(0x08b8), priv->unk4188b8->addr >> 8); | 220 | nv_wr32(priv, GPC_BCAST(0x08b8), priv->unk4188b8->addr >> 8); |
221 | 221 | ||
222 | nvc0_graph_mmio(priv, oclass->mmio); | 222 | nvc0_gr_mmio(priv, oclass->mmio); |
223 | 223 | ||
224 | nv_wr32(priv, GPC_UNIT(0, 0x3018), 0x00000001); | 224 | nv_wr32(priv, GPC_UNIT(0, 0x3018), 0x00000001); |
225 | 225 | ||
@@ -304,15 +304,15 @@ nve4_graph_init(struct nouveau_object *object) | |||
304 | 304 | ||
305 | nv_wr32(priv, 0x400054, 0x34ce3464); | 305 | nv_wr32(priv, 0x400054, 0x34ce3464); |
306 | 306 | ||
307 | nvc0_graph_zbc_init(priv); | 307 | nvc0_gr_zbc_init(priv); |
308 | 308 | ||
309 | return nvc0_graph_init_ctxctl(priv); | 309 | return nvc0_gr_init_ctxctl(priv); |
310 | } | 310 | } |
311 | 311 | ||
312 | #include "fuc/hubnve0.fuc3.h" | 312 | #include "fuc/hubnve0.fuc3.h" |
313 | 313 | ||
314 | static struct nvc0_graph_ucode | 314 | static struct nvc0_gr_ucode |
315 | nve4_graph_fecs_ucode = { | 315 | nve4_gr_fecs_ucode = { |
316 | .code.data = nve0_grhub_code, | 316 | .code.data = nve0_grhub_code, |
317 | .code.size = sizeof(nve0_grhub_code), | 317 | .code.size = sizeof(nve0_grhub_code), |
318 | .data.data = nve0_grhub_data, | 318 | .data.data = nve0_grhub_data, |
@@ -321,8 +321,8 @@ nve4_graph_fecs_ucode = { | |||
321 | 321 | ||
322 | #include "fuc/gpcnve0.fuc3.h" | 322 | #include "fuc/gpcnve0.fuc3.h" |
323 | 323 | ||
324 | static struct nvc0_graph_ucode | 324 | static struct nvc0_gr_ucode |
325 | nve4_graph_gpccs_ucode = { | 325 | nve4_gr_gpccs_ucode = { |
326 | .code.data = nve0_grgpc_code, | 326 | .code.data = nve0_grgpc_code, |
327 | .code.size = sizeof(nve0_grgpc_code), | 327 | .code.size = sizeof(nve0_grgpc_code), |
328 | .data.data = nve0_grgpc_data, | 328 | .data.data = nve0_grgpc_data, |
@@ -330,18 +330,18 @@ nve4_graph_gpccs_ucode = { | |||
330 | }; | 330 | }; |
331 | 331 | ||
332 | struct nouveau_oclass * | 332 | struct nouveau_oclass * |
333 | nve4_graph_oclass = &(struct nvc0_graph_oclass) { | 333 | nve4_gr_oclass = &(struct nvc0_gr_oclass) { |
334 | .base.handle = NV_ENGINE(GR, 0xe4), | 334 | .base.handle = NV_ENGINE(GR, 0xe4), |
335 | .base.ofuncs = &(struct nouveau_ofuncs) { | 335 | .base.ofuncs = &(struct nouveau_ofuncs) { |
336 | .ctor = nvc0_graph_ctor, | 336 | .ctor = nvc0_gr_ctor, |
337 | .dtor = nvc0_graph_dtor, | 337 | .dtor = nvc0_gr_dtor, |
338 | .init = nve4_graph_init, | 338 | .init = nve4_gr_init, |
339 | .fini = _nouveau_graph_fini, | 339 | .fini = _nouveau_gr_fini, |
340 | }, | 340 | }, |
341 | .cclass = &nve4_grctx_oclass, | 341 | .cclass = &nve4_grctx_oclass, |
342 | .sclass = nve4_graph_sclass, | 342 | .sclass = nve4_gr_sclass, |
343 | .mmio = nve4_graph_pack_mmio, | 343 | .mmio = nve4_gr_pack_mmio, |
344 | .fecs.ucode = &nve4_graph_fecs_ucode, | 344 | .fecs.ucode = &nve4_gr_fecs_ucode, |
345 | .gpccs.ucode = &nve4_graph_gpccs_ucode, | 345 | .gpccs.ucode = &nve4_gr_gpccs_ucode, |
346 | .ppc_nr = 1, | 346 | .ppc_nr = 1, |
347 | }.base; | 347 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvf0.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvf0.c index 73f77fa04a62..84d4456503c2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvf0.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/nvf0.c | |||
@@ -30,11 +30,11 @@ | |||
30 | ******************************************************************************/ | 30 | ******************************************************************************/ |
31 | 31 | ||
32 | struct nouveau_oclass | 32 | struct nouveau_oclass |
33 | nvf0_graph_sclass[] = { | 33 | nvf0_gr_sclass[] = { |
34 | { 0x902d, &nouveau_object_ofuncs }, | 34 | { 0x902d, &nouveau_object_ofuncs }, |
35 | { 0xa140, &nouveau_object_ofuncs }, | 35 | { 0xa140, &nouveau_object_ofuncs }, |
36 | { KEPLER_B, &nvc0_fermi_ofuncs, nvc0_graph_9097_omthds }, | 36 | { KEPLER_B, &nvc0_fermi_ofuncs, nvc0_gr_9097_omthds }, |
37 | { KEPLER_COMPUTE_B, &nouveau_object_ofuncs, nvc0_graph_90c0_omthds }, | 37 | { KEPLER_COMPUTE_B, &nouveau_object_ofuncs, nvc0_gr_90c0_omthds }, |
38 | {} | 38 | {} |
39 | }; | 39 | }; |
40 | 40 | ||
@@ -42,16 +42,16 @@ nvf0_graph_sclass[] = { | |||
42 | * PGRAPH register lists | 42 | * PGRAPH register lists |
43 | ******************************************************************************/ | 43 | ******************************************************************************/ |
44 | 44 | ||
45 | const struct nvc0_graph_init | 45 | const struct nvc0_gr_init |
46 | nvf0_graph_init_fe_0[] = { | 46 | nvf0_gr_init_fe_0[] = { |
47 | { 0x40415c, 1, 0x04, 0x00000000 }, | 47 | { 0x40415c, 1, 0x04, 0x00000000 }, |
48 | { 0x404170, 1, 0x04, 0x00000000 }, | 48 | { 0x404170, 1, 0x04, 0x00000000 }, |
49 | { 0x4041b4, 1, 0x04, 0x00000000 }, | 49 | { 0x4041b4, 1, 0x04, 0x00000000 }, |
50 | {} | 50 | {} |
51 | }; | 51 | }; |
52 | 52 | ||
53 | const struct nvc0_graph_init | 53 | const struct nvc0_gr_init |
54 | nvf0_graph_init_ds_0[] = { | 54 | nvf0_gr_init_ds_0[] = { |
55 | { 0x405844, 1, 0x04, 0x00ffffff }, | 55 | { 0x405844, 1, 0x04, 0x00ffffff }, |
56 | { 0x405850, 1, 0x04, 0x00000000 }, | 56 | { 0x405850, 1, 0x04, 0x00000000 }, |
57 | { 0x405900, 1, 0x04, 0x0000ff00 }, | 57 | { 0x405900, 1, 0x04, 0x0000ff00 }, |
@@ -60,23 +60,23 @@ nvf0_graph_init_ds_0[] = { | |||
60 | {} | 60 | {} |
61 | }; | 61 | }; |
62 | 62 | ||
63 | const struct nvc0_graph_init | 63 | const struct nvc0_gr_init |
64 | nvf0_graph_init_sked_0[] = { | 64 | nvf0_gr_init_sked_0[] = { |
65 | { 0x407010, 1, 0x04, 0x00000000 }, | 65 | { 0x407010, 1, 0x04, 0x00000000 }, |
66 | { 0x407040, 1, 0x04, 0x80440424 }, | 66 | { 0x407040, 1, 0x04, 0x80440424 }, |
67 | { 0x407048, 1, 0x04, 0x0000000a }, | 67 | { 0x407048, 1, 0x04, 0x0000000a }, |
68 | {} | 68 | {} |
69 | }; | 69 | }; |
70 | 70 | ||
71 | const struct nvc0_graph_init | 71 | const struct nvc0_gr_init |
72 | nvf0_graph_init_cwd_0[] = { | 72 | nvf0_gr_init_cwd_0[] = { |
73 | { 0x405b44, 1, 0x04, 0x00000000 }, | 73 | { 0x405b44, 1, 0x04, 0x00000000 }, |
74 | { 0x405b50, 1, 0x04, 0x00000000 }, | 74 | { 0x405b50, 1, 0x04, 0x00000000 }, |
75 | {} | 75 | {} |
76 | }; | 76 | }; |
77 | 77 | ||
78 | const struct nvc0_graph_init | 78 | const struct nvc0_gr_init |
79 | nvf0_graph_init_gpc_unk_1[] = { | 79 | nvf0_gr_init_gpc_unk_1[] = { |
80 | { 0x418d00, 1, 0x04, 0x00000000 }, | 80 | { 0x418d00, 1, 0x04, 0x00000000 }, |
81 | { 0x418d28, 2, 0x04, 0x00000000 }, | 81 | { 0x418d28, 2, 0x04, 0x00000000 }, |
82 | { 0x418f00, 1, 0x04, 0x00000400 }, | 82 | { 0x418f00, 1, 0x04, 0x00000400 }, |
@@ -88,8 +88,8 @@ nvf0_graph_init_gpc_unk_1[] = { | |||
88 | {} | 88 | {} |
89 | }; | 89 | }; |
90 | 90 | ||
91 | const struct nvc0_graph_init | 91 | const struct nvc0_gr_init |
92 | nvf0_graph_init_tex_0[] = { | 92 | nvf0_gr_init_tex_0[] = { |
93 | { 0x419ab0, 1, 0x04, 0x00000000 }, | 93 | { 0x419ab0, 1, 0x04, 0x00000000 }, |
94 | { 0x419ac8, 1, 0x04, 0x00000000 }, | 94 | { 0x419ac8, 1, 0x04, 0x00000000 }, |
95 | { 0x419ab8, 1, 0x04, 0x000000e7 }, | 95 | { 0x419ab8, 1, 0x04, 0x000000e7 }, |
@@ -100,8 +100,8 @@ nvf0_graph_init_tex_0[] = { | |||
100 | {} | 100 | {} |
101 | }; | 101 | }; |
102 | 102 | ||
103 | static const struct nvc0_graph_init | 103 | static const struct nvc0_gr_init |
104 | nvf0_graph_init_l1c_0[] = { | 104 | nvf0_gr_init_l1c_0[] = { |
105 | { 0x419c98, 1, 0x04, 0x00000000 }, | 105 | { 0x419c98, 1, 0x04, 0x00000000 }, |
106 | { 0x419ca8, 1, 0x04, 0x00000000 }, | 106 | { 0x419ca8, 1, 0x04, 0x00000000 }, |
107 | { 0x419cb0, 1, 0x04, 0x01000000 }, | 107 | { 0x419cb0, 1, 0x04, 0x01000000 }, |
@@ -115,8 +115,8 @@ nvf0_graph_init_l1c_0[] = { | |||
115 | {} | 115 | {} |
116 | }; | 116 | }; |
117 | 117 | ||
118 | const struct nvc0_graph_init | 118 | const struct nvc0_gr_init |
119 | nvf0_graph_init_sm_0[] = { | 119 | nvf0_gr_init_sm_0[] = { |
120 | { 0x419e00, 1, 0x04, 0x00000080 }, | 120 | { 0x419e00, 1, 0x04, 0x00000080 }, |
121 | { 0x419ea0, 1, 0x04, 0x00000000 }, | 121 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
122 | { 0x419ee4, 1, 0x04, 0x00000000 }, | 122 | { 0x419ee4, 1, 0x04, 0x00000000 }, |
@@ -132,37 +132,37 @@ nvf0_graph_init_sm_0[] = { | |||
132 | {} | 132 | {} |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static const struct nvc0_graph_pack | 135 | static const struct nvc0_gr_pack |
136 | nvf0_graph_pack_mmio[] = { | 136 | nvf0_gr_pack_mmio[] = { |
137 | { nve4_graph_init_main_0 }, | 137 | { nve4_gr_init_main_0 }, |
138 | { nvf0_graph_init_fe_0 }, | 138 | { nvf0_gr_init_fe_0 }, |
139 | { nvc0_graph_init_pri_0 }, | 139 | { nvc0_gr_init_pri_0 }, |
140 | { nvc0_graph_init_rstr2d_0 }, | 140 | { nvc0_gr_init_rstr2d_0 }, |
141 | { nvd9_graph_init_pd_0 }, | 141 | { nvd9_gr_init_pd_0 }, |
142 | { nvf0_graph_init_ds_0 }, | 142 | { nvf0_gr_init_ds_0 }, |
143 | { nvc0_graph_init_scc_0 }, | 143 | { nvc0_gr_init_scc_0 }, |
144 | { nvf0_graph_init_sked_0 }, | 144 | { nvf0_gr_init_sked_0 }, |
145 | { nvf0_graph_init_cwd_0 }, | 145 | { nvf0_gr_init_cwd_0 }, |
146 | { nvd9_graph_init_prop_0 }, | 146 | { nvd9_gr_init_prop_0 }, |
147 | { nvc1_graph_init_gpc_unk_0 }, | 147 | { nvc1_gr_init_gpc_unk_0 }, |
148 | { nvc0_graph_init_setup_0 }, | 148 | { nvc0_gr_init_setup_0 }, |
149 | { nvc0_graph_init_crstr_0 }, | 149 | { nvc0_gr_init_crstr_0 }, |
150 | { nvc1_graph_init_setup_1 }, | 150 | { nvc1_gr_init_setup_1 }, |
151 | { nvc0_graph_init_zcull_0 }, | 151 | { nvc0_gr_init_zcull_0 }, |
152 | { nvd9_graph_init_gpm_0 }, | 152 | { nvd9_gr_init_gpm_0 }, |
153 | { nvf0_graph_init_gpc_unk_1 }, | 153 | { nvf0_gr_init_gpc_unk_1 }, |
154 | { nvc0_graph_init_gcc_0 }, | 154 | { nvc0_gr_init_gcc_0 }, |
155 | { nve4_graph_init_tpccs_0 }, | 155 | { nve4_gr_init_tpccs_0 }, |
156 | { nvf0_graph_init_tex_0 }, | 156 | { nvf0_gr_init_tex_0 }, |
157 | { nve4_graph_init_pe_0 }, | 157 | { nve4_gr_init_pe_0 }, |
158 | { nvf0_graph_init_l1c_0 }, | 158 | { nvf0_gr_init_l1c_0 }, |
159 | { nvc0_graph_init_mpc_0 }, | 159 | { nvc0_gr_init_mpc_0 }, |
160 | { nvf0_graph_init_sm_0 }, | 160 | { nvf0_gr_init_sm_0 }, |
161 | { nvd7_graph_init_pes_0 }, | 161 | { nvd7_gr_init_pes_0 }, |
162 | { nvd7_graph_init_wwdx_0 }, | 162 | { nvd7_gr_init_wwdx_0 }, |
163 | { nvd7_graph_init_cbm_0 }, | 163 | { nvd7_gr_init_cbm_0 }, |
164 | { nve4_graph_init_be_0 }, | 164 | { nve4_gr_init_be_0 }, |
165 | { nvc0_graph_init_fe_1 }, | 165 | { nvc0_gr_init_fe_1 }, |
166 | {} | 166 | {} |
167 | }; | 167 | }; |
168 | 168 | ||
@@ -171,9 +171,9 @@ nvf0_graph_pack_mmio[] = { | |||
171 | ******************************************************************************/ | 171 | ******************************************************************************/ |
172 | 172 | ||
173 | int | 173 | int |
174 | nvf0_graph_fini(struct nouveau_object *object, bool suspend) | 174 | nvf0_gr_fini(struct nouveau_object *object, bool suspend) |
175 | { | 175 | { |
176 | struct nvc0_graph_priv *priv = (void *)object; | 176 | struct nvc0_gr_priv *priv = (void *)object; |
177 | static const struct { | 177 | static const struct { |
178 | u32 addr; | 178 | u32 addr; |
179 | u32 data; | 179 | u32 data; |
@@ -204,13 +204,13 @@ nvf0_graph_fini(struct nouveau_object *object, bool suspend) | |||
204 | nv_wait(priv, magic[i].addr, 0x80000000, 0x00000000); | 204 | nv_wait(priv, magic[i].addr, 0x80000000, 0x00000000); |
205 | } | 205 | } |
206 | 206 | ||
207 | return nouveau_graph_fini(&priv->base, suspend); | 207 | return nouveau_gr_fini(&priv->base, suspend); |
208 | } | 208 | } |
209 | 209 | ||
210 | #include "fuc/hubnvf0.fuc3.h" | 210 | #include "fuc/hubnvf0.fuc3.h" |
211 | 211 | ||
212 | struct nvc0_graph_ucode | 212 | struct nvc0_gr_ucode |
213 | nvf0_graph_fecs_ucode = { | 213 | nvf0_gr_fecs_ucode = { |
214 | .code.data = nvf0_grhub_code, | 214 | .code.data = nvf0_grhub_code, |
215 | .code.size = sizeof(nvf0_grhub_code), | 215 | .code.size = sizeof(nvf0_grhub_code), |
216 | .data.data = nvf0_grhub_data, | 216 | .data.data = nvf0_grhub_data, |
@@ -219,8 +219,8 @@ nvf0_graph_fecs_ucode = { | |||
219 | 219 | ||
220 | #include "fuc/gpcnvf0.fuc3.h" | 220 | #include "fuc/gpcnvf0.fuc3.h" |
221 | 221 | ||
222 | struct nvc0_graph_ucode | 222 | struct nvc0_gr_ucode |
223 | nvf0_graph_gpccs_ucode = { | 223 | nvf0_gr_gpccs_ucode = { |
224 | .code.data = nvf0_grgpc_code, | 224 | .code.data = nvf0_grgpc_code, |
225 | .code.size = sizeof(nvf0_grgpc_code), | 225 | .code.size = sizeof(nvf0_grgpc_code), |
226 | .data.data = nvf0_grgpc_data, | 226 | .data.data = nvf0_grgpc_data, |
@@ -228,18 +228,18 @@ nvf0_graph_gpccs_ucode = { | |||
228 | }; | 228 | }; |
229 | 229 | ||
230 | struct nouveau_oclass * | 230 | struct nouveau_oclass * |
231 | nvf0_graph_oclass = &(struct nvc0_graph_oclass) { | 231 | nvf0_gr_oclass = &(struct nvc0_gr_oclass) { |
232 | .base.handle = NV_ENGINE(GR, 0xf0), | 232 | .base.handle = NV_ENGINE(GR, 0xf0), |
233 | .base.ofuncs = &(struct nouveau_ofuncs) { | 233 | .base.ofuncs = &(struct nouveau_ofuncs) { |
234 | .ctor = nvc0_graph_ctor, | 234 | .ctor = nvc0_gr_ctor, |
235 | .dtor = nvc0_graph_dtor, | 235 | .dtor = nvc0_gr_dtor, |
236 | .init = nve4_graph_init, | 236 | .init = nve4_gr_init, |
237 | .fini = nvf0_graph_fini, | 237 | .fini = nvf0_gr_fini, |
238 | }, | 238 | }, |
239 | .cclass = &nvf0_grctx_oclass, | 239 | .cclass = &nvf0_grctx_oclass, |
240 | .sclass = nvf0_graph_sclass, | 240 | .sclass = nvf0_gr_sclass, |
241 | .mmio = nvf0_graph_pack_mmio, | 241 | .mmio = nvf0_gr_pack_mmio, |
242 | .fecs.ucode = &nvf0_graph_fecs_ucode, | 242 | .fecs.ucode = &nvf0_gr_fecs_ucode, |
243 | .gpccs.ucode = &nvf0_graph_gpccs_ucode, | 243 | .gpccs.ucode = &nvf0_gr_gpccs_ucode, |
244 | .ppc_nr = 2, | 244 | .ppc_nr = 2, |
245 | }.base; | 245 | }.base; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/regs.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/regs.h index fde8e24415e4..de69c5995edd 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/regs.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/regs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __NOUVEAU_GRAPH_REGS_H__ | 1 | #ifndef __NOUVEAU_GR_REGS_H__ |
2 | #define __NOUVEAU_GRAPH_REGS_H__ | 2 | #define __NOUVEAU_GR_REGS_H__ |
3 | 3 | ||
4 | #define NV04_PGRAPH_DEBUG_0 0x00400080 | 4 | #define NV04_PGRAPH_DEBUG_0 0x00400080 |
5 | #define NV04_PGRAPH_DEBUG_1 0x00400084 | 5 | #define NV04_PGRAPH_DEBUG_1 0x00400084 |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/graph/Kbuild deleted file mode 100644 index fd56e979344b..000000000000 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/Kbuild +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | nvkm-y += nvkm/engine/graph/ctxnv40.o | ||
2 | nvkm-y += nvkm/engine/graph/ctxnv50.o | ||
3 | nvkm-y += nvkm/engine/graph/ctxnvc0.o | ||
4 | nvkm-y += nvkm/engine/graph/ctxnvc1.o | ||
5 | nvkm-y += nvkm/engine/graph/ctxnvc4.o | ||
6 | nvkm-y += nvkm/engine/graph/ctxnvc8.o | ||
7 | nvkm-y += nvkm/engine/graph/ctxnvd7.o | ||
8 | nvkm-y += nvkm/engine/graph/ctxnvd9.o | ||
9 | nvkm-y += nvkm/engine/graph/ctxnve4.o | ||
10 | nvkm-y += nvkm/engine/graph/ctxgk20a.o | ||
11 | nvkm-y += nvkm/engine/graph/ctxnvf0.o | ||
12 | nvkm-y += nvkm/engine/graph/ctxgk110b.o | ||
13 | nvkm-y += nvkm/engine/graph/ctxnv108.o | ||
14 | nvkm-y += nvkm/engine/graph/ctxgm107.o | ||
15 | nvkm-y += nvkm/engine/graph/nv04.o | ||
16 | nvkm-y += nvkm/engine/graph/nv10.o | ||
17 | nvkm-y += nvkm/engine/graph/nv20.o | ||
18 | nvkm-y += nvkm/engine/graph/nv25.o | ||
19 | nvkm-y += nvkm/engine/graph/nv2a.o | ||
20 | nvkm-y += nvkm/engine/graph/nv30.o | ||
21 | nvkm-y += nvkm/engine/graph/nv34.o | ||
22 | nvkm-y += nvkm/engine/graph/nv35.o | ||
23 | nvkm-y += nvkm/engine/graph/nv40.o | ||
24 | nvkm-y += nvkm/engine/graph/nv50.o | ||
25 | nvkm-y += nvkm/engine/graph/nvc0.o | ||
26 | nvkm-y += nvkm/engine/graph/nvc1.o | ||
27 | nvkm-y += nvkm/engine/graph/nvc4.o | ||
28 | nvkm-y += nvkm/engine/graph/nvc8.o | ||
29 | nvkm-y += nvkm/engine/graph/nvd7.o | ||
30 | nvkm-y += nvkm/engine/graph/nvd9.o | ||
31 | nvkm-y += nvkm/engine/graph/nve4.o | ||
32 | nvkm-y += nvkm/engine/graph/gk20a.o | ||
33 | nvkm-y += nvkm/engine/graph/nvf0.o | ||
34 | nvkm-y += nvkm/engine/graph/gk110b.o | ||
35 | nvkm-y += nvkm/engine/graph/nv108.o | ||
36 | nvkm-y += nvkm/engine/graph/gm107.o | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc0.h b/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc0.h deleted file mode 100644 index c776cd715e33..000000000000 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/ctxnvc0.h +++ /dev/null | |||
@@ -1,202 +0,0 @@ | |||
1 | #ifndef __NVKM_GRCTX_NVC0_H__ | ||
2 | #define __NVKM_GRCTX_NVC0_H__ | ||
3 | |||
4 | #include "nvc0.h" | ||
5 | |||
6 | struct nvc0_grctx { | ||
7 | struct nvc0_graph_priv *priv; | ||
8 | struct nvc0_graph_data *data; | ||
9 | struct nvc0_graph_mmio *mmio; | ||
10 | int buffer_nr; | ||
11 | u64 buffer[4]; | ||
12 | u64 addr; | ||
13 | }; | ||
14 | |||
15 | int nvc0_grctx_mmio_data(struct nvc0_grctx *, u32 size, u32 align, u32 access); | ||
16 | void nvc0_grctx_mmio_item(struct nvc0_grctx *, u32 addr, u32 data, int s, int); | ||
17 | |||
18 | #define mmio_vram(a,b,c,d) nvc0_grctx_mmio_data((a), (b), (c), (d)) | ||
19 | #define mmio_refn(a,b,c,d,e) nvc0_grctx_mmio_item((a), (b), (c), (d), (e)) | ||
20 | #define mmio_skip(a,b,c) mmio_refn((a), (b), (c), -1, -1) | ||
21 | #define mmio_wr32(a,b,c) mmio_refn((a), (b), (c), 0, -1) | ||
22 | |||
23 | struct nvc0_grctx_oclass { | ||
24 | struct nouveau_oclass base; | ||
25 | /* main context generation function */ | ||
26 | void (*main)(struct nvc0_graph_priv *, struct nvc0_grctx *); | ||
27 | /* context-specific modify-on-first-load list generation function */ | ||
28 | void (*unkn)(struct nvc0_graph_priv *); | ||
29 | /* mmio context data */ | ||
30 | const struct nvc0_graph_pack *hub; | ||
31 | const struct nvc0_graph_pack *gpc; | ||
32 | const struct nvc0_graph_pack *zcull; | ||
33 | const struct nvc0_graph_pack *tpc; | ||
34 | const struct nvc0_graph_pack *ppc; | ||
35 | /* indirect context data, generated with icmds/mthds */ | ||
36 | const struct nvc0_graph_pack *icmd; | ||
37 | const struct nvc0_graph_pack *mthd; | ||
38 | /* bundle circular buffer */ | ||
39 | void (*bundle)(struct nvc0_grctx *); | ||
40 | u32 bundle_size; | ||
41 | u32 bundle_min_gpm_fifo_depth; | ||
42 | u32 bundle_token_limit; | ||
43 | /* pagepool */ | ||
44 | void (*pagepool)(struct nvc0_grctx *); | ||
45 | u32 pagepool_size; | ||
46 | /* attribute(/alpha) circular buffer */ | ||
47 | void (*attrib)(struct nvc0_grctx *); | ||
48 | u32 attrib_nr_max; | ||
49 | u32 attrib_nr; | ||
50 | u32 alpha_nr_max; | ||
51 | u32 alpha_nr; | ||
52 | }; | ||
53 | |||
54 | static inline const struct nvc0_grctx_oclass * | ||
55 | nvc0_grctx_impl(struct nvc0_graph_priv *priv) | ||
56 | { | ||
57 | return (void *)nv_engine(priv)->cclass; | ||
58 | } | ||
59 | |||
60 | extern struct nouveau_oclass *nvc0_grctx_oclass; | ||
61 | int nvc0_grctx_generate(struct nvc0_graph_priv *); | ||
62 | void nvc0_grctx_generate_main(struct nvc0_graph_priv *, struct nvc0_grctx *); | ||
63 | void nvc0_grctx_generate_bundle(struct nvc0_grctx *); | ||
64 | void nvc0_grctx_generate_pagepool(struct nvc0_grctx *); | ||
65 | void nvc0_grctx_generate_attrib(struct nvc0_grctx *); | ||
66 | void nvc0_grctx_generate_unkn(struct nvc0_graph_priv *); | ||
67 | void nvc0_grctx_generate_tpcid(struct nvc0_graph_priv *); | ||
68 | void nvc0_grctx_generate_r406028(struct nvc0_graph_priv *); | ||
69 | void nvc0_grctx_generate_r4060a8(struct nvc0_graph_priv *); | ||
70 | void nvc0_grctx_generate_r418bb8(struct nvc0_graph_priv *); | ||
71 | void nvc0_grctx_generate_r406800(struct nvc0_graph_priv *); | ||
72 | |||
73 | extern struct nouveau_oclass *nvc1_grctx_oclass; | ||
74 | void nvc1_grctx_generate_attrib(struct nvc0_grctx *); | ||
75 | void nvc1_grctx_generate_unkn(struct nvc0_graph_priv *); | ||
76 | |||
77 | extern struct nouveau_oclass *nvc4_grctx_oclass; | ||
78 | extern struct nouveau_oclass *nvc8_grctx_oclass; | ||
79 | |||
80 | extern struct nouveau_oclass *nvd7_grctx_oclass; | ||
81 | void nvd7_grctx_generate_attrib(struct nvc0_grctx *); | ||
82 | |||
83 | extern struct nouveau_oclass *nvd9_grctx_oclass; | ||
84 | |||
85 | extern struct nouveau_oclass *nve4_grctx_oclass; | ||
86 | extern struct nouveau_oclass *gk20a_grctx_oclass; | ||
87 | void nve4_grctx_generate_main(struct nvc0_graph_priv *, struct nvc0_grctx *); | ||
88 | void nve4_grctx_generate_bundle(struct nvc0_grctx *); | ||
89 | void nve4_grctx_generate_pagepool(struct nvc0_grctx *); | ||
90 | void nve4_grctx_generate_unkn(struct nvc0_graph_priv *); | ||
91 | void nve4_grctx_generate_r418bb8(struct nvc0_graph_priv *); | ||
92 | |||
93 | extern struct nouveau_oclass *nvf0_grctx_oclass; | ||
94 | extern struct nouveau_oclass *gk110b_grctx_oclass; | ||
95 | extern struct nouveau_oclass *nv108_grctx_oclass; | ||
96 | extern struct nouveau_oclass *gm107_grctx_oclass; | ||
97 | |||
98 | /* context init value lists */ | ||
99 | |||
100 | extern const struct nvc0_graph_pack nvc0_grctx_pack_icmd[]; | ||
101 | |||
102 | extern const struct nvc0_graph_pack nvc0_grctx_pack_mthd[]; | ||
103 | extern const struct nvc0_graph_init nvc0_grctx_init_902d_0[]; | ||
104 | extern const struct nvc0_graph_init nvc0_grctx_init_9039_0[]; | ||
105 | extern const struct nvc0_graph_init nvc0_grctx_init_90c0_0[]; | ||
106 | |||
107 | extern const struct nvc0_graph_pack nvc0_grctx_pack_hub[]; | ||
108 | extern const struct nvc0_graph_init nvc0_grctx_init_main_0[]; | ||
109 | extern const struct nvc0_graph_init nvc0_grctx_init_fe_0[]; | ||
110 | extern const struct nvc0_graph_init nvc0_grctx_init_pri_0[]; | ||
111 | extern const struct nvc0_graph_init nvc0_grctx_init_memfmt_0[]; | ||
112 | extern const struct nvc0_graph_init nvc0_grctx_init_rstr2d_0[]; | ||
113 | extern const struct nvc0_graph_init nvc0_grctx_init_scc_0[]; | ||
114 | |||
115 | extern const struct nvc0_graph_pack nvc0_grctx_pack_gpc[]; | ||
116 | extern const struct nvc0_graph_init nvc0_grctx_init_gpc_unk_0[]; | ||
117 | extern const struct nvc0_graph_init nvc0_grctx_init_prop_0[]; | ||
118 | extern const struct nvc0_graph_init nvc0_grctx_init_gpc_unk_1[]; | ||
119 | extern const struct nvc0_graph_init nvc0_grctx_init_zcull_0[]; | ||
120 | extern const struct nvc0_graph_init nvc0_grctx_init_crstr_0[]; | ||
121 | extern const struct nvc0_graph_init nvc0_grctx_init_gpm_0[]; | ||
122 | extern const struct nvc0_graph_init nvc0_grctx_init_gcc_0[]; | ||
123 | |||
124 | extern const struct nvc0_graph_pack nvc0_grctx_pack_zcull[]; | ||
125 | |||
126 | extern const struct nvc0_graph_pack nvc0_grctx_pack_tpc[]; | ||
127 | extern const struct nvc0_graph_init nvc0_grctx_init_pe_0[]; | ||
128 | extern const struct nvc0_graph_init nvc0_grctx_init_wwdx_0[]; | ||
129 | extern const struct nvc0_graph_init nvc0_grctx_init_mpc_0[]; | ||
130 | extern const struct nvc0_graph_init nvc0_grctx_init_tpccs_0[]; | ||
131 | |||
132 | extern const struct nvc0_graph_init nvc4_grctx_init_tex_0[]; | ||
133 | extern const struct nvc0_graph_init nvc4_grctx_init_l1c_0[]; | ||
134 | extern const struct nvc0_graph_init nvc4_grctx_init_sm_0[]; | ||
135 | |||
136 | extern const struct nvc0_graph_init nvc1_grctx_init_9097_0[]; | ||
137 | |||
138 | extern const struct nvc0_graph_init nvc1_grctx_init_gpm_0[]; | ||
139 | |||
140 | extern const struct nvc0_graph_init nvc1_grctx_init_pe_0[]; | ||
141 | extern const struct nvc0_graph_init nvc1_grctx_init_wwdx_0[]; | ||
142 | extern const struct nvc0_graph_init nvc1_grctx_init_tpccs_0[]; | ||
143 | |||
144 | extern const struct nvc0_graph_init nvc8_grctx_init_9197_0[]; | ||
145 | extern const struct nvc0_graph_init nvc8_grctx_init_9297_0[]; | ||
146 | |||
147 | extern const struct nvc0_graph_pack nvd9_grctx_pack_icmd[]; | ||
148 | |||
149 | extern const struct nvc0_graph_pack nvd9_grctx_pack_mthd[]; | ||
150 | |||
151 | extern const struct nvc0_graph_init nvd9_grctx_init_fe_0[]; | ||
152 | extern const struct nvc0_graph_init nvd9_grctx_init_be_0[]; | ||
153 | |||
154 | extern const struct nvc0_graph_init nvd9_grctx_init_prop_0[]; | ||
155 | extern const struct nvc0_graph_init nvd9_grctx_init_gpc_unk_1[]; | ||
156 | extern const struct nvc0_graph_init nvd9_grctx_init_crstr_0[]; | ||
157 | |||
158 | extern const struct nvc0_graph_init nvd9_grctx_init_sm_0[]; | ||
159 | |||
160 | extern const struct nvc0_graph_init nvd7_grctx_init_pe_0[]; | ||
161 | |||
162 | extern const struct nvc0_graph_init nvd7_grctx_init_wwdx_0[]; | ||
163 | |||
164 | extern const struct nvc0_graph_init nve4_grctx_init_memfmt_0[]; | ||
165 | extern const struct nvc0_graph_init nve4_grctx_init_ds_0[]; | ||
166 | extern const struct nvc0_graph_init nve4_grctx_init_scc_0[]; | ||
167 | |||
168 | extern const struct nvc0_graph_init nve4_grctx_init_gpm_0[]; | ||
169 | |||
170 | extern const struct nvc0_graph_init nve4_grctx_init_pes_0[]; | ||
171 | |||
172 | extern const struct nvc0_graph_pack nve4_grctx_pack_hub[]; | ||
173 | extern const struct nvc0_graph_pack nve4_grctx_pack_gpc[]; | ||
174 | extern const struct nvc0_graph_pack nve4_grctx_pack_tpc[]; | ||
175 | extern const struct nvc0_graph_pack nve4_grctx_pack_ppc[]; | ||
176 | extern const struct nvc0_graph_pack nve4_grctx_pack_icmd[]; | ||
177 | extern const struct nvc0_graph_init nve4_grctx_init_a097_0[]; | ||
178 | |||
179 | extern const struct nvc0_graph_pack nvf0_grctx_pack_icmd[]; | ||
180 | |||
181 | extern const struct nvc0_graph_pack nvf0_grctx_pack_mthd[]; | ||
182 | |||
183 | extern const struct nvc0_graph_pack nvf0_grctx_pack_hub[]; | ||
184 | extern const struct nvc0_graph_init nvf0_grctx_init_pri_0[]; | ||
185 | extern const struct nvc0_graph_init nvf0_grctx_init_cwd_0[]; | ||
186 | |||
187 | extern const struct nvc0_graph_pack nvf0_grctx_pack_gpc[]; | ||
188 | extern const struct nvc0_graph_init nvf0_grctx_init_gpc_unk_2[]; | ||
189 | |||
190 | extern const struct nvc0_graph_init nvf0_grctx_init_tex_0[]; | ||
191 | extern const struct nvc0_graph_init nvf0_grctx_init_mpc_0[]; | ||
192 | extern const struct nvc0_graph_init nvf0_grctx_init_l1c_0[]; | ||
193 | |||
194 | extern const struct nvc0_graph_pack nvf0_grctx_pack_ppc[]; | ||
195 | |||
196 | extern const struct nvc0_graph_init nv108_grctx_init_rstr2d_0[]; | ||
197 | |||
198 | extern const struct nvc0_graph_init nv108_grctx_init_prop_0[]; | ||
199 | extern const struct nvc0_graph_init nv108_grctx_init_crstr_0[]; | ||
200 | |||
201 | |||
202 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv20.h b/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv20.h deleted file mode 100644 index 2bea7313e03f..000000000000 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nv20.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef __NV20_GRAPH_H__ | ||
2 | #define __NV20_GRAPH_H__ | ||
3 | |||
4 | #include <core/enum.h> | ||
5 | |||
6 | #include <engine/graph.h> | ||
7 | #include <engine/fifo.h> | ||
8 | |||
9 | struct nv20_graph_priv { | ||
10 | struct nouveau_graph base; | ||
11 | struct nouveau_gpuobj *ctxtab; | ||
12 | }; | ||
13 | |||
14 | struct nv20_graph_chan { | ||
15 | struct nouveau_graph_chan base; | ||
16 | int chid; | ||
17 | }; | ||
18 | |||
19 | extern struct nouveau_oclass nv25_graph_sclass[]; | ||
20 | int nv20_graph_context_init(struct nouveau_object *); | ||
21 | int nv20_graph_context_fini(struct nouveau_object *, bool); | ||
22 | |||
23 | void nv20_graph_tile_prog(struct nouveau_engine *, int); | ||
24 | void nv20_graph_intr(struct nouveau_subdev *); | ||
25 | |||
26 | void nv20_graph_dtor(struct nouveau_object *); | ||
27 | int nv20_graph_init(struct nouveau_object *); | ||
28 | |||
29 | int nv30_graph_init(struct nouveau_object *); | ||
30 | |||
31 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc0.h b/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc0.h deleted file mode 100644 index 86b7735242e1..000000000000 --- a/drivers/gpu/drm/nouveau/nvkm/engine/graph/nvc0.h +++ /dev/null | |||
@@ -1,270 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2010 Red Hat Inc. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
18 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
20 | * OTHER DEALINGS IN THE SOFTWARE. | ||
21 | * | ||
22 | * Authors: Ben Skeggs | ||
23 | */ | ||
24 | |||
25 | #ifndef __NVC0_GRAPH_H__ | ||
26 | #define __NVC0_GRAPH_H__ | ||
27 | |||
28 | #include <core/client.h> | ||
29 | #include <core/handle.h> | ||
30 | #include <core/gpuobj.h> | ||
31 | #include <core/option.h> | ||
32 | |||
33 | #include <nvif/unpack.h> | ||
34 | #include <nvif/class.h> | ||
35 | |||
36 | #include <subdev/fb.h> | ||
37 | #include <subdev/mmu.h> | ||
38 | #include <subdev/bar.h> | ||
39 | #include <subdev/timer.h> | ||
40 | #include <subdev/mc.h> | ||
41 | #include <subdev/ltc.h> | ||
42 | |||
43 | #include <engine/fifo.h> | ||
44 | #include <engine/graph.h> | ||
45 | |||
46 | #include "fuc/os.h" | ||
47 | |||
48 | #define GPC_MAX 32 | ||
49 | #define TPC_MAX (GPC_MAX * 8) | ||
50 | |||
51 | #define ROP_BCAST(r) (0x408800 + (r)) | ||
52 | #define ROP_UNIT(u, r) (0x410000 + (u) * 0x400 + (r)) | ||
53 | #define GPC_BCAST(r) (0x418000 + (r)) | ||
54 | #define GPC_UNIT(t, r) (0x500000 + (t) * 0x8000 + (r)) | ||
55 | #define PPC_UNIT(t, m, r) (0x503000 + (t) * 0x8000 + (m) * 0x200 + (r)) | ||
56 | #define TPC_UNIT(t, m, r) (0x504000 + (t) * 0x8000 + (m) * 0x800 + (r)) | ||
57 | |||
58 | struct nvc0_graph_data { | ||
59 | u32 size; | ||
60 | u32 align; | ||
61 | u32 access; | ||
62 | }; | ||
63 | |||
64 | struct nvc0_graph_mmio { | ||
65 | u32 addr; | ||
66 | u32 data; | ||
67 | u32 shift; | ||
68 | int buffer; | ||
69 | }; | ||
70 | |||
71 | struct nvc0_graph_fuc { | ||
72 | u32 *data; | ||
73 | u32 size; | ||
74 | }; | ||
75 | |||
76 | struct nvc0_graph_zbc_color { | ||
77 | u32 format; | ||
78 | u32 ds[4]; | ||
79 | u32 l2[4]; | ||
80 | }; | ||
81 | |||
82 | struct nvc0_graph_zbc_depth { | ||
83 | u32 format; | ||
84 | u32 ds; | ||
85 | u32 l2; | ||
86 | }; | ||
87 | |||
88 | struct nvc0_graph_priv { | ||
89 | struct nouveau_graph base; | ||
90 | |||
91 | struct nvc0_graph_fuc fuc409c; | ||
92 | struct nvc0_graph_fuc fuc409d; | ||
93 | struct nvc0_graph_fuc fuc41ac; | ||
94 | struct nvc0_graph_fuc fuc41ad; | ||
95 | bool firmware; | ||
96 | |||
97 | struct nvc0_graph_zbc_color zbc_color[NOUVEAU_LTC_MAX_ZBC_CNT]; | ||
98 | struct nvc0_graph_zbc_depth zbc_depth[NOUVEAU_LTC_MAX_ZBC_CNT]; | ||
99 | |||
100 | u8 rop_nr; | ||
101 | u8 gpc_nr; | ||
102 | u8 tpc_nr[GPC_MAX]; | ||
103 | u8 tpc_total; | ||
104 | u8 ppc_nr[GPC_MAX]; | ||
105 | u8 ppc_tpc_nr[GPC_MAX][4]; | ||
106 | |||
107 | struct nouveau_gpuobj *unk4188b4; | ||
108 | struct nouveau_gpuobj *unk4188b8; | ||
109 | |||
110 | struct nvc0_graph_data mmio_data[4]; | ||
111 | struct nvc0_graph_mmio mmio_list[4096/8]; | ||
112 | u32 size; | ||
113 | u32 *data; | ||
114 | |||
115 | u8 magic_not_rop_nr; | ||
116 | }; | ||
117 | |||
118 | struct nvc0_graph_chan { | ||
119 | struct nouveau_graph_chan base; | ||
120 | |||
121 | struct nouveau_gpuobj *mmio; | ||
122 | struct nouveau_vma mmio_vma; | ||
123 | int mmio_nr; | ||
124 | struct { | ||
125 | struct nouveau_gpuobj *mem; | ||
126 | struct nouveau_vma vma; | ||
127 | } data[4]; | ||
128 | }; | ||
129 | |||
130 | int nvc0_graph_context_ctor(struct nouveau_object *, struct nouveau_object *, | ||
131 | struct nouveau_oclass *, void *, u32, | ||
132 | struct nouveau_object **); | ||
133 | void nvc0_graph_context_dtor(struct nouveau_object *); | ||
134 | |||
135 | void nvc0_graph_ctxctl_debug(struct nvc0_graph_priv *); | ||
136 | |||
137 | u64 nvc0_graph_units(struct nouveau_graph *); | ||
138 | int nvc0_graph_ctor(struct nouveau_object *, struct nouveau_object *, | ||
139 | struct nouveau_oclass *, void *data, u32 size, | ||
140 | struct nouveau_object **); | ||
141 | void nvc0_graph_dtor(struct nouveau_object *); | ||
142 | int nvc0_graph_init(struct nouveau_object *); | ||
143 | void nvc0_graph_zbc_init(struct nvc0_graph_priv *); | ||
144 | |||
145 | int nve4_graph_fini(struct nouveau_object *, bool); | ||
146 | int nve4_graph_init(struct nouveau_object *); | ||
147 | |||
148 | int nvf0_graph_fini(struct nouveau_object *, bool); | ||
149 | |||
150 | extern struct nouveau_ofuncs nvc0_fermi_ofuncs; | ||
151 | |||
152 | extern struct nouveau_oclass nvc0_graph_sclass[]; | ||
153 | extern struct nouveau_omthds nvc0_graph_9097_omthds[]; | ||
154 | extern struct nouveau_omthds nvc0_graph_90c0_omthds[]; | ||
155 | extern struct nouveau_oclass nvc8_graph_sclass[]; | ||
156 | extern struct nouveau_oclass nvf0_graph_sclass[]; | ||
157 | |||
158 | struct nvc0_graph_init { | ||
159 | u32 addr; | ||
160 | u8 count; | ||
161 | u8 pitch; | ||
162 | u32 data; | ||
163 | }; | ||
164 | |||
165 | struct nvc0_graph_pack { | ||
166 | const struct nvc0_graph_init *init; | ||
167 | u32 type; | ||
168 | }; | ||
169 | |||
170 | #define pack_for_each_init(init, pack, head) \ | ||
171 | for (pack = head; pack && pack->init; pack++) \ | ||
172 | for (init = pack->init; init && init->count; init++) | ||
173 | |||
174 | struct nvc0_graph_ucode { | ||
175 | struct nvc0_graph_fuc code; | ||
176 | struct nvc0_graph_fuc data; | ||
177 | }; | ||
178 | |||
179 | extern struct nvc0_graph_ucode nvc0_graph_fecs_ucode; | ||
180 | extern struct nvc0_graph_ucode nvc0_graph_gpccs_ucode; | ||
181 | |||
182 | extern struct nvc0_graph_ucode nvf0_graph_fecs_ucode; | ||
183 | extern struct nvc0_graph_ucode nvf0_graph_gpccs_ucode; | ||
184 | |||
185 | struct nvc0_graph_oclass { | ||
186 | struct nouveau_oclass base; | ||
187 | struct nouveau_oclass **cclass; | ||
188 | struct nouveau_oclass *sclass; | ||
189 | const struct nvc0_graph_pack *mmio; | ||
190 | struct { | ||
191 | struct nvc0_graph_ucode *ucode; | ||
192 | } fecs; | ||
193 | struct { | ||
194 | struct nvc0_graph_ucode *ucode; | ||
195 | } gpccs; | ||
196 | int ppc_nr; | ||
197 | }; | ||
198 | |||
199 | void nvc0_graph_mmio(struct nvc0_graph_priv *, const struct nvc0_graph_pack *); | ||
200 | void nvc0_graph_icmd(struct nvc0_graph_priv *, const struct nvc0_graph_pack *); | ||
201 | void nvc0_graph_mthd(struct nvc0_graph_priv *, const struct nvc0_graph_pack *); | ||
202 | int nvc0_graph_init_ctxctl(struct nvc0_graph_priv *); | ||
203 | |||
204 | /* register init value lists */ | ||
205 | |||
206 | extern const struct nvc0_graph_init nvc0_graph_init_main_0[]; | ||
207 | extern const struct nvc0_graph_init nvc0_graph_init_fe_0[]; | ||
208 | extern const struct nvc0_graph_init nvc0_graph_init_pri_0[]; | ||
209 | extern const struct nvc0_graph_init nvc0_graph_init_rstr2d_0[]; | ||
210 | extern const struct nvc0_graph_init nvc0_graph_init_pd_0[]; | ||
211 | extern const struct nvc0_graph_init nvc0_graph_init_ds_0[]; | ||
212 | extern const struct nvc0_graph_init nvc0_graph_init_scc_0[]; | ||
213 | extern const struct nvc0_graph_init nvc0_graph_init_prop_0[]; | ||
214 | extern const struct nvc0_graph_init nvc0_graph_init_gpc_unk_0[]; | ||
215 | extern const struct nvc0_graph_init nvc0_graph_init_setup_0[]; | ||
216 | extern const struct nvc0_graph_init nvc0_graph_init_crstr_0[]; | ||
217 | extern const struct nvc0_graph_init nvc0_graph_init_setup_1[]; | ||
218 | extern const struct nvc0_graph_init nvc0_graph_init_zcull_0[]; | ||
219 | extern const struct nvc0_graph_init nvc0_graph_init_gpm_0[]; | ||
220 | extern const struct nvc0_graph_init nvc0_graph_init_gpc_unk_1[]; | ||
221 | extern const struct nvc0_graph_init nvc0_graph_init_gcc_0[]; | ||
222 | extern const struct nvc0_graph_init nvc0_graph_init_tpccs_0[]; | ||
223 | extern const struct nvc0_graph_init nvc0_graph_init_tex_0[]; | ||
224 | extern const struct nvc0_graph_init nvc0_graph_init_pe_0[]; | ||
225 | extern const struct nvc0_graph_init nvc0_graph_init_l1c_0[]; | ||
226 | extern const struct nvc0_graph_init nvc0_graph_init_wwdx_0[]; | ||
227 | extern const struct nvc0_graph_init nvc0_graph_init_tpccs_1[]; | ||
228 | extern const struct nvc0_graph_init nvc0_graph_init_mpc_0[]; | ||
229 | extern const struct nvc0_graph_init nvc0_graph_init_be_0[]; | ||
230 | extern const struct nvc0_graph_init nvc0_graph_init_fe_1[]; | ||
231 | extern const struct nvc0_graph_init nvc0_graph_init_pe_1[]; | ||
232 | |||
233 | extern const struct nvc0_graph_init nvc4_graph_init_ds_0[]; | ||
234 | extern const struct nvc0_graph_init nvc4_graph_init_tex_0[]; | ||
235 | extern const struct nvc0_graph_init nvc4_graph_init_sm_0[]; | ||
236 | |||
237 | extern const struct nvc0_graph_init nvc1_graph_init_gpc_unk_0[]; | ||
238 | extern const struct nvc0_graph_init nvc1_graph_init_setup_1[]; | ||
239 | |||
240 | extern const struct nvc0_graph_init nvd9_graph_init_pd_0[]; | ||
241 | extern const struct nvc0_graph_init nvd9_graph_init_ds_0[]; | ||
242 | extern const struct nvc0_graph_init nvd9_graph_init_prop_0[]; | ||
243 | extern const struct nvc0_graph_init nvd9_graph_init_gpm_0[]; | ||
244 | extern const struct nvc0_graph_init nvd9_graph_init_gpc_unk_1[]; | ||
245 | extern const struct nvc0_graph_init nvd9_graph_init_tex_0[]; | ||
246 | extern const struct nvc0_graph_init nvd9_graph_init_sm_0[]; | ||
247 | extern const struct nvc0_graph_init nvd9_graph_init_fe_1[]; | ||
248 | |||
249 | extern const struct nvc0_graph_init nvd7_graph_init_pes_0[]; | ||
250 | extern const struct nvc0_graph_init nvd7_graph_init_wwdx_0[]; | ||
251 | extern const struct nvc0_graph_init nvd7_graph_init_cbm_0[]; | ||
252 | |||
253 | extern const struct nvc0_graph_init nve4_graph_init_main_0[]; | ||
254 | extern const struct nvc0_graph_init nve4_graph_init_tpccs_0[]; | ||
255 | extern const struct nvc0_graph_init nve4_graph_init_pe_0[]; | ||
256 | extern const struct nvc0_graph_init nve4_graph_init_be_0[]; | ||
257 | extern const struct nvc0_graph_pack nve4_graph_pack_mmio[]; | ||
258 | |||
259 | extern const struct nvc0_graph_init nvf0_graph_init_fe_0[]; | ||
260 | extern const struct nvc0_graph_init nvf0_graph_init_ds_0[]; | ||
261 | extern const struct nvc0_graph_init nvf0_graph_init_sked_0[]; | ||
262 | extern const struct nvc0_graph_init nvf0_graph_init_cwd_0[]; | ||
263 | extern const struct nvc0_graph_init nvf0_graph_init_gpc_unk_1[]; | ||
264 | extern const struct nvc0_graph_init nvf0_graph_init_tex_0[]; | ||
265 | extern const struct nvc0_graph_init nvf0_graph_init_sm_0[]; | ||
266 | |||
267 | extern const struct nvc0_graph_init nv108_graph_init_gpc_unk_0[]; | ||
268 | |||
269 | |||
270 | #endif | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c index 8803809f9fc5..f65bc796bcde 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv40.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * Authors: Ben Skeggs | 22 | * Authors: Ben Skeggs |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <engine/graph/nv40.h> | 25 | #include <engine/gr/nv40.h> |
26 | 26 | ||
27 | #include "nv04.h" | 27 | #include "nv04.h" |
28 | 28 | ||
@@ -73,12 +73,12 @@ nv40_instmem_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
73 | 73 | ||
74 | /* PRAMIN aperture maps over the end of vram, reserve enough space | 74 | /* PRAMIN aperture maps over the end of vram, reserve enough space |
75 | * to fit graphics contexts for every channel, the magics come | 75 | * to fit graphics contexts for every channel, the magics come |
76 | * from engine/graph/nv40.c | 76 | * from engine/gr/nv40.c |
77 | */ | 77 | */ |
78 | vs = hweight8((nv_rd32(priv, 0x001540) & 0x0000ff00) >> 8); | 78 | vs = hweight8((nv_rd32(priv, 0x001540) & 0x0000ff00) >> 8); |
79 | if (device->chipset == 0x40) priv->base.reserved = 0x6aa0 * vs; | 79 | if (device->chipset == 0x40) priv->base.reserved = 0x6aa0 * vs; |
80 | else if (device->chipset < 0x43) priv->base.reserved = 0x4f00 * vs; | 80 | else if (device->chipset < 0x43) priv->base.reserved = 0x4f00 * vs; |
81 | else if (nv44_graph_class(priv)) priv->base.reserved = 0x4980 * vs; | 81 | else if (nv44_gr_class(priv)) priv->base.reserved = 0x4980 * vs; |
82 | else priv->base.reserved = 0x4a40 * vs; | 82 | else priv->base.reserved = 0x4a40 * vs; |
83 | priv->base.reserved += 16 * 1024; | 83 | priv->base.reserved += 16 * 1024; |
84 | priv->base.reserved *= 32; /* per-channel */ | 84 | priv->base.reserved *= 32; /* per-channel */ |