Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 #ifndef __NVKM_LTC_H__
0003 #define __NVKM_LTC_H__
0004 #include <core/subdev.h>
0005 #include <core/mm.h>
0006 
0007 #define NVKM_LTC_MAX_ZBC_CNT 16
0008 
0009 struct nvkm_ltc {
0010     const struct nvkm_ltc_func *func;
0011     struct nvkm_subdev subdev;
0012 
0013     u32 ltc_nr;
0014     u32 lts_nr;
0015 
0016     struct mutex mutex; /* serialises CBC operations */
0017     u32 num_tags;
0018     u32 tag_base;
0019     struct nvkm_memory *tag_ram;
0020 
0021     int zbc_min;
0022     int zbc_max;
0023     u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4];
0024     u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT];
0025     u32 zbc_stencil[NVKM_LTC_MAX_ZBC_CNT];
0026 };
0027 
0028 void nvkm_ltc_tags_clear(struct nvkm_device *, u32 first, u32 count);
0029 
0030 int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
0031 int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
0032 int nvkm_ltc_zbc_stencil_get(struct nvkm_ltc *, int index, const u32);
0033 
0034 void nvkm_ltc_invalidate(struct nvkm_ltc *);
0035 void nvkm_ltc_flush(struct nvkm_ltc *);
0036 
0037 int gf100_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
0038 int gk104_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
0039 int gm107_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
0040 int gm200_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
0041 int gp100_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
0042 int gp102_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
0043 int gp10b_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
0044 #endif