]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h
drm/nouveau/gr: rename from graph (no binary change)
[karo-tx-linux.git] / drivers / gpu / drm / nouveau / include / nvkm / engine / gr.h
1 #ifndef __NOUVEAU_GR_H__
2 #define __NOUVEAU_GR_H__
3
4 #include <core/engine.h>
5 #include <core/engctx.h>
6 #include <core/enum.h>
7
8 struct nouveau_gr_chan {
9         struct nouveau_engctx base;
10 };
11
12 #define nouveau_gr_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_gr_context_destroy(d)                                       \
15         nouveau_engctx_destroy(&(d)->base)
16 #define nouveau_gr_context_init(d)                                          \
17         nouveau_engctx_init(&(d)->base)
18 #define nouveau_gr_context_fini(d,s)                                        \
19         nouveau_engctx_fini(&(d)->base, (s))
20
21 #define _nouveau_gr_context_dtor _nouveau_engctx_dtor
22 #define _nouveau_gr_context_init _nouveau_engctx_init
23 #define _nouveau_gr_context_fini _nouveau_engctx_fini
24 #define _nouveau_gr_context_rd32 _nouveau_engctx_rd32
25 #define _nouveau_gr_context_wr32 _nouveau_engctx_wr32
26
27 struct nouveau_gr {
28         struct nouveau_engine base;
29
30         /* Returns chipset-specific counts of units packed into an u64.
31          */
32         u64 (*units)(struct nouveau_gr *);
33 };
34
35 static inline struct nouveau_gr *
36 nouveau_gr(void *obj)
37 {
38         return (void *)nouveau_engine(obj, NVDEV_ENGINE_GR);
39 }
40
41 #define nouveau_gr_create(p,e,c,y,d)                                        \
42         nouveau_engine_create((p), (e), (c), (y), "PGR", "graphics", (d))
43 #define nouveau_gr_destroy(d)                                               \
44         nouveau_engine_destroy(&(d)->base)
45 #define nouveau_gr_init(d)                                                  \
46         nouveau_engine_init(&(d)->base)
47 #define nouveau_gr_fini(d,s)                                                \
48         nouveau_engine_fini(&(d)->base, (s))
49
50 #define _nouveau_gr_dtor _nouveau_engine_dtor
51 #define _nouveau_gr_init _nouveau_engine_init
52 #define _nouveau_gr_fini _nouveau_engine_fini
53
54 extern struct nouveau_oclass nv04_gr_oclass;
55 extern struct nouveau_oclass nv10_gr_oclass;
56 extern struct nouveau_oclass nv20_gr_oclass;
57 extern struct nouveau_oclass nv25_gr_oclass;
58 extern struct nouveau_oclass nv2a_gr_oclass;
59 extern struct nouveau_oclass nv30_gr_oclass;
60 extern struct nouveau_oclass nv34_gr_oclass;
61 extern struct nouveau_oclass nv35_gr_oclass;
62 extern struct nouveau_oclass nv40_gr_oclass;
63 extern struct nouveau_oclass nv50_gr_oclass;
64 extern struct nouveau_oclass *nvc0_gr_oclass;
65 extern struct nouveau_oclass *nvc1_gr_oclass;
66 extern struct nouveau_oclass *nvc4_gr_oclass;
67 extern struct nouveau_oclass *nvc8_gr_oclass;
68 extern struct nouveau_oclass *nvd7_gr_oclass;
69 extern struct nouveau_oclass *nvd9_gr_oclass;
70 extern struct nouveau_oclass *nve4_gr_oclass;
71 extern struct nouveau_oclass *gk20a_gr_oclass;
72 extern struct nouveau_oclass *nvf0_gr_oclass;
73 extern struct nouveau_oclass *gk110b_gr_oclass;
74 extern struct nouveau_oclass *nv108_gr_oclass;
75 extern struct nouveau_oclass *gm107_gr_oclass;
76
77 extern const struct nouveau_bitfield nv04_gr_nsource[];
78 extern struct nouveau_ofuncs nv04_gr_ofuncs;
79 bool nv04_gr_idle(void *obj);
80
81 extern const struct nouveau_bitfield nv10_gr_intr_name[];
82 extern const struct nouveau_bitfield nv10_gr_nstatus[];
83
84 extern const struct nouveau_enum nv50_data_error_names[];
85
86 #endif