1 | #ifndef __NOUVEAU_SOFTWARE_H__ |
2 | #define __NOUVEAU_SOFTWARE_H__ |
3 | |
4 | #include <core/engine.h> |
5 | #include <core/engctx.h> |
6 | |
7 | struct nouveau_software_chan { |
8 | struct nouveau_engctx base; |
9 | |
10 | int (*flip)(void *); |
11 | void *flip_data; |
12 | }; |
13 | |
14 | #define nouveau_software_context_create(p,e,c,d) \ |
15 | nouveau_engctx_create((p), (e), (c), (p), 0, 0, 0, (d)) |
16 | #define nouveau_software_context_destroy(d) \ |
17 | nouveau_engctx_destroy(&(d)->base) |
18 | #define nouveau_software_context_init(d) \ |
19 | nouveau_engctx_init(&(d)->base) |
20 | #define nouveau_software_context_fini(d,s) \ |
21 | nouveau_engctx_fini(&(d)->base, (s)) |
22 | |
23 | #define _nouveau_software_context_dtor _nouveau_engctx_dtor |
24 | #define _nouveau_software_context_init _nouveau_engctx_init |
25 | #define _nouveau_software_context_fini _nouveau_engctx_fini |
26 | |
27 | struct nouveau_software { |
28 | struct nouveau_engine base; |
29 | }; |
30 | |
31 | #define nouveau_software_create(p,e,c,d) \ |
32 | nouveau_engine_create((p), (e), (c), true, "SW", "software", (d)) |
33 | #define nouveau_software_destroy(d) \ |
34 | nouveau_engine_destroy(&(d)->base) |
35 | #define nouveau_software_init(d) \ |
36 | nouveau_engine_init(&(d)->base) |
37 | #define nouveau_software_fini(d,s) \ |
38 | nouveau_engine_fini(&(d)->base, (s)) |
39 | |
40 | #define _nouveau_software_dtor _nouveau_engine_dtor |
41 | #define _nouveau_software_init _nouveau_engine_init |
42 | #define _nouveau_software_fini _nouveau_engine_fini |
43 | |
44 | extern struct nouveau_oclass *nv04_software_oclass; |
45 | extern struct nouveau_oclass *nv10_software_oclass; |
46 | extern struct nouveau_oclass *nv50_software_oclass; |
47 | extern struct nouveau_oclass *nvc0_software_oclass; |
48 | |
49 | void nv04_software_intr(struct nouveau_subdev *); |
50 | |
51 | #endif |
52 | |