Home | History | Annotate | Line # | Download | only in subdev
      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 
     11 struct 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 
     29 void nvkm_ltc_tags_clear(struct nvkm_device *, u32 first, u32 count);
     30 
     31 int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
     32 int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
     33 int nvkm_ltc_zbc_stencil_get(struct nvkm_ltc *, int index, const u32);
     34 
     35 void nvkm_ltc_invalidate(struct nvkm_ltc *);
     36 void nvkm_ltc_flush(struct nvkm_ltc *);
     37 
     38 int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     39 int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     40 int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     41 int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     42 int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     43 int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     44 int gp102_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     45 int gp10b_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
     46 #endif
     47