ltc.h 1.2 KB

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