drm/nvc0-/gr: make register lists from initvals functions
[deliverable/linux.git] / drivers / gpu / drm / nouveau / core / include / engine / graph.h
CommitLineData
ebb945a9
BS
1#ifndef __NOUVEAU_GRAPH_H__
2#define __NOUVEAU_GRAPH_H__
3
4#include <core/engine.h>
5#include <core/engctx.h>
6#include <core/enum.h>
7
8struct nouveau_graph_chan {
9 struct nouveau_engctx base;
10};
11
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))
20
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
26
27struct nouveau_graph {
28 struct nouveau_engine base;
7e22e71e
CB
29
30 /* Returns chipset-specific counts of units packed into an u64.
31 */
32 u64 (*units)(struct nouveau_graph *);
ebb945a9
BS
33};
34
35static inline struct nouveau_graph *
36nouveau_graph(void *obj)
37{
38 return (void *)nv_device(obj)->subdev[NVDEV_ENGINE_GR];
39}
40
41#define nouveau_graph_create(p,e,c,y,d) \
42 nouveau_engine_create((p), (e), (c), (y), "PGRAPH", "graphics", (d))
43#define nouveau_graph_destroy(d) \
44 nouveau_engine_destroy(&(d)->base)
45#define nouveau_graph_init(d) \
46 nouveau_engine_init(&(d)->base)
47#define nouveau_graph_fini(d,s) \
48 nouveau_engine_fini(&(d)->base, (s))
49
50#define _nouveau_graph_dtor _nouveau_engine_dtor
51#define _nouveau_graph_init _nouveau_engine_init
52#define _nouveau_graph_fini _nouveau_engine_fini
53
54extern struct nouveau_oclass nv04_graph_oclass;
55extern struct nouveau_oclass nv10_graph_oclass;
56extern struct nouveau_oclass nv20_graph_oclass;
57extern struct nouveau_oclass nv25_graph_oclass;
58extern struct nouveau_oclass nv2a_graph_oclass;
59extern struct nouveau_oclass nv30_graph_oclass;
60extern struct nouveau_oclass nv34_graph_oclass;
61extern struct nouveau_oclass nv35_graph_oclass;
62extern struct nouveau_oclass nv40_graph_oclass;
63extern struct nouveau_oclass nv50_graph_oclass;
30f4e087
BS
64extern struct nouveau_oclass *nvc0_graph_oclass;
65extern struct nouveau_oclass *nvc1_graph_oclass;
66extern struct nouveau_oclass *nvc3_graph_oclass;
67extern struct nouveau_oclass *nvc8_graph_oclass;
68extern struct nouveau_oclass *nvd9_graph_oclass;
69extern struct nouveau_oclass *nve4_graph_oclass;
70extern struct nouveau_oclass *nvf0_graph_oclass;
ebb945a9 71
e6626254 72extern const struct nouveau_bitfield nv04_graph_nsource[];
ebb945a9
BS
73extern struct nouveau_ofuncs nv04_graph_ofuncs;
74bool nv04_graph_idle(void *obj);
75
e6626254
MS
76extern const struct nouveau_bitfield nv10_graph_intr_name[];
77extern const struct nouveau_bitfield nv10_graph_nstatus[];
ebb945a9 78
e6626254 79extern const struct nouveau_enum nv50_data_error_names[];
ebb945a9
BS
80
81#endif
This page took 0.094723 seconds and 5 git commands to generate.