Lines Matching full:head
18 #include "head.h"
72 nv50_crc_program_ctx(struct nv50_head *head, in nv50_crc_program_ctx() argument
75 struct nv50_disp *disp = nv50_disp(head->base.base.dev); in nv50_crc_program_ctx()
79 core->func->crc->set_ctx(head, ctx); in nv50_crc_program_ctx()
87 struct nv50_head *head = container_of(crc, struct nv50_head, crc); in nv50_crc_ctx_flip_work() local
88 struct drm_crtc *crtc = &head->base.base; in nv50_crc_ctx_flip_work()
108 nv50_crc_program_ctx(head, NULL); in nv50_crc_ctx_flip_work()
109 nv50_crc_program_ctx(head, &crc->ctx[new_idx]); in nv50_crc_ctx_flip_work()
129 nv50_crc_get_entries(struct nv50_head *head, in nv50_crc_get_entries() argument
133 struct drm_crtc *crtc = &head->base.base; in nv50_crc_get_entries()
134 struct nv50_crc *crc = &head->crc; in nv50_crc_get_entries()
143 output_crc = func->get_entry(head, &crc->ctx[crc->ctx_idx], in nv50_crc_get_entries()
154 void nv50_crc_handle_vblank(struct nv50_head *head) in nv50_crc_handle_vblank() argument
156 struct drm_crtc *crtc = &head->base.base; in nv50_crc_handle_vblank()
157 struct nv50_crc *crc = &head->crc; in nv50_crc_handle_vblank()
159 nv50_disp(head->base.base.dev)->core->func->crc; in nv50_crc_handle_vblank()
178 if (crc->ctx_changed && func->ctx_finished(head, ctx)) { in nv50_crc_handle_vblank()
179 nv50_crc_get_entries(head, func, crc->src); in nv50_crc_handle_vblank()
198 drm_dbg_kms(head->base.base.dev, in nv50_crc_handle_vblank()
199 "Notifier ctx flip for head-%d finished, lost CRC for frame %llu\n", in nv50_crc_handle_vblank()
200 head->base.index, crc->frame); in nv50_crc_handle_vblank()
207 nv50_crc_get_entries(head, func, crc->src); in nv50_crc_handle_vblank()
220 static void nv50_crc_wait_ctx_finished(struct nv50_head *head, in nv50_crc_wait_ctx_finished() argument
224 struct drm_device *dev = head->base.base.dev; in nv50_crc_wait_ctx_finished()
229 if (func->ctx_finished(head, ctx)) break;); in nv50_crc_wait_ctx_finished()
232 "CRC notifier ctx for head %d not finished after 50ms\n", in nv50_crc_wait_ctx_finished()
233 head->base.index); in nv50_crc_wait_ctx_finished()
236 "CRC notifier ctx for head-%d finished after %lldns\n", in nv50_crc_wait_ctx_finished()
237 head->base.index, ret); in nv50_crc_wait_ctx_finished()
247 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_stop_reporting() local
249 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_stop_reporting()
262 "CRC reporting on vblank for head-%d disabled\n", in nv50_crc_atomic_stop_reporting()
263 head->base.index); in nv50_crc_atomic_stop_reporting()
279 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_init_notifier_contexts() local
281 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_init_notifier_contexts()
303 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_release_notifier_contexts() local
305 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_release_notifier_contexts()
312 nv50_crc_wait_ctx_finished(head, func, ctx); in nv50_crc_atomic_release_notifier_contexts()
315 nv50_crc_wait_ctx_finished(head, func, ctx); in nv50_crc_atomic_release_notifier_contexts()
326 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_start_reporting() local
328 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_start_reporting()
346 "CRC reporting on vblank for head-%d enabled\n", in nv50_crc_atomic_start_reporting()
347 head->base.index); in nv50_crc_atomic_start_reporting()
351 int nv50_crc_atomic_check_head(struct nv50_head *head, in nv50_crc_atomic_check_head() argument
415 list_for_each_entry(outp_atom, &atom->outp, head) { in nv50_crc_atomic_check_outp()
450 void nv50_crc_atomic_set(struct nv50_head *head, in nv50_crc_atomic_set() argument
453 struct drm_crtc *crtc = &head->base.base; in nv50_crc_atomic_set()
455 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_set()
468 func->set_src(head, outp->outp.or.id, nv50_crc_source_type(outp, asyh->crc.src), in nv50_crc_atomic_set()
472 void nv50_crc_atomic_clr(struct nv50_head *head) in nv50_crc_atomic_clr() argument
475 nv50_disp(head->base.base.dev)->core->func->crc; in nv50_crc_atomic_clr()
477 func->set_src(head, 0, NV50_CRC_SOURCE_TYPE_NONE, NULL); in nv50_crc_atomic_clr()
502 nv50_crc_ctx_init(struct nv50_head *head, struct nvif_mmu *mmu, in nv50_crc_ctx_init() argument
505 struct nv50_core *core = nv50_disp(head->base.base.dev)->core; in nv50_crc_ctx_init()
513 NV50_DISP_HANDLE_CRC_CTX(head, idx), in nv50_crc_ctx_init()
545 struct nv50_head *head = nv50_head(crtc); in nv50_crc_set_source() local
546 struct nv50_crc *crc = &head->crc; in nv50_crc_set_source()
574 for (i = 0; i < ARRAY_SIZE(head->crc.ctx); i++) { in nv50_crc_set_source()
575 ret = nv50_crc_ctx_init(head, mmu, &crc->ctx[i], in nv50_crc_set_source()
583 crtc_state = drm_atomic_get_crtc_state(state, &head->base.base); in nv50_crc_set_source()
630 struct nv50_head *head = m->private; in nv50_crc_debugfs_flip_threshold_get() local
631 struct drm_crtc *crtc = &head->base.base; in nv50_crc_debugfs_flip_threshold_get()
632 struct nv50_crc *crc = &head->crc; in nv50_crc_debugfs_flip_threshold_get()
658 struct nv50_head *head = m->private; in nv50_crc_debugfs_flip_threshold_set() local
660 struct drm_crtc *crtc = &head->base.base; in nv50_crc_debugfs_flip_threshold_set()
662 struct nv50_crc *crc = &head->crc; in nv50_crc_debugfs_flip_threshold_set()
689 "Changing CRC flip threshold for next capture on head-%d to %d\n", in nv50_crc_debugfs_flip_threshold_set()
690 head->base.index, value); in nv50_crc_debugfs_flip_threshold_set()
707 int nv50_head_crc_late_register(struct nv50_head *head) in nv50_head_crc_late_register() argument
709 struct drm_crtc *crtc = &head->base.base; in nv50_head_crc_late_register()
718 debugfs_create_file("flip_threshold", 0644, root, head, in nv50_head_crc_late_register()
726 struct nv50_head *head) in nv50_crc_init_head() argument
728 struct nv50_crc *crc = &head->crc; in nv50_crc_init_head()
732 drm_vblank_work_init(&crc->flip_work, &head->base.base, in nv50_crc_init_head()