1/* $NetBSD: ltc.h,v 1.3 2021/12/18 23:45:33 riastradh Exp $ */ 2 3/* SPDX-License-Identifier: MIT */ 4#ifndef __NVKM_LTC_H__ 5#define __NVKM_LTC_H__ 6#include <core/subdev.h> 7#include <core/mm.h> 8 9#define NVKM_LTC_MAX_ZBC_CNT 16 10 11struct nvkm_ltc { 12 const struct nvkm_ltc_func *func; 13 struct nvkm_subdev subdev; 14 15 u32 ltc_nr; 16 u32 lts_nr; 17 18 u32 num_tags; 19 u32 tag_base; 20 struct nvkm_memory *tag_ram; 21 22 int zbc_min; 23 int zbc_max; 24 u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4]; 25 u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT]; 26 u32 zbc_stencil[NVKM_LTC_MAX_ZBC_CNT]; 27}; 28 29void nvkm_ltc_tags_clear(struct nvkm_device *, u32 first, u32 count); 30 31int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]); 32int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32); 33int nvkm_ltc_zbc_stencil_get(struct nvkm_ltc *, int index, const u32); 34 35void nvkm_ltc_invalidate(struct nvkm_ltc *); 36void nvkm_ltc_flush(struct nvkm_ltc *); 37 38int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 39int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 40int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 41int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 42int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 43int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 44int gp102_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 45int gp10b_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); 46#endif 47