Lines Matching refs:crtc
622 plane->crtc = NULL; in drm_plane_force_disable()
721 if (plane->state && plane->state->crtc && drm_lease_held(file_priv, plane->state->crtc->base.id)) in drm_mode_getplane()
722 plane_resp->crtc_id = plane->state->crtc->base.id; in drm_mode_getplane()
723 else if (!plane->state && plane->crtc && drm_lease_held(file_priv, plane->crtc->base.id)) in drm_mode_getplane()
724 plane_resp->crtc_id = plane->crtc->base.id; in drm_mode_getplane()
791 struct drm_crtc *crtc, in __setplane_check() argument
801 if (!(plane->possible_crtcs & drm_crtc_mask(crtc))) { in __setplane_check()
864 struct drm_crtc *crtc, in __setplane_internal() argument
882 plane->crtc = NULL; in __setplane_internal()
890 ret = __setplane_check(plane, crtc, fb, in __setplane_internal()
897 ret = plane->funcs->update_plane(plane, crtc, fb, in __setplane_internal()
901 plane->crtc = crtc; in __setplane_internal()
917 struct drm_crtc *crtc, in __setplane_atomic() argument
940 ret = __setplane_check(plane, crtc, fb, in __setplane_atomic()
946 return plane->funcs->update_plane(plane, crtc, fb, in __setplane_atomic()
952 struct drm_crtc *crtc, in setplane_internal() argument
967 ret = __setplane_atomic(plane, crtc, fb, in setplane_internal()
971 ret = __setplane_internal(plane, crtc, fb, in setplane_internal()
985 struct drm_crtc *crtc = NULL; in drm_mode_setplane() local
1011 crtc = drm_crtc_find(dev, file_priv, plane_req->crtc_id); in drm_mode_setplane()
1012 if (!crtc) { in drm_mode_setplane()
1020 ret = setplane_internal(plane, crtc, fb, in drm_mode_setplane()
1032 static int drm_mode_cursor_universal(struct drm_crtc *crtc, in drm_mode_cursor_universal() argument
1037 struct drm_device *dev = crtc->dev; in drm_mode_cursor_universal()
1038 struct drm_plane *plane = crtc->cursor; in drm_mode_cursor_universal()
1053 WARN_ON(plane->crtc != crtc && plane->crtc != NULL); in drm_mode_cursor_universal()
1087 crtc_x = crtc->cursor_x; in drm_mode_cursor_universal()
1088 crtc_y = crtc->cursor_y; in drm_mode_cursor_universal()
1099 ret = __setplane_atomic(plane, crtc, fb, in drm_mode_cursor_universal()
1103 ret = __setplane_internal(plane, crtc, fb, in drm_mode_cursor_universal()
1112 crtc->cursor_x = req->x; in drm_mode_cursor_universal()
1113 crtc->cursor_y = req->y; in drm_mode_cursor_universal()
1123 struct drm_crtc *crtc; in drm_mode_cursor_common() local
1133 crtc = drm_crtc_find(dev, file_priv, req->crtc_id); in drm_mode_cursor_common()
1134 if (!crtc) { in drm_mode_cursor_common()
1141 ret = drm_modeset_lock(&crtc->mutex, &ctx); in drm_mode_cursor_common()
1148 if (crtc->cursor) { in drm_mode_cursor_common()
1149 ret = drm_modeset_lock(&crtc->cursor->mutex, &ctx); in drm_mode_cursor_common()
1153 if (!drm_lease_held(file_priv, crtc->cursor->base.id)) { in drm_mode_cursor_common()
1158 ret = drm_mode_cursor_universal(crtc, req, file_priv, &ctx); in drm_mode_cursor_common()
1163 if (!crtc->funcs->cursor_set && !crtc->funcs->cursor_set2) { in drm_mode_cursor_common()
1168 if (crtc->funcs->cursor_set2) in drm_mode_cursor_common()
1169 ret = crtc->funcs->cursor_set2(crtc, file_priv, req->handle, in drm_mode_cursor_common()
1172 ret = crtc->funcs->cursor_set(crtc, file_priv, req->handle, in drm_mode_cursor_common()
1177 if (crtc->funcs->cursor_move) { in drm_mode_cursor_common()
1178 ret = crtc->funcs->cursor_move(crtc, req->x, req->y); in drm_mode_cursor_common()
1228 struct drm_crtc *crtc; in drm_mode_page_flip_ioctl() local
1254 crtc = drm_crtc_find(dev, file_priv, page_flip->crtc_id); in drm_mode_page_flip_ioctl()
1255 if (!crtc) in drm_mode_page_flip_ioctl()
1258 plane = crtc->primary; in drm_mode_page_flip_ioctl()
1263 if (crtc->funcs->page_flip_target) { in drm_mode_page_flip_ioctl()
1267 r = drm_crtc_vblank_get(crtc); in drm_mode_page_flip_ioctl()
1271 current_vblank = (u32)drm_crtc_vblank_count(crtc); in drm_mode_page_flip_ioctl()
1279 drm_crtc_vblank_put(crtc); in drm_mode_page_flip_ioctl()
1287 drm_crtc_vblank_put(crtc); in drm_mode_page_flip_ioctl()
1297 } else if (crtc->funcs->page_flip == NULL || in drm_mode_page_flip_ioctl()
1304 ret = drm_modeset_lock(&crtc->mutex, &ctx); in drm_mode_page_flip_ioctl()
1340 ret = drm_crtc_check_viewport(crtc, crtc->x, crtc->y, in drm_mode_page_flip_ioctl()
1341 &crtc->mode, fb); in drm_mode_page_flip_ioctl()
1369 e->event.vbl.crtc_id = crtc->base.id; in drm_mode_page_flip_ioctl()
1380 if (crtc->funcs->page_flip_target) in drm_mode_page_flip_ioctl()
1381 ret = crtc->funcs->page_flip_target(crtc, fb, e, in drm_mode_page_flip_ioctl()
1386 ret = crtc->funcs->page_flip(crtc, fb, e, page_flip->flags, in drm_mode_page_flip_ioctl()
1417 if (ret && crtc->funcs->page_flip_target) in drm_mode_page_flip_ioctl()
1418 drm_crtc_vblank_put(crtc); in drm_mode_page_flip_ioctl()