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