ltc.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __NVKM_LTC_H__
  3. #define __NVKM_LTC_H__
  4. #include <core/subdev.h>
  5. #include <core/mm.h>
  6. #define NVKM_LTC_MAX_ZBC_CNT 16
  7. struct nvkm_ltc {
  8. const struct nvkm_ltc_func *func;
  9. struct nvkm_subdev subdev;
  10. u32 ltc_nr;
  11. u32 lts_nr;
  12. u32 num_tags;
  13. u32 tag_base;
  14. struct nvkm_memory *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. void nvkm_ltc_tags_clear(struct nvkm_device *, u32 first, u32 count);
  21. int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
  22. int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
  23. void nvkm_ltc_invalidate(struct nvkm_ltc *);
  24. void nvkm_ltc_flush(struct nvkm_ltc *);
  25. int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
  26. int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
  27. int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
  28. int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
  29. int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
  30. int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
  31. #endif