ltc.h 1.2 KB
Newer Older
1 2
#ifndef __NVKM_LTC_H__
#define __NVKM_LTC_H__
3
#include <core/subdev.h>
4
#include <core/mm.h>
B
Ben Skeggs 已提交
5

6
#define NVKM_LTC_MAX_ZBC_CNT 16
7

8
struct nvkm_ltc {
9
	const struct nvkm_ltc_func *func;
B
Ben Skeggs 已提交
10
	struct nvkm_subdev subdev;
11

12 13 14 15 16 17 18
	u32 ltc_nr;
	u32 lts_nr;

	u32 num_tags;
	u32 tag_base;
	struct nvkm_mm tags;
	struct nvkm_mm_node *tag_ram;
B
Ben Skeggs 已提交
19 20 21

	int zbc_min;
	int zbc_max;
22 23
	u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4];
	u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT];
24 25
};

26 27 28 29 30 31
int nvkm_ltc_tags_alloc(struct nvkm_ltc *, u32 count, struct nvkm_mm_node **);
void nvkm_ltc_tags_free(struct nvkm_ltc *, struct nvkm_mm_node **);
void nvkm_ltc_tags_clear(struct nvkm_ltc *, u32 first, u32 count);

int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
32

33 34 35
void nvkm_ltc_invalidate(struct nvkm_ltc *);
void nvkm_ltc_flush(struct nvkm_ltc *);

36 37
int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
38
int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
39
int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
40
int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
41
#endif