]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2799bba6 BS |
2 | #ifndef __NVKM_LTC_H__ |
3 | #define __NVKM_LTC_H__ | |
95484b57 | 4 | #include <core/subdev.h> |
70bc7182 | 5 | #include <core/mm.h> |
f38fdb6a | 6 | |
2799bba6 | 7 | #define NVKM_LTC_MAX_ZBC_CNT 16 |
95484b57 | 8 | |
2799bba6 | 9 | struct nvkm_ltc { |
70bc7182 | 10 | const struct nvkm_ltc_func *func; |
c7750cfb | 11 | struct nvkm_subdev subdev; |
95484b57 | 12 | |
70bc7182 BS |
13 | u32 ltc_nr; |
14 | u32 lts_nr; | |
15 | ||
16 | u32 num_tags; | |
17 | u32 tag_base; | |
18 | struct nvkm_mm tags; | |
19 | struct nvkm_mm_node *tag_ram; | |
f38fdb6a BS |
20 | |
21 | int zbc_min; | |
22 | int zbc_max; | |
70bc7182 BS |
23 | u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4]; |
24 | u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT]; | |
95484b57 BS |
25 | }; |
26 | ||
70bc7182 BS |
27 | int nvkm_ltc_tags_alloc(struct nvkm_ltc *, u32 count, struct nvkm_mm_node **); |
28 | void nvkm_ltc_tags_free(struct nvkm_ltc *, struct nvkm_mm_node **); | |
29 | void nvkm_ltc_tags_clear(struct nvkm_ltc *, 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); | |
95484b57 | 33 | |
38a8fc78 AC |
34 | void nvkm_ltc_invalidate(struct nvkm_ltc *); |
35 | void nvkm_ltc_flush(struct nvkm_ltc *); | |
36 | ||
70bc7182 BS |
37 | int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); |
38 | int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); | |
a0a49bac | 39 | int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); |
70bc7182 | 40 | int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); |
db1eb528 | 41 | int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); |
a96def39 | 42 | int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **); |
95484b57 | 43 | #endif |