1c39f472eSBen Skeggs #ifndef __NOUVEAU_MPEG_H__ 2c39f472eSBen Skeggs #define __NOUVEAU_MPEG_H__ 3c39f472eSBen Skeggs 4c39f472eSBen Skeggs #include <core/engine.h> 5c39f472eSBen Skeggs #include <core/engctx.h> 6c39f472eSBen Skeggs 7c39f472eSBen Skeggs struct nouveau_mpeg_chan { 8c39f472eSBen Skeggs struct nouveau_engctx base; 9c39f472eSBen Skeggs }; 10c39f472eSBen Skeggs 11c39f472eSBen Skeggs #define nouveau_mpeg_context_create(p,e,c,g,s,a,f,d) \ 12c39f472eSBen Skeggs nouveau_engctx_create((p), (e), (c), (g), (s), (a), (f), (d)) 13c39f472eSBen Skeggs #define nouveau_mpeg_context_destroy(d) \ 14c39f472eSBen Skeggs nouveau_engctx_destroy(&(d)->base) 15c39f472eSBen Skeggs #define nouveau_mpeg_context_init(d) \ 16c39f472eSBen Skeggs nouveau_engctx_init(&(d)->base) 17c39f472eSBen Skeggs #define nouveau_mpeg_context_fini(d,s) \ 18c39f472eSBen Skeggs nouveau_engctx_fini(&(d)->base, (s)) 19c39f472eSBen Skeggs 20c39f472eSBen Skeggs #define _nouveau_mpeg_context_dtor _nouveau_engctx_dtor 21c39f472eSBen Skeggs #define _nouveau_mpeg_context_init _nouveau_engctx_init 22c39f472eSBen Skeggs #define _nouveau_mpeg_context_fini _nouveau_engctx_fini 23c39f472eSBen Skeggs #define _nouveau_mpeg_context_rd32 _nouveau_engctx_rd32 24c39f472eSBen Skeggs #define _nouveau_mpeg_context_wr32 _nouveau_engctx_wr32 25c39f472eSBen Skeggs 26c39f472eSBen Skeggs struct nouveau_mpeg { 27c39f472eSBen Skeggs struct nouveau_engine base; 28c39f472eSBen Skeggs }; 29c39f472eSBen Skeggs 30c39f472eSBen Skeggs #define nouveau_mpeg_create(p,e,c,d) \ 31c39f472eSBen Skeggs nouveau_engine_create((p), (e), (c), true, "PMPEG", "mpeg", (d)) 32c39f472eSBen Skeggs #define nouveau_mpeg_destroy(d) \ 33c39f472eSBen Skeggs nouveau_engine_destroy(&(d)->base) 34c39f472eSBen Skeggs #define nouveau_mpeg_init(d) \ 35c39f472eSBen Skeggs nouveau_engine_init(&(d)->base) 36c39f472eSBen Skeggs #define nouveau_mpeg_fini(d,s) \ 37c39f472eSBen Skeggs nouveau_engine_fini(&(d)->base, (s)) 38c39f472eSBen Skeggs 39c39f472eSBen Skeggs #define _nouveau_mpeg_dtor _nouveau_engine_dtor 40c39f472eSBen Skeggs #define _nouveau_mpeg_init _nouveau_engine_init 41c39f472eSBen Skeggs #define _nouveau_mpeg_fini _nouveau_engine_fini 42c39f472eSBen Skeggs 43c39f472eSBen Skeggs extern struct nouveau_oclass nv31_mpeg_oclass; 44c39f472eSBen Skeggs extern struct nouveau_oclass nv40_mpeg_oclass; 45c39f472eSBen Skeggs extern struct nouveau_oclass nv44_mpeg_oclass; 46c39f472eSBen Skeggs extern struct nouveau_oclass nv50_mpeg_oclass; 47c39f472eSBen Skeggs extern struct nouveau_oclass nv84_mpeg_oclass; 48c39f472eSBen Skeggs extern struct nouveau_ofuncs nv31_mpeg_ofuncs; 49c39f472eSBen Skeggs extern struct nouveau_oclass nv31_mpeg_cclass; 50c39f472eSBen Skeggs extern struct nouveau_oclass nv31_mpeg_sclass[]; 51c39f472eSBen Skeggs extern struct nouveau_oclass nv40_mpeg_sclass[]; 52c39f472eSBen Skeggs void nv31_mpeg_intr(struct nouveau_subdev *); 53c39f472eSBen Skeggs void nv31_mpeg_tile_prog(struct nouveau_engine *, int); 54c39f472eSBen Skeggs int nv31_mpeg_init(struct nouveau_object *); 55c39f472eSBen Skeggs 56c39f472eSBen Skeggs extern struct nouveau_ofuncs nv50_mpeg_ofuncs; 57c39f472eSBen Skeggs int nv50_mpeg_context_ctor(struct nouveau_object *, struct nouveau_object *, 58c39f472eSBen Skeggs struct nouveau_oclass *, void *, u32, 59c39f472eSBen Skeggs struct nouveau_object **); 60c39f472eSBen Skeggs void nv50_mpeg_intr(struct nouveau_subdev *); 61c39f472eSBen Skeggs int nv50_mpeg_init(struct nouveau_object *); 62c39f472eSBen Skeggs 63c39f472eSBen Skeggs #endif 64