Lines Matching refs:crtc
297 struct drm_display_mode *m = &lcdif->crtc.state->adjusted_mode; in lcdif_set_mode()
341 CTRLDESCL0_3_PITCH(lcdif->crtc.primary->state->fb->pitches[0]); in lcdif_set_mode()
405 struct drm_device *drm = crtc_state->crtc->dev; in lcdif_crtc_mode_set_nofb()
424 static int lcdif_crtc_atomic_check(struct drm_crtc *crtc, in lcdif_crtc_atomic_check() argument
427 struct drm_device *drm = crtc->dev; in lcdif_crtc_atomic_check()
429 crtc); in lcdif_crtc_atomic_check()
432 drm_plane_mask(crtc->primary); in lcdif_crtc_atomic_check()
446 ret = drm_atomic_add_affected_planes(state, crtc); in lcdif_crtc_atomic_check()
452 if (!connector_state->crtc) in lcdif_crtc_atomic_check()
505 static void lcdif_crtc_atomic_flush(struct drm_crtc *crtc, in lcdif_crtc_atomic_flush() argument
508 struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); in lcdif_crtc_atomic_flush()
516 event = crtc->state->event; in lcdif_crtc_atomic_flush()
517 crtc->state->event = NULL; in lcdif_crtc_atomic_flush()
522 spin_lock_irq(&crtc->dev->event_lock); in lcdif_crtc_atomic_flush()
523 if (drm_crtc_vblank_get(crtc) == 0) in lcdif_crtc_atomic_flush()
524 drm_crtc_arm_vblank_event(crtc, event); in lcdif_crtc_atomic_flush()
526 drm_crtc_send_vblank_event(crtc, event); in lcdif_crtc_atomic_flush()
527 spin_unlock_irq(&crtc->dev->event_lock); in lcdif_crtc_atomic_flush()
530 static void lcdif_crtc_atomic_enable(struct drm_crtc *crtc, in lcdif_crtc_atomic_enable() argument
533 struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); in lcdif_crtc_atomic_enable()
534 struct drm_crtc_state *new_cstate = drm_atomic_get_new_crtc_state(state, crtc); in lcdif_crtc_atomic_enable()
536 crtc->primary); in lcdif_crtc_atomic_enable()
537 struct drm_display_mode *m = &lcdif->crtc.state->adjusted_mode; in lcdif_crtc_atomic_enable()
557 drm_crtc_vblank_on(crtc); in lcdif_crtc_atomic_enable()
560 static void lcdif_crtc_atomic_disable(struct drm_crtc *crtc, in lcdif_crtc_atomic_disable() argument
563 struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); in lcdif_crtc_atomic_disable()
567 drm_crtc_vblank_off(crtc); in lcdif_crtc_atomic_disable()
572 event = crtc->state->event; in lcdif_crtc_atomic_disable()
574 crtc->state->event = NULL; in lcdif_crtc_atomic_disable()
575 drm_crtc_send_vblank_event(crtc, event); in lcdif_crtc_atomic_disable()
582 static void lcdif_crtc_atomic_destroy_state(struct drm_crtc *crtc, in lcdif_crtc_atomic_destroy_state() argument
589 static void lcdif_crtc_reset(struct drm_crtc *crtc) in lcdif_crtc_reset() argument
593 if (crtc->state) in lcdif_crtc_reset()
594 lcdif_crtc_atomic_destroy_state(crtc, crtc->state); in lcdif_crtc_reset()
596 crtc->state = NULL; in lcdif_crtc_reset()
600 __drm_atomic_helper_crtc_reset(crtc, &state->base); in lcdif_crtc_reset()
604 lcdif_crtc_atomic_duplicate_state(struct drm_crtc *crtc) in lcdif_crtc_atomic_duplicate_state() argument
606 struct lcdif_crtc_state *old = to_lcdif_crtc_state(crtc->state); in lcdif_crtc_atomic_duplicate_state()
609 if (WARN_ON(!crtc->state)) in lcdif_crtc_atomic_duplicate_state()
616 __drm_atomic_helper_crtc_duplicate_state(crtc, &new->base); in lcdif_crtc_atomic_duplicate_state()
624 static int lcdif_crtc_enable_vblank(struct drm_crtc *crtc) in lcdif_crtc_enable_vblank() argument
626 struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); in lcdif_crtc_enable_vblank()
635 static void lcdif_crtc_disable_vblank(struct drm_crtc *crtc) in lcdif_crtc_disable_vblank() argument
637 struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); in lcdif_crtc_disable_vblank()
675 &lcdif->crtc); in lcdif_plane_atomic_check()
754 struct drm_crtc *crtc = &lcdif->crtc; in lcdif_kms_init() local
776 drm_crtc_helper_add(crtc, &lcdif_crtc_helper_funcs); in lcdif_kms_init()
777 return drm_crtc_init_with_planes(lcdif->drm, crtc, in lcdif_kms_init()