1 #ifndef __NOUVEAU_LTCG_H__
2 #define __NOUVEAU_LTCG_H__
4 #include <core/subdev.h>
5 #include <core/device.h>
7 struct nouveau_mm_node;
10 struct nouveau_subdev base;
12 int (*tags_alloc)(struct nouveau_ltcg *, u32 count,
13 struct nouveau_mm_node **);
14 void (*tags_free)(struct nouveau_ltcg *, struct nouveau_mm_node **);
15 void (*tags_clear)(struct nouveau_ltcg *, u32 first, u32 count);
18 static inline struct nouveau_ltcg *
19 nouveau_ltcg(void *obj)
21 return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_LTCG];
24 #define nouveau_ltcg_create(p,e,o,d) \
25 nouveau_subdev_create_((p), (e), (o), 0, "PLTCG", "level2", \
26 sizeof(**d), (void **)d)
27 #define nouveau_ltcg_destroy(p) \
28 nouveau_subdev_destroy(&(p)->base)
29 #define nouveau_ltcg_init(p) \
30 nouveau_subdev_init(&(p)->base)
31 #define nouveau_ltcg_fini(p,s) \
32 nouveau_subdev_fini(&(p)->base, (s))
34 #define _nouveau_ltcg_dtor _nouveau_subdev_dtor
35 #define _nouveau_ltcg_init _nouveau_subdev_init
36 #define _nouveau_ltcg_fini _nouveau_subdev_fini
38 extern struct nouveau_oclass *gf100_ltcg_oclass;
39 extern struct nouveau_oclass *gm107_ltcg_oclass;