1 #ifndef __NVKM_LTC_PRIV_H__
2 #define __NVKM_LTC_PRIV_H__
3 #include <subdev/ltc.h>
16 struct nvkm_mm_node *tag_ram;
18 u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4];
19 u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT];
22 #define nvkm_ltc_create(p,e,o,d) \
23 nvkm_ltc_create_((p), (e), (o), sizeof(**d), (void **)d)
24 #define nvkm_ltc_destroy(p) ({ \
25 struct nvkm_ltc_priv *_priv = (p); \
26 _nvkm_ltc_dtor(nv_object(_priv)); \
28 #define nvkm_ltc_init(p) ({ \
29 struct nvkm_ltc_priv *_priv = (p); \
30 _nvkm_ltc_init(nv_object(_priv)); \
32 #define nvkm_ltc_fini(p,s) ({ \
33 struct nvkm_ltc_priv *_priv = (p); \
34 _nvkm_ltc_fini(nv_object(_priv), (s)); \
37 int nvkm_ltc_create_(struct nvkm_object *, struct nvkm_object *,
38 struct nvkm_oclass *, int, void **);
40 #define _nvkm_ltc_dtor _nvkm_subdev_dtor
41 int _nvkm_ltc_init(struct nvkm_object *);
42 #define _nvkm_ltc_fini _nvkm_subdev_fini
44 int gf100_ltc_ctor(struct nvkm_object *, struct nvkm_object *,
45 struct nvkm_oclass *, void *, u32,
46 struct nvkm_object **);
47 void gf100_ltc_dtor(struct nvkm_object *);
48 int gf100_ltc_init_tag_ram(struct nvkm_fb *, struct nvkm_ltc_priv *);
49 int gf100_ltc_tags_alloc(struct nvkm_ltc *, u32, struct nvkm_mm_node **);
50 void gf100_ltc_tags_free(struct nvkm_ltc *, struct nvkm_mm_node **);
52 struct nvkm_ltc_impl {
53 struct nvkm_oclass base;
54 void (*intr)(struct nvkm_subdev *);
56 void (*cbc_clear)(struct nvkm_ltc_priv *, u32 start, u32 limit);
57 void (*cbc_wait)(struct nvkm_ltc_priv *);
60 void (*zbc_clear_color)(struct nvkm_ltc_priv *, int, const u32[4]);
61 void (*zbc_clear_depth)(struct nvkm_ltc_priv *, int, const u32);
64 void gf100_ltc_intr(struct nvkm_subdev *);
65 void gf100_ltc_cbc_clear(struct nvkm_ltc_priv *, u32, u32);
66 void gf100_ltc_cbc_wait(struct nvkm_ltc_priv *);
67 void gf100_ltc_zbc_clear_color(struct nvkm_ltc_priv *, int, const u32[4]);
68 void gf100_ltc_zbc_clear_depth(struct nvkm_ltc_priv *, int, const u32);