1 #ifndef __NVKM_LTC_H__ 2 #define __NVKM_LTC_H__ 3 #include <core/subdev.h> 4 #include <core/mm.h> 5 6 #define NVKM_LTC_MAX_ZBC_CNT 16 7 8 struct nvkm_ltc { 9 const struct nvkm_ltc_func *func; 10 struct nvkm_subdev subdev; 11 12 u32 ltc_nr; 13 u32 lts_nr; 14 15 u32 num_tags; 16 u32 tag_base; 17 struct nvkm_mm tags; 18 struct nvkm_mm_node *tag_ram; 19 20 int zbc_min; 21 int zbc_max; 22 u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4]; 23 u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT]; 24 }; 25 26 int nvkm_ltc_tags_alloc(struct nvkm_ltc *, u32 count, struct nvkm_mm_node **); 27 void nvkm_ltc_tags_free(struct nvkm_ltc *, struct nvkm_mm_node **); 28 void nvkm_ltc_tags_clear(struct nvkm_ltc *, u32 first, u32 count); 29 30 int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]); 31 int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32); 32 33 int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 34 int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 35 int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 36 #endif 37