1 #ifndef __NVKM_LTC_PRIV_H__
2 #define __NVKM_LTC_PRIV_H__
4 #include <subdev/ltc.h>
8 struct nouveau_ltc base;
14 struct nouveau_mm tags;
15 struct nouveau_mm_node *tag_ram;
17 u32 zbc_color[NOUVEAU_LTC_MAX_ZBC_CNT][4];
18 u32 zbc_depth[NOUVEAU_LTC_MAX_ZBC_CNT];
21 #define nvkm_ltc_create(p,e,o,d) \
22 nvkm_ltc_create_((p), (e), (o), sizeof(**d), (void **)d)
23 #define nvkm_ltc_destroy(p) ({ \
24 struct nvkm_ltc_priv *_priv = (p); \
25 _nvkm_ltc_dtor(nv_object(_priv)); \
27 #define nvkm_ltc_init(p) ({ \
28 struct nvkm_ltc_priv *_priv = (p); \
29 _nvkm_ltc_init(nv_object(_priv)); \
31 #define nvkm_ltc_fini(p,s) ({ \
32 struct nvkm_ltc_priv *_priv = (p); \
33 _nvkm_ltc_fini(nv_object(_priv), (s)); \
36 int nvkm_ltc_create_(struct nouveau_object *, struct nouveau_object *,
37 struct nouveau_oclass *, int, void **);
39 #define _nvkm_ltc_dtor _nouveau_subdev_dtor
40 int _nvkm_ltc_init(struct nouveau_object *);
41 #define _nvkm_ltc_fini _nouveau_subdev_fini
43 int gf100_ltc_ctor(struct nouveau_object *, struct nouveau_object *,
44 struct nouveau_oclass *, void *, u32,
45 struct nouveau_object **);
46 void gf100_ltc_dtor(struct nouveau_object *);
47 int gf100_ltc_init_tag_ram(struct nouveau_fb *, struct nvkm_ltc_priv *);
48 int gf100_ltc_tags_alloc(struct nouveau_ltc *, u32, struct nouveau_mm_node **);
49 void gf100_ltc_tags_free(struct nouveau_ltc *, struct nouveau_mm_node **);
51 struct nvkm_ltc_impl {
52 struct nouveau_oclass base;
53 void (*intr)(struct nouveau_subdev *);
55 void (*cbc_clear)(struct nvkm_ltc_priv *, u32 start, u32 limit);
56 void (*cbc_wait)(struct nvkm_ltc_priv *);
59 void (*zbc_clear_color)(struct nvkm_ltc_priv *, int, const u32[4]);
60 void (*zbc_clear_depth)(struct nvkm_ltc_priv *, int, const u32);
63 void gf100_ltc_intr(struct nouveau_subdev *);
64 void gf100_ltc_cbc_clear(struct nvkm_ltc_priv *, u32, u32);
65 void gf100_ltc_cbc_wait(struct nvkm_ltc_priv *);
66 void gf100_ltc_zbc_clear_color(struct nvkm_ltc_priv *, int, const u32[4]);
67 void gf100_ltc_zbc_clear_depth(struct nvkm_ltc_priv *, int, const u32);