1 #ifndef __NOUVEAU_GRAPH_H__
2 #define __NOUVEAU_GRAPH_H__
4 #include <core/engine.h>
5 #include <core/engctx.h>
8 struct nouveau_graph_chan
{
9 struct nouveau_engctx base
;
12 #define nouveau_graph_context_create(p,e,c,g,s,a,f,d) \
13 nouveau_engctx_create((p), (e), (c), (g), (s), (a), (f), (d))
14 #define nouveau_graph_context_destroy(d) \
15 nouveau_engctx_destroy(&(d)->base)
16 #define nouveau_graph_context_init(d) \
17 nouveau_engctx_init(&(d)->base)
18 #define nouveau_graph_context_fini(d,s) \
19 nouveau_engctx_fini(&(d)->base, (s))
21 #define _nouveau_graph_context_dtor _nouveau_engctx_dtor
22 #define _nouveau_graph_context_init _nouveau_engctx_init
23 #define _nouveau_graph_context_fini _nouveau_engctx_fini
24 #define _nouveau_graph_context_rd32 _nouveau_engctx_rd32
25 #define _nouveau_graph_context_wr32 _nouveau_engctx_wr32
27 struct nouveau_graph
{
28 struct nouveau_engine base
;
31 static inline struct nouveau_graph
*
32 nouveau_graph(void *obj
)
34 return (void *)nv_device(obj
)->subdev
[NVDEV_ENGINE_GR
];
37 #define nouveau_graph_create(p,e,c,y,d) \
38 nouveau_engine_create((p), (e), (c), (y), "PGRAPH", "graphics", (d))
39 #define nouveau_graph_destroy(d) \
40 nouveau_engine_destroy(&(d)->base)
41 #define nouveau_graph_init(d) \
42 nouveau_engine_init(&(d)->base)
43 #define nouveau_graph_fini(d,s) \
44 nouveau_engine_fini(&(d)->base, (s))
46 #define _nouveau_graph_dtor _nouveau_engine_dtor
47 #define _nouveau_graph_init _nouveau_engine_init
48 #define _nouveau_graph_fini _nouveau_engine_fini
50 extern struct nouveau_oclass nv04_graph_oclass
;
51 extern struct nouveau_oclass nv10_graph_oclass
;
52 extern struct nouveau_oclass nv20_graph_oclass
;
53 extern struct nouveau_oclass nv25_graph_oclass
;
54 extern struct nouveau_oclass nv2a_graph_oclass
;
55 extern struct nouveau_oclass nv30_graph_oclass
;
56 extern struct nouveau_oclass nv34_graph_oclass
;
57 extern struct nouveau_oclass nv35_graph_oclass
;
58 extern struct nouveau_oclass nv40_graph_oclass
;
59 extern struct nouveau_oclass nv50_graph_oclass
;
60 extern struct nouveau_oclass nvc0_graph_oclass
;
61 extern struct nouveau_oclass nve0_graph_oclass
;
63 extern struct nouveau_bitfield nv04_graph_nsource
[];
64 extern struct nouveau_ofuncs nv04_graph_ofuncs
;
65 bool nv04_graph_idle(void *obj
);
67 extern struct nouveau_bitfield nv10_graph_intr_name
[];
68 extern struct nouveau_bitfield nv10_graph_nstatus
[];
70 extern struct nouveau_enum nv50_data_error_names
[];