1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_LTC_PRIV_H__
3 #define __NVKM_LTC_PRIV_H__
4 #define nvkm_ltc(p) container_of((p), struct nvkm_ltc, subdev)
5 #include <subdev/ltc.h>
6 #include <core/enum.h>
7 
8 int nvkm_ltc_new_(const struct nvkm_ltc_func *, struct nvkm_device *,
9 		  int index, struct nvkm_ltc **);
10 
11 struct nvkm_ltc_func {
12 	int  (*oneinit)(struct nvkm_ltc *);
13 	void (*init)(struct nvkm_ltc *);
14 	void (*intr)(struct nvkm_ltc *);
15 
16 	void (*cbc_clear)(struct nvkm_ltc *, u32 start, u32 limit);
17 	void (*cbc_wait)(struct nvkm_ltc *);
18 
19 	int zbc;
20 	void (*zbc_clear_color)(struct nvkm_ltc *, int, const u32[4]);
21 	void (*zbc_clear_depth)(struct nvkm_ltc *, int, const u32);
22 	void (*zbc_clear_stencil)(struct nvkm_ltc *, int, const u32);
23 
24 	void (*invalidate)(struct nvkm_ltc *);
25 	void (*flush)(struct nvkm_ltc *);
26 };
27 
28 int gf100_ltc_oneinit(struct nvkm_ltc *);
29 int gf100_ltc_oneinit_tag_ram(struct nvkm_ltc *);
30 void gf100_ltc_intr(struct nvkm_ltc *);
31 void gf100_ltc_cbc_clear(struct nvkm_ltc *, u32, u32);
32 void gf100_ltc_cbc_wait(struct nvkm_ltc *);
33 void gf100_ltc_zbc_clear_color(struct nvkm_ltc *, int, const u32[4]);
34 void gf100_ltc_zbc_clear_depth(struct nvkm_ltc *, int, const u32);
35 void gf100_ltc_invalidate(struct nvkm_ltc *);
36 void gf100_ltc_flush(struct nvkm_ltc *);
37 extern const struct nvkm_bitfield gf100_ltc_lts_intr_name[];
38 
39 void gm107_ltc_intr(struct nvkm_ltc *);
40 void gm107_ltc_intr_lts(struct nvkm_ltc *, int ltc, int lts);
41 void gm107_ltc_cbc_clear(struct nvkm_ltc *, u32, u32);
42 void gm107_ltc_cbc_wait(struct nvkm_ltc *);
43 void gm107_ltc_zbc_clear_color(struct nvkm_ltc *, int, const u32[4]);
44 void gm107_ltc_zbc_clear_depth(struct nvkm_ltc *, int, const u32);
45 
46 int gp100_ltc_oneinit(struct nvkm_ltc *);
47 void gp100_ltc_init(struct nvkm_ltc *);
48 void gp100_ltc_intr(struct nvkm_ltc *);
49 #endif
50