tizen 2.4 release
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / drivers / gpu / drm / nouveau / core / include / subdev / ltcg.h
1 #ifndef __NOUVEAU_LTCG_H__
2 #define __NOUVEAU_LTCG_H__
3
4 #include <core/subdev.h>
5 #include <core/device.h>
6
7 struct nouveau_mm_node;
8
9 struct nouveau_ltcg {
10         struct nouveau_subdev base;
11
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);
16 };
17
18 static inline struct nouveau_ltcg *
19 nouveau_ltcg(void *obj)
20 {
21         return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_LTCG];
22 }
23
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))
33
34 #define _nouveau_ltcg_dtor _nouveau_subdev_dtor
35 #define _nouveau_ltcg_init _nouveau_subdev_init
36 #define _nouveau_ltcg_fini _nouveau_subdev_fini
37
38 extern struct nouveau_oclass nvc0_ltcg_oclass;
39
40 #endif