summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:18 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:39 +1000
commit6157091177102638c7d94ffc159c0b157a1c9b56 (patch)
tree7fb03c21a5db1bc156d3634ede7f1d45fb00f176 /drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h
parent590801c1a3b19883b0d0e4c60241cbed8a916d47 (diff)
drm/nouveau/sw: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h b/drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h
index b5cf4c517a95..edebd9c30c0c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/sw/chan.h
@@ -6,12 +6,22 @@
struct nvkm_sw_chan {
struct nvkm_engctx base;
+ const struct nvkm_sw_chan_func *func;
+ struct nvkm_fifo_chan *fifo;
+ struct list_head head;
struct nvkm_event event;
};
-#define nvkm_sw_context_create(p,e,c,d) \
- nvkm_sw_chan_ctor((p), (e), (c), sizeof(**d), (void **)d)
-int nvkm_sw_chan_ctor(struct nvkm_object *, struct nvkm_object *,
+struct nvkm_sw_chan_func {
+ bool (*mthd)(struct nvkm_sw_chan *, int subc, u32 mthd, u32 data);
+};
+
+bool nvkm_sw_chan_mthd(struct nvkm_sw_chan *, int subc, u32 mthd, u32 data);
+
+#define nvkm_sw_context_create(f,p,e,c,d) \
+ nvkm_sw_chan_ctor((f), (p), (e), (c), sizeof(**d), (void **)d)
+int nvkm_sw_chan_ctor(const struct nvkm_sw_chan_func *,
+ struct nvkm_object *, struct nvkm_object *,
struct nvkm_oclass *, int, void **);
void nvkm_sw_chan_dtor(struct nvkm_object *);
#define nvkm_sw_context_init(d) \