Lines Matching refs:dpu_crtc
55 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_destroy() local
61 kfree(dpu_crtc); in dpu_crtc_destroy()
404 struct dpu_crtc *dpu_crtc, struct dpu_crtc_mixer *mixer, in _dpu_crtc_blend_setup_mixer() argument
489 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in _dpu_crtc_blend_setup() local
497 DRM_DEBUG_ATOMIC("%s\n", dpu_crtc->name); in _dpu_crtc_blend_setup()
509 _dpu_crtc_blend_setup_mixer(crtc, dpu_crtc, mixer, &stage_cfg); in _dpu_crtc_blend_setup()
542 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in _dpu_crtc_complete_flip() local
547 if (dpu_crtc->event) { in _dpu_crtc_complete_flip()
548 DRM_DEBUG_VBL("%s: send event: %pK\n", dpu_crtc->name, in _dpu_crtc_complete_flip()
549 dpu_crtc->event); in _dpu_crtc_complete_flip()
551 drm_crtc_send_vblank_event(crtc, dpu_crtc->event); in _dpu_crtc_complete_flip()
552 dpu_crtc->event = NULL; in _dpu_crtc_complete_flip()
581 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_vblank_callback() local
584 if (ktime_compare(dpu_crtc->vblank_cb_time, ktime_set(0, 0)) == 0) in dpu_crtc_vblank_callback()
585 dpu_crtc->vblank_cb_time = ktime_get(); in dpu_crtc_vblank_callback()
587 dpu_crtc->vblank_cb_count++; in dpu_crtc_vblank_callback()
600 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_frame_event_work() local
613 if (atomic_read(&dpu_crtc->frame_pending) < 1) { in dpu_crtc_frame_event_work()
615 } else if (atomic_dec_return(&dpu_crtc->frame_pending) == 0) { in dpu_crtc_frame_event_work()
635 complete_all(&dpu_crtc->frame_done_comp); in dpu_crtc_frame_event_work()
637 spin_lock_irqsave(&dpu_crtc->spin_lock, flags); in dpu_crtc_frame_event_work()
638 list_add_tail(&fevent->list, &dpu_crtc->frame_event_list); in dpu_crtc_frame_event_work()
639 spin_unlock_irqrestore(&dpu_crtc->spin_lock, flags); in dpu_crtc_frame_event_work()
655 struct dpu_crtc *dpu_crtc; in dpu_crtc_frame_event_cb() local
665 dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_frame_event_cb()
671 spin_lock_irqsave(&dpu_crtc->spin_lock, flags); in dpu_crtc_frame_event_cb()
672 fevent = list_first_entry_or_null(&dpu_crtc->frame_event_list, in dpu_crtc_frame_event_cb()
676 spin_unlock_irqrestore(&dpu_crtc->spin_lock, flags); in dpu_crtc_frame_event_cb()
818 struct dpu_crtc *dpu_crtc; in dpu_crtc_atomic_flush() local
833 dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_atomic_flush()
843 WARN_ON(dpu_crtc->event); in dpu_crtc_atomic_flush()
845 dpu_crtc->event = crtc->state->event; in dpu_crtc_atomic_flush()
866 if (dpu_crtc->smmu_state.transition_error) in dpu_crtc_atomic_flush()
893 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in _dpu_crtc_wait_for_frame_done() local
896 if (!atomic_read(&dpu_crtc->frame_pending)) { in _dpu_crtc_wait_for_frame_done()
902 ret = wait_for_completion_timeout(&dpu_crtc->frame_done_comp, in _dpu_crtc_wait_for_frame_done()
916 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_commit_kickoff() local
945 if (atomic_inc_return(&dpu_crtc->frame_pending) == 1) { in dpu_crtc_commit_kickoff()
951 dpu_crtc->play_count++; in dpu_crtc_commit_kickoff()
958 reinit_completion(&dpu_crtc->frame_done_comp); in dpu_crtc_commit_kickoff()
1013 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_disable() local
1039 atomic_read(&dpu_crtc->frame_pending)); in dpu_crtc_disable()
1041 trace_dpu_crtc_disable(DRMID(crtc), false, dpu_crtc); in dpu_crtc_disable()
1042 dpu_crtc->enabled = false; in dpu_crtc_disable()
1044 if (atomic_read(&dpu_crtc->frame_pending)) { in dpu_crtc_disable()
1046 atomic_read(&dpu_crtc->frame_pending)); in dpu_crtc_disable()
1049 atomic_set(&dpu_crtc->frame_pending, 0); in dpu_crtc_disable()
1077 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_enable() local
1099 trace_dpu_crtc_enable(DRMID(crtc), true, dpu_crtc); in dpu_crtc_enable()
1100 dpu_crtc->enabled = true; in dpu_crtc_enable()
1135 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_atomic_check() local
1163 DRM_DEBUG_ATOMIC("%s: check\n", dpu_crtc->name); in dpu_crtc_atomic_check()
1188 dpu_crtc->name, plane->base.id, rc); in dpu_crtc_atomic_check()
1268 DRM_DEBUG_ATOMIC("%s: zpos %d\n", dpu_crtc->name, z_pos); in dpu_crtc_atomic_check()
1360 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_vblank() local
1363 trace_dpu_crtc_vblank(DRMID(&dpu_crtc->base), en, dpu_crtc); in dpu_crtc_vblank()
1382 dpu_crtc); in dpu_crtc_vblank()
1393 struct dpu_crtc *dpu_crtc; in _dpu_debugfs_status_show() local
1406 dpu_crtc = s->private; in _dpu_debugfs_status_show()
1407 crtc = &dpu_crtc->base; in _dpu_debugfs_status_show()
1477 if (dpu_crtc->vblank_cb_count) { in _dpu_debugfs_status_show()
1478 ktime_t diff = ktime_sub(ktime_get(), dpu_crtc->vblank_cb_time); in _dpu_debugfs_status_show()
1481 dpu_crtc->vblank_cb_count * 1000, diff_ms) : 0; in _dpu_debugfs_status_show()
1485 fps, dpu_crtc->vblank_cb_count, in _dpu_debugfs_status_show()
1486 ktime_to_ms(diff), dpu_crtc->play_count); in _dpu_debugfs_status_show()
1489 dpu_crtc->vblank_cb_count = 0; in _dpu_debugfs_status_show()
1490 dpu_crtc->vblank_cb_time = ktime_set(0, 0); in _dpu_debugfs_status_show()
1503 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in dpu_crtc_debugfs_state_show() local
1508 dpu_crtc->cur_perf.core_clk_rate); in dpu_crtc_debugfs_state_show()
1509 seq_printf(s, "bw_ctl: %llu\n", dpu_crtc->cur_perf.bw_ctl); in dpu_crtc_debugfs_state_show()
1511 dpu_crtc->cur_perf.max_per_pipe_ib); in dpu_crtc_debugfs_state_show()
1519 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); in _dpu_crtc_init_debugfs() local
1522 debugfs_root = debugfs_create_dir(dpu_crtc->name, in _dpu_crtc_init_debugfs()
1527 dpu_crtc, &_dpu_debugfs_status_fops); in _dpu_crtc_init_debugfs()
1530 &dpu_crtc->base, in _dpu_crtc_init_debugfs()
1578 struct dpu_crtc *dpu_crtc = NULL; in dpu_crtc_init() local
1581 dpu_crtc = kzalloc(sizeof(*dpu_crtc), GFP_KERNEL); in dpu_crtc_init()
1582 if (!dpu_crtc) in dpu_crtc_init()
1585 crtc = &dpu_crtc->base; in dpu_crtc_init()
1588 spin_lock_init(&dpu_crtc->spin_lock); in dpu_crtc_init()
1589 atomic_set(&dpu_crtc->frame_pending, 0); in dpu_crtc_init()
1591 init_completion(&dpu_crtc->frame_done_comp); in dpu_crtc_init()
1593 INIT_LIST_HEAD(&dpu_crtc->frame_event_list); in dpu_crtc_init()
1595 for (i = 0; i < ARRAY_SIZE(dpu_crtc->frame_events); i++) { in dpu_crtc_init()
1596 INIT_LIST_HEAD(&dpu_crtc->frame_events[i].list); in dpu_crtc_init()
1597 list_add(&dpu_crtc->frame_events[i].list, in dpu_crtc_init()
1598 &dpu_crtc->frame_event_list); in dpu_crtc_init()
1599 kthread_init_work(&dpu_crtc->frame_events[i].work, in dpu_crtc_init()
1611 snprintf(dpu_crtc->name, DPU_CRTC_NAME_SIZE, "crtc%u", crtc->base.id); in dpu_crtc_init()
1614 spin_lock_init(&dpu_crtc->event_lock); in dpu_crtc_init()
1616 DRM_DEBUG_KMS("%s: successfully initialized crtc\n", dpu_crtc->name); in dpu_crtc_init()