diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h index c4f2f1f..7ef6bc2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/channv50.h @@ -1,42 +1,35 @@ #ifndef __NV50_FIFO_CHAN_H__ #define __NV50_FIFO_CHAN_H__ +#define nv50_fifo_chan(p) container_of((p), struct nv50_fifo_chan, base) #include "chan.h" #include "nv50.h" -struct nv50_fifo_base { - struct nvkm_fifo_base base; +struct nv50_fifo_chan { + struct nv50_fifo *fifo; + struct nvkm_fifo_chan base; + struct nvkm_gpuobj *ramfc; struct nvkm_gpuobj *cache; struct nvkm_gpuobj *eng; struct nvkm_gpuobj *pgd; + struct nvkm_ramht *ramht; struct nvkm_vm *vm; -}; -struct nv50_fifo_chan { - struct nvkm_fifo_chan base; - u32 subc[8]; - struct nvkm_ramht *ramht; + struct nvkm_gpuobj *engn[NVDEV_SUBDEV_NR]; }; -extern struct nvkm_oclass nv50_fifo_cclass; -extern struct nvkm_oclass nv50_fifo_sclass[]; -void nv50_fifo_context_dtor(struct nvkm_object *); -void nv50_fifo_chan_dtor(struct nvkm_object *); -int nv50_fifo_chan_init(struct nvkm_object *); -int nv50_fifo_chan_fini(struct nvkm_object *, bool); -int nv50_fifo_context_attach(struct nvkm_object *, struct nvkm_object *); -int nv50_fifo_context_detach(struct nvkm_object *, bool, - struct nvkm_object *); -int nv50_fifo_object_attach(struct nvkm_object *, struct nvkm_object *, u32); -void nv50_fifo_object_detach(struct nvkm_object *, int); -extern struct nvkm_ofuncs nv50_fifo_ofuncs_ind; +int nv50_fifo_chan_ctor(struct nv50_fifo *, u64 vm, u64 push, + const struct nvkm_oclass *, struct nv50_fifo_chan *); +void *nv50_fifo_chan_dtor(struct nvkm_fifo_chan *); +void nv50_fifo_chan_fini(struct nvkm_fifo_chan *); +void nv50_fifo_chan_engine_dtor(struct nvkm_fifo_chan *, struct nvkm_engine *); +void nv50_fifo_chan_object_dtor(struct nvkm_fifo_chan *, int); + +int g84_fifo_chan_ctor(struct nv50_fifo *, u64 vm, u64 push, + const struct nvkm_oclass *, struct nv50_fifo_chan *); -extern struct nvkm_oclass g84_fifo_cclass; -extern struct nvkm_oclass g84_fifo_sclass[]; -int g84_fifo_chan_init(struct nvkm_object *); -int g84_fifo_context_attach(struct nvkm_object *, struct nvkm_object *); -int g84_fifo_context_detach(struct nvkm_object *, bool, - struct nvkm_object *); -int g84_fifo_object_attach(struct nvkm_object *, struct nvkm_object *, u32); -extern struct nvkm_ofuncs g84_fifo_ofuncs_ind; +extern const struct nvkm_fifo_chan_oclass nv50_fifo_dma_oclass; +extern const struct nvkm_fifo_chan_oclass nv50_fifo_gpfifo_oclass; +extern const struct nvkm_fifo_chan_oclass g84_fifo_dma_oclass; +extern const struct nvkm_fifo_chan_oclass g84_fifo_gpfifo_oclass; #endif |