Lines Matching full:head

16 #include "head.h"
70 nv50_crc_program_ctx(struct nv50_head *head, in nv50_crc_program_ctx() argument
73 struct nv50_disp *disp = nv50_disp(head->base.base.dev); in nv50_crc_program_ctx()
77 core->func->crc->set_ctx(head, ctx); in nv50_crc_program_ctx()
85 struct nv50_head *head = container_of(crc, struct nv50_head, crc); in nv50_crc_ctx_flip_work() local
86 struct drm_crtc *crtc = &head->base.base; in nv50_crc_ctx_flip_work()
106 nv50_crc_program_ctx(head, NULL); in nv50_crc_ctx_flip_work()
107 nv50_crc_program_ctx(head, &crc->ctx[new_idx]); in nv50_crc_ctx_flip_work()
127 nv50_crc_get_entries(struct nv50_head *head, in nv50_crc_get_entries() argument
131 struct drm_crtc *crtc = &head->base.base; in nv50_crc_get_entries()
132 struct nv50_crc *crc = &head->crc; in nv50_crc_get_entries()
141 output_crc = func->get_entry(head, &crc->ctx[crc->ctx_idx], in nv50_crc_get_entries()
152 void nv50_crc_handle_vblank(struct nv50_head *head) in nv50_crc_handle_vblank() argument
154 struct drm_crtc *crtc = &head->base.base; in nv50_crc_handle_vblank()
155 struct nv50_crc *crc = &head->crc; in nv50_crc_handle_vblank()
157 nv50_disp(head->base.base.dev)->core->func->crc; in nv50_crc_handle_vblank()
176 if (crc->ctx_changed && func->ctx_finished(head, ctx)) { in nv50_crc_handle_vblank()
177 nv50_crc_get_entries(head, func, crc->src); in nv50_crc_handle_vblank()
196 drm_dbg_kms(head->base.base.dev, in nv50_crc_handle_vblank()
197 "Notifier ctx flip for head-%d finished, lost CRC for frame %llu\n", in nv50_crc_handle_vblank()
198 head->base.index, crc->frame); in nv50_crc_handle_vblank()
205 nv50_crc_get_entries(head, func, crc->src); in nv50_crc_handle_vblank()
218 static void nv50_crc_wait_ctx_finished(struct nv50_head *head, in nv50_crc_wait_ctx_finished() argument
222 struct drm_device *dev = head->base.base.dev; in nv50_crc_wait_ctx_finished()
227 if (func->ctx_finished(head, ctx)) break;); in nv50_crc_wait_ctx_finished()
230 "CRC notifier ctx for head %d not finished after 50ms\n", in nv50_crc_wait_ctx_finished()
231 head->base.index); in nv50_crc_wait_ctx_finished()
234 "CRC notifier ctx for head-%d finished after %lldns\n", in nv50_crc_wait_ctx_finished()
235 head->base.index, ret); in nv50_crc_wait_ctx_finished()
245 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_stop_reporting() local
247 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_stop_reporting()
260 "CRC reporting on vblank for head-%d disabled\n", in nv50_crc_atomic_stop_reporting()
261 head->base.index); in nv50_crc_atomic_stop_reporting()
277 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_init_notifier_contexts() local
279 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_init_notifier_contexts()
301 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_release_notifier_contexts() local
303 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_release_notifier_contexts()
310 nv50_crc_wait_ctx_finished(head, func, ctx); in nv50_crc_atomic_release_notifier_contexts()
313 nv50_crc_wait_ctx_finished(head, func, ctx); in nv50_crc_atomic_release_notifier_contexts()
324 struct nv50_head *head = nv50_head(crtc); in nv50_crc_atomic_start_reporting() local
326 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_start_reporting()
344 "CRC reporting on vblank for head-%d enabled\n", in nv50_crc_atomic_start_reporting()
345 head->base.index); in nv50_crc_atomic_start_reporting()
349 int nv50_crc_atomic_check_head(struct nv50_head *head, in nv50_crc_atomic_check_head() argument
413 list_for_each_entry(outp_atom, &atom->outp, head) { in nv50_crc_atomic_check_outp()
448 void nv50_crc_atomic_set(struct nv50_head *head, in nv50_crc_atomic_set() argument
451 struct drm_crtc *crtc = &head->base.base; in nv50_crc_atomic_set()
453 struct nv50_crc *crc = &head->crc; in nv50_crc_atomic_set()
466 func->set_src(head, outp->outp.or.id, nv50_crc_source_type(outp, asyh->crc.src), in nv50_crc_atomic_set()
470 void nv50_crc_atomic_clr(struct nv50_head *head) in nv50_crc_atomic_clr() argument
473 nv50_disp(head->base.base.dev)->core->func->crc; in nv50_crc_atomic_clr()
475 func->set_src(head, 0, NV50_CRC_SOURCE_TYPE_NONE, NULL); in nv50_crc_atomic_clr()
500 nv50_crc_ctx_init(struct nv50_head *head, struct nvif_mmu *mmu, in nv50_crc_ctx_init() argument
503 struct nv50_core *core = nv50_disp(head->base.base.dev)->core; in nv50_crc_ctx_init()
511 NV50_DISP_HANDLE_CRC_CTX(head, idx), in nv50_crc_ctx_init()
543 struct nv50_head *head = nv50_head(crtc); in nv50_crc_set_source() local
544 struct nv50_crc *crc = &head->crc; in nv50_crc_set_source()
572 for (i = 0; i < ARRAY_SIZE(head->crc.ctx); i++) { in nv50_crc_set_source()
573 ret = nv50_crc_ctx_init(head, mmu, &crc->ctx[i], in nv50_crc_set_source()
581 crtc_state = drm_atomic_get_crtc_state(state, &head->base.base); in nv50_crc_set_source()
628 struct nv50_head *head = m->private; in nv50_crc_debugfs_flip_threshold_get() local
629 struct drm_crtc *crtc = &head->base.base; in nv50_crc_debugfs_flip_threshold_get()
630 struct nv50_crc *crc = &head->crc; in nv50_crc_debugfs_flip_threshold_get()
656 struct nv50_head *head = m->private; in nv50_crc_debugfs_flip_threshold_set() local
658 struct drm_crtc *crtc = &head->base.base; in nv50_crc_debugfs_flip_threshold_set()
660 struct nv50_crc *crc = &head->crc; in nv50_crc_debugfs_flip_threshold_set()
687 "Changing CRC flip threshold for next capture on head-%d to %d\n", in nv50_crc_debugfs_flip_threshold_set()
688 head->base.index, value); in nv50_crc_debugfs_flip_threshold_set()
705 int nv50_head_crc_late_register(struct nv50_head *head) in nv50_head_crc_late_register() argument
707 struct drm_crtc *crtc = &head->base.base; in nv50_head_crc_late_register()
716 debugfs_create_file("flip_threshold", 0644, root, head, in nv50_head_crc_late_register()
724 struct nv50_head *head) in nv50_crc_init_head() argument
726 struct nv50_crc *crc = &head->crc; in nv50_crc_init_head()
730 drm_vblank_work_init(&crc->flip_work, &head->base.base, in nv50_crc_init_head()