0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "priv.h"
0025
0026 void
0027 gp100_ltc_intr(struct nvkm_ltc *ltc)
0028 {
0029 struct nvkm_device *device = ltc->subdev.device;
0030 u32 mask;
0031
0032 mask = nvkm_rd32(device, 0x0001c0);
0033 while (mask) {
0034 u32 s, c = __ffs(mask);
0035 for (s = 0; s < ltc->lts_nr; s++)
0036 gm107_ltc_intr_lts(ltc, c, s);
0037 mask &= ~(1 << c);
0038 }
0039 }
0040
0041 int
0042 gp100_ltc_oneinit(struct nvkm_ltc *ltc)
0043 {
0044 struct nvkm_device *device = ltc->subdev.device;
0045 ltc->ltc_nr = nvkm_rd32(device, 0x12006c);
0046 ltc->lts_nr = nvkm_rd32(device, 0x17e280) >> 28;
0047
0048 return 0;
0049 }
0050
0051 void
0052 gp100_ltc_init(struct nvkm_ltc *ltc)
0053 {
0054
0055 }
0056
0057 static const struct nvkm_ltc_func
0058 gp100_ltc = {
0059 .oneinit = gp100_ltc_oneinit,
0060 .init = gp100_ltc_init,
0061 .intr = gp100_ltc_intr,
0062 .cbc_clear = gm107_ltc_cbc_clear,
0063 .cbc_wait = gm107_ltc_cbc_wait,
0064 .zbc = 16,
0065 .zbc_clear_color = gm107_ltc_zbc_clear_color,
0066 .zbc_clear_depth = gm107_ltc_zbc_clear_depth,
0067 .invalidate = gf100_ltc_invalidate,
0068 .flush = gf100_ltc_flush,
0069 };
0070
0071 int
0072 gp100_ltc_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
0073 struct nvkm_ltc **pltc)
0074 {
0075 return nvkm_ltc_new_(&gp100_ltc, device, type, inst, pltc);
0076 }