Lines Matching refs:ltc
31 struct nvkm_ltc *ltc = device->ltc; in nvkm_ltc_tags_clear() local
34 BUG_ON((first > limit) || (limit >= ltc->num_tags)); in nvkm_ltc_tags_clear()
36 mutex_lock(<c->mutex); in nvkm_ltc_tags_clear()
37 ltc->func->cbc_clear(ltc, first, limit); in nvkm_ltc_tags_clear()
38 ltc->func->cbc_wait(ltc); in nvkm_ltc_tags_clear()
39 mutex_unlock(<c->mutex); in nvkm_ltc_tags_clear()
43 nvkm_ltc_zbc_color_get(struct nvkm_ltc *ltc, int index, const u32 color[4]) in nvkm_ltc_zbc_color_get() argument
45 memcpy(ltc->zbc_color[index], color, sizeof(ltc->zbc_color[index])); in nvkm_ltc_zbc_color_get()
46 ltc->func->zbc_clear_color(ltc, index, color); in nvkm_ltc_zbc_color_get()
51 nvkm_ltc_zbc_depth_get(struct nvkm_ltc *ltc, int index, const u32 depth) in nvkm_ltc_zbc_depth_get() argument
53 ltc->zbc_depth[index] = depth; in nvkm_ltc_zbc_depth_get()
54 ltc->func->zbc_clear_depth(ltc, index, depth); in nvkm_ltc_zbc_depth_get()
59 nvkm_ltc_zbc_stencil_get(struct nvkm_ltc *ltc, int index, const u32 stencil) in nvkm_ltc_zbc_stencil_get() argument
61 ltc->zbc_stencil[index] = stencil; in nvkm_ltc_zbc_stencil_get()
62 ltc->func->zbc_clear_stencil(ltc, index, stencil); in nvkm_ltc_zbc_stencil_get()
67 nvkm_ltc_invalidate(struct nvkm_ltc *ltc) in nvkm_ltc_invalidate() argument
69 if (ltc->func->invalidate) in nvkm_ltc_invalidate()
70 ltc->func->invalidate(ltc); in nvkm_ltc_invalidate()
74 nvkm_ltc_flush(struct nvkm_ltc *ltc) in nvkm_ltc_flush() argument
76 if (ltc->func->flush) in nvkm_ltc_flush()
77 ltc->func->flush(ltc); in nvkm_ltc_flush()
83 struct nvkm_ltc *ltc = nvkm_ltc(subdev); in nvkm_ltc_intr() local
84 ltc->func->intr(ltc); in nvkm_ltc_intr()
90 struct nvkm_ltc *ltc = nvkm_ltc(subdev); in nvkm_ltc_oneinit() local
91 return ltc->func->oneinit(ltc); in nvkm_ltc_oneinit()
97 struct nvkm_ltc *ltc = nvkm_ltc(subdev); in nvkm_ltc_init() local
100 for (i = ltc->zbc_color_min; i <= ltc->zbc_color_max; i++) in nvkm_ltc_init()
101 ltc->func->zbc_clear_color(ltc, i, ltc->zbc_color[i]); in nvkm_ltc_init()
103 for (i = ltc->zbc_depth_min; i <= ltc->zbc_depth_max; i++) { in nvkm_ltc_init()
104 ltc->func->zbc_clear_depth(ltc, i, ltc->zbc_depth[i]); in nvkm_ltc_init()
105 if (ltc->func->zbc_clear_stencil) in nvkm_ltc_init()
106 ltc->func->zbc_clear_stencil(ltc, i, ltc->zbc_stencil[i]); in nvkm_ltc_init()
109 ltc->func->init(ltc); in nvkm_ltc_init()
116 struct nvkm_ltc *ltc = nvkm_ltc(subdev); in nvkm_ltc_dtor() local
117 nvkm_memory_unref(<c->tag_ram); in nvkm_ltc_dtor()
118 mutex_destroy(<c->mutex); in nvkm_ltc_dtor()
119 return ltc; in nvkm_ltc_dtor()
134 struct nvkm_ltc *ltc; in nvkm_ltc_new_() local
136 if (!(ltc = *pltc = kzalloc(sizeof(*ltc), GFP_KERNEL))) in nvkm_ltc_new_()
139 nvkm_subdev_ctor(&nvkm_ltc, device, type, inst, <c->subdev); in nvkm_ltc_new_()
140 ltc->func = func; in nvkm_ltc_new_()
141 mutex_init(<c->mutex); in nvkm_ltc_new_()
142 ltc->zbc_color_min = 1; /* reserve 0 for disabled */ in nvkm_ltc_new_()
143 ltc->zbc_color_max = min(func->zbc_color, NVKM_LTC_MAX_ZBC_COLOR_CNT) - 1; in nvkm_ltc_new_()
144 ltc->zbc_depth_min = 1; /* reserve 0 for disabled */ in nvkm_ltc_new_()
145 ltc->zbc_depth_max = min(func->zbc_depth, NVKM_LTC_MAX_ZBC_DEPTH_CNT) - 1; in nvkm_ltc_new_()