1 #ifndef __NV31_MPEG_H__ 2 #define __NV31_MPEG_H__ 3 #define nv31_mpeg(p) container_of((p), struct nv31_mpeg, engine) 4 #include "priv.h" 5 #include <engine/mpeg.h> 6 7 struct nv31_mpeg { 8 const struct nv31_mpeg_func *func; 9 struct nvkm_engine engine; 10 struct nv31_mpeg_chan *chan; 11 }; 12 13 int nv31_mpeg_new_(const struct nv31_mpeg_func *, struct nvkm_device *, 14 int index, struct nvkm_engine **); 15 16 struct nv31_mpeg_func { 17 bool (*mthd_dma)(struct nvkm_device *, u32 mthd, u32 data); 18 }; 19 20 #define nv31_mpeg_chan(p) container_of((p), struct nv31_mpeg_chan, object) 21 22 struct nv31_mpeg_chan { 23 struct nvkm_object object; 24 struct nv31_mpeg *mpeg; 25 struct nvkm_fifo_chan *fifo; 26 }; 27 28 int nv31_mpeg_chan_new(struct nvkm_fifo_chan *, const struct nvkm_oclass *, 29 struct nvkm_object **); 30 #endif 31