aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-03-02 17:44:01 -0500
committerBen Skeggs <bskeggs@redhat.com>2017-03-07 02:05:17 -0500
commitba4c063d47562d28aed3d440959fb6b13802e921 (patch)
tree0c6a4d9fe65621880a40eb56ee3b8c18688010f9
parent904e703c8065f57665e21cdd170ea2b6b809da79 (diff)
drm/nouveau/fb/gm200: split ram implementation from gm107
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c41
4 files changed, 44 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
index 8c7cce2451bc..1c5e5ba487a8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
@@ -46,6 +46,7 @@ nvkm-y += nvkm/subdev/fb/ramgf100.o
46nvkm-y += nvkm/subdev/fb/ramgf108.o 46nvkm-y += nvkm/subdev/fb/ramgf108.o
47nvkm-y += nvkm/subdev/fb/ramgk104.o 47nvkm-y += nvkm/subdev/fb/ramgk104.o
48nvkm-y += nvkm/subdev/fb/ramgm107.o 48nvkm-y += nvkm/subdev/fb/ramgm107.o
49nvkm-y += nvkm/subdev/fb/ramgm200.o
49nvkm-y += nvkm/subdev/fb/ramgp100.o 50nvkm-y += nvkm/subdev/fb/ramgp100.o
50nvkm-y += nvkm/subdev/fb/sddr2.o 51nvkm-y += nvkm/subdev/fb/sddr2.o
51nvkm-y += nvkm/subdev/fb/sddr3.o 52nvkm-y += nvkm/subdev/fb/sddr3.o
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c
index fe5886013ac0..d83da5ddbc1e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c
@@ -68,7 +68,7 @@ gm200_fb = {
68 .init = gm200_fb_init, 68 .init = gm200_fb_init,
69 .init_page = gm200_fb_init_page, 69 .init_page = gm200_fb_init_page,
70 .intr = gf100_fb_intr, 70 .intr = gf100_fb_intr,
71 .ram_new = gm107_ram_new, 71 .ram_new = gm200_ram_new,
72 .memtype_valid = gf100_fb_memtype_valid, 72 .memtype_valid = gf100_fb_memtype_valid,
73}; 73};
74 74
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
index c6c05aac0ff6..893fbb957181 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
@@ -60,5 +60,6 @@ int gf100_ram_new(struct nvkm_fb *, struct nvkm_ram **);
60int gf108_ram_new(struct nvkm_fb *, struct nvkm_ram **); 60int gf108_ram_new(struct nvkm_fb *, struct nvkm_ram **);
61int gk104_ram_new(struct nvkm_fb *, struct nvkm_ram **); 61int gk104_ram_new(struct nvkm_fb *, struct nvkm_ram **);
62int gm107_ram_new(struct nvkm_fb *, struct nvkm_ram **); 62int gm107_ram_new(struct nvkm_fb *, struct nvkm_ram **);
63int gm200_ram_new(struct nvkm_fb *, struct nvkm_ram **);
63int gp100_ram_new(struct nvkm_fb *, struct nvkm_ram **); 64int gp100_ram_new(struct nvkm_fb *, struct nvkm_ram **);
64#endif 65#endif
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c
new file mode 100644
index 000000000000..04ae81f0db10
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgm200.c
@@ -0,0 +1,41 @@
1/*
2 * Copyright 2017 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 <bskeggs@redhat.com>
23 */
24#include "ram.h"
25
26static const struct nvkm_ram_func
27gm200_ram = {
28 .dtor = gk104_ram_dtor,
29 .init = gk104_ram_init,
30 .get = gf100_ram_get,
31 .put = gf100_ram_put,
32 .calc = gk104_ram_calc,
33 .prog = gk104_ram_prog,
34 .tidy = gk104_ram_tidy,
35};
36
37int
38gm200_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
39{
40 return gk104_ram_new_(&gm200_ram, fb, pram, 0x021c14);
41}