Lines Matching refs:crtc
64 #define to_vop(x) container_of(x, struct vop, crtc)
84 struct drm_crtc crtc; member
637 static void vop_enable(struct drm_crtc *crtc) in vop_enable() argument
639 struct vop *vop = to_vop(crtc); in vop_enable()
707 static void vop_disable(struct drm_crtc *crtc) in vop_disable() argument
709 struct vop *vop = to_vop(crtc); in vop_disable()
714 drm_vblank_off(crtc->dev, vop->pipe); in vop_disable()
789 struct drm_crtc *crtc, in vop_update_plane_event() argument
799 struct vop *vop = to_vop(crtc); in vop_update_plane_event()
834 .x2 = crtc->mode.hdisplay, in vop_update_plane_event()
835 .y2 = crtc->mode.vdisplay, in vop_update_plane_event()
843 ret = drm_plane_helper_check_update(plane, crtc, fb, in vop_update_plane_event()
883 dsp_stx = dest.x1 + crtc->mode.htotal - crtc->mode.hsync_start; in vop_update_plane_event()
884 dsp_sty = dest.y1 + crtc->mode.vtotal - crtc->mode.vsync_start; in vop_update_plane_event()
989 static int vop_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, in vop_update_plane() argument
995 return vop_update_plane_event(plane, crtc, fb, crtc_x, crtc_y, crtc_w, in vop_update_plane()
1000 static int vop_update_primary_plane(struct drm_crtc *crtc, in vop_update_primary_plane() argument
1005 crtc_w = crtc->primary->fb->width - crtc->x; in vop_update_primary_plane()
1006 crtc_h = crtc->primary->fb->height - crtc->y; in vop_update_primary_plane()
1008 return vop_update_plane_event(crtc->primary, crtc, crtc->primary->fb, in vop_update_primary_plane()
1009 0, 0, crtc_w, crtc_h, crtc->x << 16, in vop_update_primary_plane()
1010 crtc->y << 16, crtc_w << 16, in vop_update_primary_plane()
1021 if (!plane->crtc) in vop_disable_plane()
1024 vop = to_vop(plane->crtc); in vop_disable_plane()
1064 int rockchip_drm_crtc_mode_config(struct drm_crtc *crtc, in rockchip_drm_crtc_mode_config() argument
1068 struct vop *vop = to_vop(crtc); in rockchip_drm_crtc_mode_config()
1077 static int vop_crtc_enable_vblank(struct drm_crtc *crtc) in vop_crtc_enable_vblank() argument
1079 struct vop *vop = to_vop(crtc); in vop_crtc_enable_vblank()
1094 static void vop_crtc_disable_vblank(struct drm_crtc *crtc) in vop_crtc_disable_vblank() argument
1096 struct vop *vop = to_vop(crtc); in vop_crtc_disable_vblank()
1112 static void vop_crtc_dpms(struct drm_crtc *crtc, int mode) in vop_crtc_dpms() argument
1114 DRM_DEBUG_KMS("crtc[%d] mode[%d]\n", crtc->base.id, mode); in vop_crtc_dpms()
1118 vop_enable(crtc); in vop_crtc_dpms()
1123 vop_disable(crtc); in vop_crtc_dpms()
1131 static void vop_crtc_prepare(struct drm_crtc *crtc) in vop_crtc_prepare() argument
1133 vop_crtc_dpms(crtc, DRM_MODE_DPMS_ON); in vop_crtc_prepare()
1136 static bool vop_crtc_mode_fixup(struct drm_crtc *crtc, in vop_crtc_mode_fixup() argument
1146 static int vop_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, in vop_crtc_mode_set_base() argument
1151 crtc->x = x; in vop_crtc_mode_set_base()
1152 crtc->y = y; in vop_crtc_mode_set_base()
1154 ret = vop_update_primary_plane(crtc, NULL); in vop_crtc_mode_set_base()
1163 static int vop_crtc_mode_set(struct drm_crtc *crtc, in vop_crtc_mode_set() argument
1168 struct vop *vop = to_vop(crtc); in vop_crtc_mode_set()
1223 ret = vop_crtc_mode_set_base(crtc, x, y, fb); in vop_crtc_mode_set()
1246 static void vop_crtc_commit(struct drm_crtc *crtc) in vop_crtc_commit() argument
1259 static int vop_crtc_page_flip(struct drm_crtc *crtc, in vop_crtc_page_flip() argument
1264 struct vop *vop = to_vop(crtc); in vop_crtc_page_flip()
1265 struct drm_framebuffer *old_fb = crtc->primary->fb; in vop_crtc_page_flip()
1274 crtc->primary->fb = fb; in vop_crtc_page_flip()
1276 ret = vop_update_primary_plane(crtc, event); in vop_crtc_page_flip()
1278 crtc->primary->fb = old_fb; in vop_crtc_page_flip()
1287 struct drm_crtc *crtc = &vop->crtc; in vop_win_state_complete() local
1288 struct drm_device *drm = crtc->dev; in vop_win_state_complete()
1293 drm_crtc_send_vblank_event(crtc, state->event); in vop_win_state_complete()
1298 drm_vblank_put(crtc->dev, vop->pipe); in vop_win_state_complete()
1301 static void vop_crtc_destroy(struct drm_crtc *crtc) in vop_crtc_destroy() argument
1303 drm_crtc_cleanup(crtc); in vop_crtc_destroy()
1459 struct drm_crtc *crtc = &vop->crtc; in vop_create_crtc() local
1494 ret = drm_crtc_init_with_planes(drm_dev, crtc, primary, cursor, in vop_create_crtc()
1499 drm_crtc_helper_add(crtc, &vop_crtc_helper_funcs); in vop_create_crtc()
1508 unsigned long possible_crtcs = 1 << drm_crtc_index(crtc); in vop_create_crtc()
1533 crtc->port = port; in vop_create_crtc()
1534 vop->pipe = drm_crtc_index(crtc); in vop_create_crtc()
1540 drm_crtc_cleanup(crtc); in vop_create_crtc()
1549 struct drm_crtc *crtc = &vop->crtc; in vop_destroy_crtc() local
1552 of_node_put(crtc->port); in vop_destroy_crtc()
1553 drm_crtc_cleanup(crtc); in vop_destroy_crtc()