1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#include "priv.h"
25
26static void
27gp100_ltc_intr(struct nvkm_ltc *ltc)
28{
29 struct nvkm_device *device = ltc->subdev.device;
30 u32 mask;
31
32 mask = nvkm_rd32(device, 0x0001c0);
33 while (mask) {
34 u32 s, c = __ffs(mask);
35 for (s = 0; s < ltc->lts_nr; s++)
36 gm107_ltc_intr_lts(ltc, c, s);
37 mask &= ~(1 << c);
38 }
39}
40
41static int
42gp100_ltc_oneinit(struct nvkm_ltc *ltc)
43{
44 struct nvkm_device *device = ltc->subdev.device;
45 ltc->ltc_nr = nvkm_rd32(device, 0x12006c);
46 ltc->lts_nr = nvkm_rd32(device, 0x17e280) >> 28;
47
48 return nvkm_mm_init(<c->tags, 0, 0, 1);
49}
50
51static void
52gp100_ltc_init(struct nvkm_ltc *ltc)
53{
54
55}
56
57static const struct nvkm_ltc_func
58gp100_ltc = {
59 .oneinit = gp100_ltc_oneinit,
60 .init = gp100_ltc_init,
61 .intr = gp100_ltc_intr,
62 .cbc_clear = gm107_ltc_cbc_clear,
63 .cbc_wait = gm107_ltc_cbc_wait,
64 .zbc = 16,
65 .zbc_clear_color = gm107_ltc_zbc_clear_color,
66 .zbc_clear_depth = gm107_ltc_zbc_clear_depth,
67 .invalidate = gf100_ltc_invalidate,
68 .flush = gf100_ltc_flush,
69};
70
71int
72gp100_ltc_new(struct nvkm_device *device, int index, struct nvkm_ltc **pltc)
73{
74 return nvkm_ltc_new_(&gp100_ltc, device, index, pltc);
75}
76