summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2022-06-01 20:47:21 +1000
committerBen Skeggs <bskeggs@redhat.com>2022-11-09 10:44:46 +1000
commitf5e4568991f60125712b03079bc037c6feb953f1 (patch)
treef42d26a9271ee5436e6478097ff09ded8ef33350 /drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
parent8c18138c7633f7f9e609be6b11e48bb33a8dfb75 (diff)
drm/nouveau/fifo: unify handling of channel classes
Adds the basic skeleton for common channel (group) interfaces. - common behaviour between <gk104 and >=gk104 impl's - separates priv/user channel objects - passthrough to existing object for now, kludges removed later Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
index 01e75c80b4f3..30f924e3da3c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/nv40.c
@@ -21,6 +21,8 @@
*
* Authors: Ben Skeggs
*/
+#include "chan.h"
+
#include "nv04.h"
#include "channv04.h"
#include "regsnv04.h"
@@ -29,6 +31,8 @@
#include <subdev/fb.h>
#include <subdev/instmem.h>
+#include <nvif/class.h>
+
static const struct nv04_fifo_ramfc
nv40_fifo_ramfc[] = {
{ 32, 0, 0x00, 0, NV04_PFIFO_CACHE1_DMA_PUT },
@@ -56,6 +60,10 @@ nv40_fifo_ramfc[] = {
{}
};
+static const struct nvkm_chan_func
+nv40_chan = {
+};
+
static void
nv40_fifo_init(struct nvkm_fifo *base)
{
@@ -117,10 +125,8 @@ nv40_fifo = {
.id_engine = nv04_fifo_id_engine,
.pause = nv04_fifo_pause,
.start = nv04_fifo_start,
- .chan = {
- &nv40_fifo_dma_oclass,
- NULL
- },
+ .cgrp = {{ }, &nv04_cgrp },
+ .chan = {{ 0, 0, NV40_CHANNEL_DMA }, &nv40_chan, .oclass = &nv40_fifo_dma_oclass },
};
int