Lines Matching refs:crtc
159 struct drm_crtc crtc; member
221 static struct vop2_video_port *to_vop2_video_port(struct drm_crtc *crtc) in to_vop2_video_port() argument
223 return container_of(crtc, struct vop2_video_port, crtc); in to_vop2_video_port()
760 struct rockchip_crtc_state *vcstate = to_rockchip_crtc_state(vp->crtc.state); in vop2_setup_csc_mode()
883 static void vop2_crtc_atomic_disable(struct drm_crtc *crtc, in vop2_crtc_atomic_disable() argument
886 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_crtc_atomic_disable()
893 old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc); in vop2_crtc_atomic_disable()
896 drm_crtc_vblank_off(crtc); in vop2_crtc_atomic_disable()
927 if (crtc->state->event && !crtc->state->active) { in vop2_crtc_atomic_disable()
928 spin_lock_irq(&crtc->dev->event_lock); in vop2_crtc_atomic_disable()
929 drm_crtc_send_vblank_event(crtc, crtc->state->event); in vop2_crtc_atomic_disable()
930 spin_unlock_irq(&crtc->dev->event_lock); in vop2_crtc_atomic_disable()
932 crtc->state->event = NULL; in vop2_crtc_atomic_disable()
941 struct drm_crtc *crtc = pstate->crtc; in vop2_plane_atomic_check() local
953 if (!crtc) in vop2_plane_atomic_check()
956 vp = to_vop2_video_port(crtc); in vop2_plane_atomic_check()
960 cstate = drm_atomic_get_existing_crtc_state(pstate->state, crtc); in vop2_plane_atomic_check()
1019 if (old_pstate && !old_pstate->crtc) in vop2_plane_atomic_disable()
1080 struct drm_crtc *crtc = pstate->crtc; in vop2_plane_atomic_update() local
1082 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_plane_atomic_update()
1083 struct drm_display_mode *adjusted_mode = &crtc->state->adjusted_mode; in vop2_plane_atomic_update()
1111 if (WARN_ON(!crtc)) in vop2_plane_atomic_update()
1332 static int vop2_crtc_enable_vblank(struct drm_crtc *crtc) in vop2_crtc_enable_vblank() argument
1334 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_crtc_enable_vblank()
1341 static void vop2_crtc_disable_vblank(struct drm_crtc *crtc) in vop2_crtc_disable_vblank() argument
1343 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_crtc_disable_vblank()
1348 static bool vop2_crtc_mode_fixup(struct drm_crtc *crtc, in vop2_crtc_mode_fixup() argument
1358 static void vop2_dither_setup(struct drm_crtc *crtc, u32 *dsp_ctrl) in vop2_dither_setup() argument
1360 struct rockchip_crtc_state *vcstate = to_rockchip_crtc_state(crtc->state); in vop2_dither_setup()
1387 static void vop2_post_config(struct drm_crtc *crtc) in vop2_post_config() argument
1389 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_post_config()
1390 struct drm_display_mode *mode = &crtc->state->adjusted_mode; in vop2_post_config()
1516 static void vop2_crtc_atomic_enable(struct drm_crtc *crtc, in vop2_crtc_atomic_enable() argument
1519 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_crtc_atomic_enable()
1523 struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in vop2_crtc_atomic_enable()
1524 struct rockchip_crtc_state *vcstate = to_rockchip_crtc_state(crtc->state); in vop2_crtc_atomic_enable()
1525 struct drm_display_mode *mode = &crtc->state->adjusted_mode; in vop2_crtc_atomic_enable()
1573 drm_for_each_encoder_mask(encoder, crtc->dev, crtc_state->encoder_mask) { in vop2_crtc_atomic_enable()
1593 vop2_dither_setup(crtc, &dsp_ctrl); in vop2_crtc_atomic_enable()
1636 vop2_post_config(crtc); in vop2_crtc_atomic_enable()
1642 drm_crtc_vblank_on(crtc); in vop2_crtc_atomic_enable()
1647 static int vop2_crtc_atomic_check(struct drm_crtc *crtc, in vop2_crtc_atomic_check() argument
1650 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_crtc_atomic_check()
1653 struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in vop2_crtc_atomic_check()
1797 drm_atomic_crtc_for_each_plane(plane, &vp->crtc) { in vop2_setup_alpha()
1813 drm_atomic_crtc_for_each_plane(plane, &vp->crtc) { in vop2_setup_alpha()
1904 adjusted_mode = &vp->crtc.state->adjusted_mode; in vop2_setup_layer_mixer()
1944 drm_atomic_crtc_for_each_plane(plane, &vp->crtc) { in vop2_setup_layer_mixer()
2032 static void vop2_crtc_atomic_begin(struct drm_crtc *crtc, in vop2_crtc_atomic_begin() argument
2035 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_crtc_atomic_begin()
2041 drm_atomic_crtc_for_each_plane(plane, crtc) { in vop2_crtc_atomic_begin()
2060 static void vop2_crtc_atomic_flush(struct drm_crtc *crtc, in vop2_crtc_atomic_flush() argument
2063 struct vop2_video_port *vp = to_vop2_video_port(crtc); in vop2_crtc_atomic_flush()
2065 vop2_post_config(crtc); in vop2_crtc_atomic_flush()
2069 spin_lock_irq(&crtc->dev->event_lock); in vop2_crtc_atomic_flush()
2071 if (crtc->state->event) { in vop2_crtc_atomic_flush()
2072 WARN_ON(drm_crtc_vblank_get(crtc)); in vop2_crtc_atomic_flush()
2073 vp->event = crtc->state->event; in vop2_crtc_atomic_flush()
2074 crtc->state->event = NULL; in vop2_crtc_atomic_flush()
2077 spin_unlock_irq(&crtc->dev->event_lock); in vop2_crtc_atomic_flush()
2089 static struct drm_crtc_state *vop2_crtc_duplicate_state(struct drm_crtc *crtc) in vop2_crtc_duplicate_state() argument
2093 if (WARN_ON(!crtc->state)) in vop2_crtc_duplicate_state()
2096 vcstate = kmemdup(to_rockchip_crtc_state(crtc->state), in vop2_crtc_duplicate_state()
2101 __drm_atomic_helper_crtc_duplicate_state(crtc, &vcstate->base); in vop2_crtc_duplicate_state()
2106 static void vop2_crtc_destroy_state(struct drm_crtc *crtc, in vop2_crtc_destroy_state() argument
2115 static void vop2_crtc_reset(struct drm_crtc *crtc) in vop2_crtc_reset() argument
2120 if (crtc->state) in vop2_crtc_reset()
2121 vop2_crtc_destroy_state(crtc, crtc->state); in vop2_crtc_reset()
2124 __drm_atomic_helper_crtc_reset(crtc, &vcstate->base); in vop2_crtc_reset()
2126 __drm_atomic_helper_crtc_reset(crtc, NULL); in vop2_crtc_reset()
2157 struct drm_crtc *crtc = &vp->crtc; in vop2_isr() local
2169 drm_crtc_handle_vblank(crtc); in vop2_isr()
2170 spin_lock(&crtc->dev->event_lock); in vop2_isr()
2175 drm_crtc_send_vblank_event(crtc, vp->event); in vop2_isr()
2177 drm_crtc_vblank_put(crtc); in vop2_isr()
2180 spin_unlock(&crtc->dev->event_lock); in vop2_isr()
2250 if (!vp->crtc.port) in find_vp_without_primary()
2306 vp->crtc.port = port; in vop2_create_crtcs()
2355 if (!vp->crtc.port) in vop2_create_crtcs()
2360 ret = drm_crtc_init_with_planes(drm, &vp->crtc, plane, NULL, in vop2_create_crtcs()
2368 drm_crtc_helper_add(&vp->crtc, &vop2_crtc_helper_funcs); in vop2_create_crtcs()
2381 if (vp->crtc.port) in vop2_create_crtcs()
2393 struct drm_crtc *crtc, *tmpc; in vop2_destroy_crtcs() local
2403 list_for_each_entry_safe(crtc, tmpc, crtc_list, head) { in vop2_destroy_crtcs()
2404 of_node_put(crtc->port); in vop2_destroy_crtcs()
2405 drm_crtc_cleanup(crtc); in vop2_destroy_crtcs()
2737 vop2->rgb = rockchip_rgb_init(dev, &vop2->vps[ret].crtc, in vop2_bind()