Lines Matching refs:crtc
208 const struct drm_display_mode *mode = &rcrtc->crtc.state->adjusted_mode; in rcar_du_crtc_set_display_timing()
355 if (plane->plane.state->crtc != &rcrtc->crtc || in rcar_du_crtc_update_planes()
439 struct drm_device *dev = rcrtc->crtc.dev; in rcar_du_crtc_finish_page_flip()
451 drm_crtc_send_vblank_event(&rcrtc->crtc, event); in rcar_du_crtc_finish_page_flip()
455 drm_crtc_vblank_put(&rcrtc->crtc); in rcar_du_crtc_finish_page_flip()
460 struct drm_device *dev = rcrtc->crtc.dev; in rcar_du_crtc_page_flip_pending()
489 static int rcar_du_cmm_check(struct drm_crtc *crtc, in rcar_du_cmm_check() argument
493 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_cmm_check()
509 static void rcar_du_cmm_setup(struct drm_crtc *crtc) in rcar_du_cmm_setup() argument
511 struct drm_property_blob *drm_lut = crtc->state->gamma_lut; in rcar_du_cmm_setup()
512 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_cmm_setup()
546 drm_crtc_vblank_on(&rcrtc->crtc); in rcar_du_crtc_setup()
603 interlaced = rcrtc->crtc.mode.flags & DRM_MODE_FLAG_INTERLACE; in rcar_du_crtc_start()
614 struct drm_crtc *crtc = &rcrtc->crtc; in rcar_du_crtc_disable_planes() local
618 drm_crtc_vblank_get(crtc); in rcar_du_crtc_disable_planes()
637 drm_crtc_vblank_put(crtc); in rcar_du_crtc_disable_planes()
642 struct drm_crtc *crtc = &rcrtc->crtc; in rcar_du_crtc_stop() local
663 drm_crtc_vblank_off(crtc); in rcar_du_crtc_stop()
690 static int rcar_du_crtc_atomic_check(struct drm_crtc *crtc, in rcar_du_crtc_atomic_check() argument
694 crtc); in rcar_du_crtc_atomic_check()
699 ret = rcar_du_cmm_check(crtc, crtc_state); in rcar_du_crtc_atomic_check()
706 drm_for_each_encoder_mask(encoder, crtc->dev, in rcar_du_crtc_atomic_check()
721 static void rcar_du_crtc_atomic_enable(struct drm_crtc *crtc, in rcar_du_crtc_atomic_enable() argument
724 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_atomic_enable()
725 struct rcar_du_crtc_state *rstate = to_rcar_crtc_state(crtc->state); in rcar_du_crtc_atomic_enable()
742 &crtc->state->adjusted_mode; in rcar_du_crtc_atomic_enable()
766 rcar_du_cmm_setup(crtc); in rcar_du_crtc_atomic_enable()
769 static void rcar_du_crtc_atomic_disable(struct drm_crtc *crtc, in rcar_du_crtc_atomic_disable() argument
773 crtc); in rcar_du_crtc_atomic_disable()
774 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_atomic_disable()
805 spin_lock_irq(&crtc->dev->event_lock); in rcar_du_crtc_atomic_disable()
806 if (crtc->state->event) { in rcar_du_crtc_atomic_disable()
807 drm_crtc_send_vblank_event(crtc, crtc->state->event); in rcar_du_crtc_atomic_disable()
808 crtc->state->event = NULL; in rcar_du_crtc_atomic_disable()
810 spin_unlock_irq(&crtc->dev->event_lock); in rcar_du_crtc_atomic_disable()
813 static void rcar_du_crtc_atomic_begin(struct drm_crtc *crtc, in rcar_du_crtc_atomic_begin() argument
816 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_atomic_begin()
818 WARN_ON(!crtc->state->enable); in rcar_du_crtc_atomic_begin()
835 if (crtc->state->color_mgmt_changed && !crtc->state->active_changed) in rcar_du_crtc_atomic_begin()
836 rcar_du_cmm_setup(crtc); in rcar_du_crtc_atomic_begin()
842 static void rcar_du_crtc_atomic_flush(struct drm_crtc *crtc, in rcar_du_crtc_atomic_flush() argument
845 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_atomic_flush()
846 struct drm_device *dev = rcrtc->crtc.dev; in rcar_du_crtc_atomic_flush()
851 if (crtc->state->event) { in rcar_du_crtc_atomic_flush()
852 WARN_ON(drm_crtc_vblank_get(crtc) != 0); in rcar_du_crtc_atomic_flush()
855 rcrtc->event = crtc->state->event; in rcar_du_crtc_atomic_flush()
856 crtc->state->event = NULL; in rcar_du_crtc_atomic_flush()
865 rcar_du_crtc_mode_valid(struct drm_crtc *crtc, in rcar_du_crtc_mode_valid() argument
868 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_mode_valid()
965 rcar_du_crtc_atomic_duplicate_state(struct drm_crtc *crtc) in rcar_du_crtc_atomic_duplicate_state() argument
970 if (WARN_ON(!crtc->state)) in rcar_du_crtc_atomic_duplicate_state()
973 state = to_rcar_crtc_state(crtc->state); in rcar_du_crtc_atomic_duplicate_state()
978 __drm_atomic_helper_crtc_duplicate_state(crtc, ©->state); in rcar_du_crtc_atomic_duplicate_state()
983 static void rcar_du_crtc_atomic_destroy_state(struct drm_crtc *crtc, in rcar_du_crtc_atomic_destroy_state() argument
990 static void rcar_du_crtc_cleanup(struct drm_crtc *crtc) in rcar_du_crtc_cleanup() argument
992 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_cleanup()
996 return drm_crtc_cleanup(crtc); in rcar_du_crtc_cleanup()
999 static void rcar_du_crtc_reset(struct drm_crtc *crtc) in rcar_du_crtc_reset() argument
1003 if (crtc->state) { in rcar_du_crtc_reset()
1004 rcar_du_crtc_atomic_destroy_state(crtc, crtc->state); in rcar_du_crtc_reset()
1005 crtc->state = NULL; in rcar_du_crtc_reset()
1015 __drm_atomic_helper_crtc_reset(crtc, &state->state); in rcar_du_crtc_reset()
1018 static int rcar_du_crtc_enable_vblank(struct drm_crtc *crtc) in rcar_du_crtc_enable_vblank() argument
1020 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_enable_vblank()
1029 static void rcar_du_crtc_disable_vblank(struct drm_crtc *crtc) in rcar_du_crtc_disable_vblank() argument
1031 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_disable_vblank()
1074 static int rcar_du_crtc_verify_crc_source(struct drm_crtc *crtc, in rcar_du_crtc_verify_crc_source() argument
1078 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_verify_crc_source()
1091 rcar_du_crtc_get_crc_sources(struct drm_crtc *crtc, size_t *count) in rcar_du_crtc_get_crc_sources() argument
1093 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_get_crc_sources()
1099 static int rcar_du_crtc_set_crc_source(struct drm_crtc *crtc, in rcar_du_crtc_set_crc_source() argument
1102 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); in rcar_du_crtc_set_crc_source()
1119 state = drm_atomic_state_alloc(crtc->dev); in rcar_du_crtc_set_crc_source()
1128 crtc_state = drm_atomic_get_crtc_state(state, crtc); in rcar_du_crtc_set_crc_source()
1213 drm_crtc_handle_vblank(&rcrtc->crtc); in rcar_du_crtc_irq()
1237 struct drm_crtc *crtc = &rcrtc->crtc; in rcar_du_crtc_create() local
1294 ret = drm_crtc_init_with_planes(&rcdu->ddev, crtc, primary, NULL, in rcar_du_crtc_create()
1306 drm_mode_crtc_set_gamma_size(crtc, CM2_LUT_SIZE); in rcar_du_crtc_create()
1307 drm_crtc_enable_color_mgmt(crtc, 0, false, CM2_LUT_SIZE); in rcar_du_crtc_create()
1310 drm_crtc_helper_add(crtc, &crtc_helper_funcs); in rcar_du_crtc_create()