1 #ifndef __NVKM_LTC_PRIV_H__
2 #define __NVKM_LTC_PRIV_H__
4 #include <subdev/ltc.h>
10 struct nouveau_ltc base;
16 struct nouveau_mm tags;
17 struct nouveau_mm_node *tag_ram;
19 u32 zbc_color[NOUVEAU_LTC_MAX_ZBC_CNT][4];
20 u32 zbc_depth[NOUVEAU_LTC_MAX_ZBC_CNT];
23 #define nvkm_ltc_create(p,e,o,d) \
24 nvkm_ltc_create_((p), (e), (o), sizeof(**d), (void **)d)
25 #define nvkm_ltc_destroy(p) ({ \
26 struct nvkm_ltc_priv *_priv = (p); \
27 _nvkm_ltc_dtor(nv_object(_priv)); \
29 #define nvkm_ltc_init(p) ({ \
30 struct nvkm_ltc_priv *_priv = (p); \
31 _nvkm_ltc_init(nv_object(_priv)); \
33 #define nvkm_ltc_fini(p,s) ({ \
34 struct nvkm_ltc_priv *_priv = (p); \
35 _nvkm_ltc_fini(nv_object(_priv), (s)); \
38 int nvkm_ltc_create_(struct nouveau_object *, struct nouveau_object *,
39 struct nouveau_oclass *, int, void **);
41 #define _nvkm_ltc_dtor _nouveau_subdev_dtor
42 int _nvkm_ltc_init(struct nouveau_object *);
43 #define _nvkm_ltc_fini _nouveau_subdev_fini
45 int gf100_ltc_ctor(struct nouveau_object *, struct nouveau_object *,
46 struct nouveau_oclass *, void *, u32,
47 struct nouveau_object **);
48 void gf100_ltc_dtor(struct nouveau_object *);
49 int gf100_ltc_init_tag_ram(struct nouveau_fb *, struct nvkm_ltc_priv *);
50 int gf100_ltc_tags_alloc(struct nouveau_ltc *, u32, struct nouveau_mm_node **);
51 void gf100_ltc_tags_free(struct nouveau_ltc *, struct nouveau_mm_node **);
53 struct nvkm_ltc_impl {
54 struct nouveau_oclass base;
55 void (*intr)(struct nouveau_subdev *);
57 void (*cbc_clear)(struct nvkm_ltc_priv *, u32 start, u32 limit);
58 void (*cbc_wait)(struct nvkm_ltc_priv *);
61 void (*zbc_clear_color)(struct nvkm_ltc_priv *, int, const u32[4]);
62 void (*zbc_clear_depth)(struct nvkm_ltc_priv *, int, const u32);
65 void gf100_ltc_intr(struct nouveau_subdev *);
66 void gf100_ltc_cbc_clear(struct nvkm_ltc_priv *, u32, u32);
67 void gf100_ltc_cbc_wait(struct nvkm_ltc_priv *);
68 void gf100_ltc_zbc_clear_color(struct nvkm_ltc_priv *, int, const u32[4]);
69 void gf100_ltc_zbc_clear_depth(struct nvkm_ltc_priv *, int, const u32);