aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2014-05-02 05:32:38 -0400
committerBen Skeggs <bskeggs@redhat.com>2014-06-10 02:05:49 -0400
commit86ebef722dab7f9ea4c5753640ef7d660c681985 (patch)
tree58869e602e564dc5e5061c38d110d6f2ea472fef /drivers
parentfef94f6272c6d1ce1c9177770f50f7281d61f5f6 (diff)
drm/nouveau/fifo: add GK20A support
GK20A's FIFO is compatible with NVE0, but only features 128 channels and 1 runlist. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/Makefile1
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/fifo/gk20a.c35
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/fifo/nve0.h1
-rw-r--r--drivers/gpu/drm/nouveau/core/include/engine/fifo.h1
4 files changed, 38 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
index 34fef246e779..e6fe53bab593 100644
--- a/drivers/gpu/drm/nouveau/Makefile
+++ b/drivers/gpu/drm/nouveau/Makefile
@@ -248,6 +248,7 @@ nouveau-y += core/engine/fifo/nv50.o
248nouveau-y += core/engine/fifo/nv84.o 248nouveau-y += core/engine/fifo/nv84.o
249nouveau-y += core/engine/fifo/nvc0.o 249nouveau-y += core/engine/fifo/nvc0.o
250nouveau-y += core/engine/fifo/nve0.o 250nouveau-y += core/engine/fifo/nve0.o
251nouveau-y += core/engine/fifo/gk20a.o
251nouveau-y += core/engine/fifo/nv108.o 252nouveau-y += core/engine/fifo/nv108.o
252nouveau-y += core/engine/graph/ctxnv40.o 253nouveau-y += core/engine/graph/ctxnv40.o
253nouveau-y += core/engine/graph/ctxnv50.o 254nouveau-y += core/engine/graph/ctxnv50.o
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/gk20a.c b/drivers/gpu/drm/nouveau/core/engine/fifo/gk20a.c
new file mode 100644
index 000000000000..327456eae963
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/core/engine/fifo/gk20a.c
@@ -0,0 +1,35 @@
1/*
2 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#include "nve0.h"
24
25struct nouveau_oclass *
26gk20a_fifo_oclass = &(struct nve0_fifo_impl) {
27 .base.handle = NV_ENGINE(FIFO, 0xea),
28 .base.ofuncs = &(struct nouveau_ofuncs) {
29 .ctor = nve0_fifo_ctor,
30 .dtor = nve0_fifo_dtor,
31 .init = nve0_fifo_init,
32 .fini = nve0_fifo_fini,
33 },
34 .channels = 128,
35}.base;
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.h b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.h
index 014344ebee66..e96b32bb1bbc 100644
--- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.h
+++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.h
@@ -8,6 +8,7 @@ int nve0_fifo_ctor(struct nouveau_object *, struct nouveau_object *,
8 struct nouveau_object **); 8 struct nouveau_object **);
9void nve0_fifo_dtor(struct nouveau_object *); 9void nve0_fifo_dtor(struct nouveau_object *);
10int nve0_fifo_init(struct nouveau_object *); 10int nve0_fifo_init(struct nouveau_object *);
11int nve0_fifo_fini(struct nouveau_object *, bool);
11 12
12struct nve0_fifo_impl { 13struct nve0_fifo_impl {
13 struct nouveau_oclass base; 14 struct nouveau_oclass base;
diff --git a/drivers/gpu/drm/nouveau/core/include/engine/fifo.h b/drivers/gpu/drm/nouveau/core/include/engine/fifo.h
index 26b6b2bb1112..b639eb2c74ff 100644
--- a/drivers/gpu/drm/nouveau/core/include/engine/fifo.h
+++ b/drivers/gpu/drm/nouveau/core/include/engine/fifo.h
@@ -109,6 +109,7 @@ extern struct nouveau_oclass *nv50_fifo_oclass;
109extern struct nouveau_oclass *nv84_fifo_oclass; 109extern struct nouveau_oclass *nv84_fifo_oclass;
110extern struct nouveau_oclass *nvc0_fifo_oclass; 110extern struct nouveau_oclass *nvc0_fifo_oclass;
111extern struct nouveau_oclass *nve0_fifo_oclass; 111extern struct nouveau_oclass *nve0_fifo_oclass;
112extern struct nouveau_oclass *gk20a_fifo_oclass;
112extern struct nouveau_oclass *nv108_fifo_oclass; 113extern struct nouveau_oclass *nv108_fifo_oclass;
113 114
114void nv04_fifo_intr(struct nouveau_subdev *); 115void nv04_fifo_intr(struct nouveau_subdev *);