diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-07-08 20:41:01 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-07-13 21:53:25 -0400 |
commit | 6258cd43cf261a2d066af86d730a48301c8d09a2 (patch) | |
tree | ca82e7636703be11f5208a25240fcdc8a1bd0a07 | |
parent | 4fdbdfa8ae8fd2c978de51affdc851584e872f94 (diff) |
drm/nouveau/fb/gp104: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp104.c | 43 |
6 files changed, 49 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h index c6c3c1ec3ae1..3a410275fa71 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | |||
@@ -94,6 +94,7 @@ int gk20a_fb_new(struct nvkm_device *, int, struct nvkm_fb **); | |||
94 | int gm107_fb_new(struct nvkm_device *, int, struct nvkm_fb **); | 94 | int gm107_fb_new(struct nvkm_device *, int, struct nvkm_fb **); |
95 | int gm200_fb_new(struct nvkm_device *, int, struct nvkm_fb **); | 95 | int gm200_fb_new(struct nvkm_device *, int, struct nvkm_fb **); |
96 | int gp100_fb_new(struct nvkm_device *, int, struct nvkm_fb **); | 96 | int gp100_fb_new(struct nvkm_device *, int, struct nvkm_fb **); |
97 | int gp104_fb_new(struct nvkm_device *, int, struct nvkm_fb **); | ||
97 | 98 | ||
98 | #include <subdev/bios.h> | 99 | #include <subdev/bios.h> |
99 | #include <subdev/bios/ramcfg.h> | 100 | #include <subdev/bios/ramcfg.h> |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index 0ae41e6f58f2..0b8f5d0ff547 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | |||
@@ -2186,6 +2186,7 @@ nv134_chipset = { | |||
2186 | .name = "GP104", | 2186 | .name = "GP104", |
2187 | .bios = nvkm_bios_new, | 2187 | .bios = nvkm_bios_new, |
2188 | .devinit = gm200_devinit_new, | 2188 | .devinit = gm200_devinit_new, |
2189 | .fb = gp104_fb_new, | ||
2189 | .imem = nv50_instmem_new, | 2190 | .imem = nv50_instmem_new, |
2190 | .mc = gp100_mc_new, | 2191 | .mc = gp100_mc_new, |
2191 | .pci = gp100_pci_new, | 2192 | .pci = gp100_pci_new, |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild index 1ca005d3ac62..edcc157e6ac8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | |||
@@ -25,6 +25,7 @@ nvkm-y += nvkm/subdev/fb/gk20a.o | |||
25 | nvkm-y += nvkm/subdev/fb/gm107.o | 25 | nvkm-y += nvkm/subdev/fb/gm107.o |
26 | nvkm-y += nvkm/subdev/fb/gm200.o | 26 | nvkm-y += nvkm/subdev/fb/gm200.o |
27 | nvkm-y += nvkm/subdev/fb/gp100.o | 27 | nvkm-y += nvkm/subdev/fb/gp100.o |
28 | nvkm-y += nvkm/subdev/fb/gp104.o | ||
28 | 29 | ||
29 | nvkm-y += nvkm/subdev/fb/ram.o | 30 | nvkm-y += nvkm/subdev/fb/ram.o |
30 | nvkm-y += nvkm/subdev/fb/ramnv04.o | 31 | nvkm-y += nvkm/subdev/fb/ramnv04.o |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h index 2160e5a39c9a..449f431644b3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.h | |||
@@ -14,4 +14,6 @@ int gf100_fb_new_(const struct nvkm_fb_func *, struct nvkm_device *, | |||
14 | void *gf100_fb_dtor(struct nvkm_fb *); | 14 | void *gf100_fb_dtor(struct nvkm_fb *); |
15 | void gf100_fb_init(struct nvkm_fb *); | 15 | void gf100_fb_init(struct nvkm_fb *); |
16 | void gf100_fb_intr(struct nvkm_fb *); | 16 | void gf100_fb_intr(struct nvkm_fb *); |
17 | |||
18 | void gp100_fb_init(struct nvkm_fb *); | ||
17 | #endif | 19 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c index 1620067168e6..98474aec1921 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp100.c | |||
@@ -36,7 +36,7 @@ gp100_fb_init_unkn(struct nvkm_fb *base) | |||
36 | nvkm_wr32(device, 0x1faccc, nvkm_rd32(device, 0x100ccc)); | 36 | nvkm_wr32(device, 0x1faccc, nvkm_rd32(device, 0x100ccc)); |
37 | } | 37 | } |
38 | 38 | ||
39 | static void | 39 | void |
40 | gp100_fb_init(struct nvkm_fb *base) | 40 | gp100_fb_init(struct nvkm_fb *base) |
41 | { | 41 | { |
42 | struct gf100_fb *fb = gf100_fb(base); | 42 | struct gf100_fb *fb = gf100_fb(base); |
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp104.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp104.c new file mode 100644 index 000000000000..92cb71861bec --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gp104.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * Copyright 2016 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 "gf100.h" | ||
25 | #include "ram.h" | ||
26 | |||
27 | #include <core/memory.h> | ||
28 | |||
29 | static const struct nvkm_fb_func | ||
30 | gp104_fb = { | ||
31 | .dtor = gf100_fb_dtor, | ||
32 | .oneinit = gf100_fb_oneinit, | ||
33 | .init = gp100_fb_init, | ||
34 | .init_page = gm200_fb_init_page, | ||
35 | .ram_new = gp100_ram_new, | ||
36 | .memtype_valid = gf100_fb_memtype_valid, | ||
37 | }; | ||
38 | |||
39 | int | ||
40 | gp104_fb_new(struct nvkm_device *device, int index, struct nvkm_fb **pfb) | ||
41 | { | ||
42 | return gf100_fb_new_(&gp104_fb, device, index, pfb); | ||
43 | } | ||