Lines Matching refs:crtc

61 #define to_vop(x) container_of(x, struct vop, crtc)
81 struct drm_crtc crtc; member
416 static void vop_enable(struct drm_crtc *crtc) in vop_enable() argument
418 struct vop *vop = to_vop(crtc); in vop_enable()
485 static void vop_disable(struct drm_crtc *crtc) in vop_disable() argument
487 struct vop *vop = to_vop(crtc); in vop_disable()
492 drm_vblank_off(crtc->dev, vop->pipe); in vop_disable()
567 struct drm_crtc *crtc, in vop_update_plane_event() argument
577 struct vop *vop = to_vop(crtc); in vop_update_plane_event()
606 .x2 = crtc->mode.hdisplay, in vop_update_plane_event()
607 .y2 = crtc->mode.vdisplay, in vop_update_plane_event()
611 ret = drm_plane_helper_check_update(plane, crtc, fb, in vop_update_plane_event()
640 dsp_stx = crtc_x + crtc->mode.htotal - crtc->mode.hsync_start; in vop_update_plane_event()
641 dsp_sty = crtc_y + crtc->mode.vtotal - crtc->mode.vsync_start; in vop_update_plane_event()
713 static int vop_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, in vop_update_plane() argument
719 return vop_update_plane_event(plane, crtc, fb, crtc_x, crtc_y, crtc_w, in vop_update_plane()
724 static int vop_update_primary_plane(struct drm_crtc *crtc, in vop_update_primary_plane() argument
729 crtc_w = crtc->primary->fb->width - crtc->x; in vop_update_primary_plane()
730 crtc_h = crtc->primary->fb->height - crtc->y; in vop_update_primary_plane()
732 return vop_update_plane_event(crtc->primary, crtc, crtc->primary->fb, in vop_update_primary_plane()
733 0, 0, crtc_w, crtc_h, crtc->x << 16, in vop_update_primary_plane()
734 crtc->y << 16, crtc_w << 16, in vop_update_primary_plane()
745 if (!plane->crtc) in vop_disable_plane()
748 vop = to_vop(plane->crtc); in vop_disable_plane()
788 int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc, in rockchip_drm_crtc_mode_config() argument
792 struct vop *vop = to_vop(crtc); in rockchip_drm_crtc_mode_config()
801 static int vop_crtc_enable_vblank(struct drm_crtc *crtc) in vop_crtc_enable_vblank() argument
803 struct vop *vop = to_vop(crtc); in vop_crtc_enable_vblank()
818 static void vop_crtc_disable_vblank(struct drm_crtc *crtc) in vop_crtc_disable_vblank() argument
820 struct vop *vop = to_vop(crtc); in vop_crtc_disable_vblank()
836 static void vop_crtc_dpms(struct drm_crtc *crtc, int mode) in vop_crtc_dpms() argument
838 DRM_DEBUG_KMS("crtc[%d] mode[%d]\n", crtc->base.id, mode); in vop_crtc_dpms()
842 vop_enable(crtc); in vop_crtc_dpms()
847 vop_disable(crtc); in vop_crtc_dpms()
855 static void vop_crtc_prepare(struct drm_crtc *crtc) in vop_crtc_prepare() argument
857 vop_crtc_dpms(crtc, DRM_MODE_DPMS_ON); in vop_crtc_prepare()
860 static bool vop_crtc_mode_fixup(struct drm_crtc *crtc, in vop_crtc_mode_fixup() argument
870 static int vop_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, in vop_crtc_mode_set_base() argument
875 crtc->x = x; in vop_crtc_mode_set_base()
876 crtc->y = y; in vop_crtc_mode_set_base()
878 ret = vop_update_primary_plane(crtc, NULL); in vop_crtc_mode_set_base()
887 static int vop_crtc_mode_set(struct drm_crtc *crtc, in vop_crtc_mode_set() argument
892 struct vop *vop = to_vop(crtc); in vop_crtc_mode_set()
947 ret = vop_crtc_mode_set_base(crtc, x, y, fb); in vop_crtc_mode_set()
970 static void vop_crtc_commit(struct drm_crtc *crtc) in vop_crtc_commit() argument
983 static int vop_crtc_page_flip(struct drm_crtc *crtc, in vop_crtc_page_flip() argument
988 struct vop *vop = to_vop(crtc); in vop_crtc_page_flip()
989 struct drm_framebuffer *old_fb = crtc->primary->fb; in vop_crtc_page_flip()
998 crtc->primary->fb = fb; in vop_crtc_page_flip()
1000 ret = vop_update_primary_plane(crtc, event); in vop_crtc_page_flip()
1002 crtc->primary->fb = old_fb; in vop_crtc_page_flip()
1011 struct drm_crtc *crtc = &vop->crtc; in vop_win_state_complete() local
1012 struct drm_device *drm = crtc->dev; in vop_win_state_complete()
1022 drm_vblank_put(crtc->dev, vop->pipe); in vop_win_state_complete()
1025 static void vop_crtc_destroy(struct drm_crtc *crtc) in vop_crtc_destroy() argument
1027 drm_crtc_cleanup(crtc); in vop_crtc_destroy()
1183 struct drm_crtc *crtc = &vop->crtc; in vop_create_crtc() local
1218 ret = drm_crtc_init_with_planes(drm_dev, crtc, primary, cursor, in vop_create_crtc()
1223 drm_crtc_helper_add(crtc, &vop_crtc_helper_funcs); in vop_create_crtc()
1232 unsigned long possible_crtcs = 1 << drm_crtc_index(crtc); in vop_create_crtc()
1257 crtc->port = port; in vop_create_crtc()
1258 vop->pipe = drm_crtc_index(crtc); in vop_create_crtc()
1264 drm_crtc_cleanup(crtc); in vop_create_crtc()
1273 struct drm_crtc *crtc = &vop->crtc; in vop_destroy_crtc() local
1276 of_node_put(crtc->port); in vop_destroy_crtc()
1277 drm_crtc_cleanup(crtc); in vop_destroy_crtc()