• Home
  • Raw
  • Download

Lines Matching refs:crtc

82 	if (old_plane_state->crtc) {  in drm_atomic_helper_plane_changed()
84 old_plane_state->crtc); in drm_atomic_helper_plane_changed()
92 if (plane_state->crtc) { in drm_atomic_helper_plane_changed()
93 crtc_state = drm_atomic_get_new_crtc_state(state, plane_state->crtc); in drm_atomic_helper_plane_changed()
121 if (!new_conn_state->crtc) in handle_conflicting_encoders()
172 connector->state->crtc->base.id, in handle_conflicting_encoders()
173 connector->state->crtc->name, in handle_conflicting_encoders()
187 new_conn_state->crtc->base.id, new_conn_state->crtc->name, in handle_conflicting_encoders()
190 crtc_state = drm_atomic_get_new_crtc_state(state, new_conn_state->crtc); in handle_conflicting_encoders()
217 struct drm_crtc *crtc; in set_best_encoder() local
221 crtc = conn_state->connector->state->crtc; in set_best_encoder()
229 WARN_ON(!crtc && encoder != conn_state->best_encoder); in set_best_encoder()
230 if (crtc) { in set_best_encoder()
231 crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in set_best_encoder()
239 crtc = conn_state->crtc; in set_best_encoder()
240 WARN_ON(!crtc); in set_best_encoder()
241 if (crtc) { in set_best_encoder()
242 crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in set_best_encoder()
267 encoder_crtc = old_connector_state->crtc; in steal_encoder()
296 if (old_connector_state->crtc != new_connector_state->crtc) { in update_connector_routing()
297 if (old_connector_state->crtc) { in update_connector_routing()
298 crtc_state = drm_atomic_get_new_crtc_state(state, old_connector_state->crtc); in update_connector_routing()
302 if (new_connector_state->crtc) { in update_connector_routing()
303 crtc_state = drm_atomic_get_new_crtc_state(state, new_connector_state->crtc); in update_connector_routing()
308 if (!new_connector_state->crtc) { in update_connector_routing()
319 new_connector_state->crtc); in update_connector_routing()
362 if (!drm_encoder_crtc_ok(new_encoder, new_connector_state->crtc)) { in update_connector_routing()
366 new_connector_state->crtc->base.id, in update_connector_routing()
367 new_connector_state->crtc->name); in update_connector_routing()
379 new_connector_state->crtc->base.id, in update_connector_routing()
380 new_connector_state->crtc->name); in update_connector_routing()
396 new_connector_state->crtc->base.id, in update_connector_routing()
397 new_connector_state->crtc->name); in update_connector_routing()
405 struct drm_crtc *crtc; in mode_fixup() local
412 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { in mode_fixup()
425 WARN_ON(!!new_conn_state->best_encoder != !!new_conn_state->crtc); in mode_fixup()
427 if (!new_conn_state->crtc || !new_conn_state->best_encoder) in mode_fixup()
431 drm_atomic_get_new_crtc_state(state, new_conn_state->crtc); in mode_fixup()
468 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { in mode_fixup()
478 funcs = crtc->helper_private; in mode_fixup()
482 ret = funcs->mode_fixup(crtc, &new_crtc_state->mode, in mode_fixup()
486 crtc->base.id, crtc->name); in mode_fixup()
496 struct drm_crtc *crtc, in mode_valid_path() argument
517 ret = drm_crtc_mode_valid(crtc, mode); in mode_valid_path()
520 crtc->base.id, crtc->name); in mode_valid_path()
536 struct drm_crtc *crtc = conn_state->crtc; in mode_valid() local
541 if (!crtc || !encoder) in mode_valid()
544 crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in mode_valid()
552 mode_status = mode_valid_path(connector, encoder, crtc, mode); in mode_valid()
608 struct drm_crtc *crtc; in drm_atomic_helper_check_modeset() local
615 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_check_modeset()
619 WARN_ON(!drm_modeset_is_locked(&crtc->mutex)); in drm_atomic_helper_check_modeset()
623 crtc->base.id, crtc->name); in drm_atomic_helper_check_modeset()
629 crtc->base.id, crtc->name); in drm_atomic_helper_check_modeset()
645 crtc->base.id, crtc->name); in drm_atomic_helper_check_modeset()
651 crtc->base.id, crtc->name); in drm_atomic_helper_check_modeset()
681 if (old_connector_state->crtc) { in drm_atomic_helper_check_modeset()
683 old_connector_state->crtc); in drm_atomic_helper_check_modeset()
707 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_check_modeset()
712 crtc->base.id, crtc->name, in drm_atomic_helper_check_modeset()
716 ret = drm_atomic_add_affected_connectors(state, crtc); in drm_atomic_helper_check_modeset()
720 ret = drm_atomic_add_affected_planes(state, crtc); in drm_atomic_helper_check_modeset()
804 WARN_ON(plane_state->crtc && plane_state->crtc != crtc_state->crtc); in drm_atomic_helper_check_plane_state()
815 if (WARN_ON(!plane_state->crtc)) { in drm_atomic_helper_check_plane_state()
885 struct drm_crtc *crtc; in drm_atomic_helper_check_planes() local
913 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { in drm_atomic_helper_check_planes()
916 funcs = crtc->helper_private; in drm_atomic_helper_check_planes()
921 ret = funcs->atomic_check(crtc, new_crtc_state); in drm_atomic_helper_check_planes()
924 crtc->base.id, crtc->name); in drm_atomic_helper_check_planes()
1013 struct drm_crtc *crtc; in disable_outputs() local
1024 if (!old_conn_state->crtc) in disable_outputs()
1027 old_crtc_state = drm_atomic_get_old_crtc_state(old_state, old_conn_state->crtc); in disable_outputs()
1029 if (new_conn_state->crtc) in disable_outputs()
1032 new_conn_state->crtc); in disable_outputs()
1037 !drm_atomic_crtc_needs_modeset(old_conn_state->crtc->state)) in disable_outputs()
1064 else if (new_conn_state->crtc && funcs->prepare) in disable_outputs()
1075 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in disable_outputs()
1086 funcs = crtc->helper_private; in disable_outputs()
1089 crtc->base.id, crtc->name); in disable_outputs()
1094 funcs->prepare(crtc); in disable_outputs()
1096 funcs->atomic_disable(crtc, old_crtc_state); in disable_outputs()
1098 funcs->disable(crtc); in disable_outputs()
1100 funcs->dpms(crtc, DRM_MODE_DPMS_OFF); in disable_outputs()
1105 ret = drm_crtc_vblank_get(crtc); in disable_outputs()
1108 drm_crtc_vblank_put(crtc); in disable_outputs()
1135 struct drm_crtc *crtc; in drm_atomic_helper_update_legacy_modeset_state() local
1142 WARN_ON(!connector->encoder->crtc); in drm_atomic_helper_update_legacy_modeset_state()
1144 connector->encoder->crtc = NULL; in drm_atomic_helper_update_legacy_modeset_state()
1148 crtc = new_conn_state->crtc; in drm_atomic_helper_update_legacy_modeset_state()
1149 if ((!crtc && old_conn_state->crtc) || in drm_atomic_helper_update_legacy_modeset_state()
1150 (crtc && drm_atomic_crtc_needs_modeset(crtc->state))) { in drm_atomic_helper_update_legacy_modeset_state()
1153 if (crtc && crtc->state->active) in drm_atomic_helper_update_legacy_modeset_state()
1162 if (!new_conn_state->crtc) in drm_atomic_helper_update_legacy_modeset_state()
1169 connector->encoder->crtc = new_conn_state->crtc; in drm_atomic_helper_update_legacy_modeset_state()
1173 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in drm_atomic_helper_update_legacy_modeset_state()
1174 struct drm_plane *primary = crtc->primary; in drm_atomic_helper_update_legacy_modeset_state()
1177 crtc->mode = new_crtc_state->mode; in drm_atomic_helper_update_legacy_modeset_state()
1178 crtc->enabled = new_crtc_state->enable; in drm_atomic_helper_update_legacy_modeset_state()
1183 if (new_plane_state && new_plane_state->crtc == crtc) { in drm_atomic_helper_update_legacy_modeset_state()
1184 crtc->x = new_plane_state->src_x >> 16; in drm_atomic_helper_update_legacy_modeset_state()
1185 crtc->y = new_plane_state->src_y >> 16; in drm_atomic_helper_update_legacy_modeset_state()
1201 struct drm_crtc *crtc; in drm_atomic_helper_calc_timestamping_constants() local
1204 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { in drm_atomic_helper_calc_timestamping_constants()
1206 drm_calc_timestamping_constants(crtc, in drm_atomic_helper_calc_timestamping_constants()
1215 struct drm_crtc *crtc; in crtc_set_mode() local
1221 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in crtc_set_mode()
1227 funcs = crtc->helper_private; in crtc_set_mode()
1231 crtc->base.id, crtc->name); in crtc_set_mode()
1233 funcs->mode_set_nofb(crtc); in crtc_set_mode()
1248 new_crtc_state = new_conn_state->crtc->state; in crtc_set_mode()
1338 struct drm_crtc *crtc; in drm_atomic_helper_commit_modeset_enables() local
1345 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_modeset_enables()
1355 funcs = crtc->helper_private; in drm_atomic_helper_commit_modeset_enables()
1359 crtc->base.id, crtc->name); in drm_atomic_helper_commit_modeset_enables()
1361 funcs->atomic_enable(crtc, old_crtc_state); in drm_atomic_helper_commit_modeset_enables()
1363 funcs->commit(crtc); in drm_atomic_helper_commit_modeset_enables()
1375 if (!new_conn_state->crtc->state->active || in drm_atomic_helper_commit_modeset_enables()
1376 !drm_atomic_crtc_needs_modeset(new_conn_state->crtc->state)) in drm_atomic_helper_commit_modeset_enables()
1479 struct drm_crtc *crtc; in drm_atomic_helper_wait_for_vblanks() local
1491 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_wait_for_vblanks()
1495 ret = drm_crtc_vblank_get(crtc); in drm_atomic_helper_wait_for_vblanks()
1499 crtc_mask |= drm_crtc_mask(crtc); in drm_atomic_helper_wait_for_vblanks()
1500 old_state->crtcs[i].last_vblank_count = drm_crtc_vblank_count(crtc); in drm_atomic_helper_wait_for_vblanks()
1503 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_wait_for_vblanks()
1504 if (!(crtc_mask & drm_crtc_mask(crtc))) in drm_atomic_helper_wait_for_vblanks()
1509 drm_crtc_vblank_count(crtc), in drm_atomic_helper_wait_for_vblanks()
1513 crtc->base.id, crtc->name); in drm_atomic_helper_wait_for_vblanks()
1515 drm_crtc_vblank_put(crtc); in drm_atomic_helper_wait_for_vblanks()
1538 struct drm_crtc *crtc; in drm_atomic_helper_wait_for_flip_done() local
1545 crtc = old_state->crtcs[i].ptr; in drm_atomic_helper_wait_for_flip_done()
1547 if (!crtc || !commit) in drm_atomic_helper_wait_for_flip_done()
1553 crtc->base.id, crtc->name); in drm_atomic_helper_wait_for_flip_done()
1630 struct drm_crtc *crtc; in commit_tail() local
1658 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) in commit_tail()
1702 struct drm_crtc *crtc; in drm_atomic_helper_async_check() local
1710 for_each_new_crtc_in_state(state, crtc, crtc_state, i) { in drm_atomic_helper_async_check()
1722 if (!new_plane_state->crtc || in drm_atomic_helper_async_check()
1723 old_plane_state->crtc != new_plane_state->crtc) in drm_atomic_helper_async_check()
1942 static int stall_checks(struct drm_crtc *crtc, bool nonblock) in stall_checks() argument
1949 spin_lock(&crtc->commit_lock); in stall_checks()
1951 list_for_each_entry(commit, &crtc->commit_list, commit_entry) { in stall_checks()
1957 spin_unlock(&crtc->commit_lock); in stall_checks()
1967 spin_unlock(&crtc->commit_lock); in stall_checks()
1979 crtc->base.id, crtc->name); in stall_checks()
1995 static void init_commit(struct drm_crtc_commit *commit, struct drm_crtc *crtc) in init_commit() argument
2002 commit->crtc = crtc; in init_commit()
2006 crtc_or_fake_commit(struct drm_atomic_state *state, struct drm_crtc *crtc) in crtc_or_fake_commit() argument
2008 if (crtc) { in crtc_or_fake_commit()
2011 new_crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in crtc_or_fake_commit()
2073 struct drm_crtc *crtc; in drm_atomic_helper_setup_commit() local
2082 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_setup_commit()
2087 init_commit(commit, crtc); in drm_atomic_helper_setup_commit()
2091 ret = stall_checks(crtc, nonblock); in drm_atomic_helper_setup_commit()
2136 commit = crtc_or_fake_commit(state, new_conn_state->crtc ?: old_conn_state->crtc); in drm_atomic_helper_setup_commit()
2151 commit = crtc_or_fake_commit(state, new_plane_state->crtc ?: old_plane_state->crtc); in drm_atomic_helper_setup_commit()
2176 struct drm_crtc *crtc; in drm_atomic_helper_wait_for_dependencies() local
2186 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_wait_for_dependencies()
2196 crtc->base.id, crtc->name); in drm_atomic_helper_wait_for_dependencies()
2204 crtc->base.id, crtc->name); in drm_atomic_helper_wait_for_dependencies()
2272 struct drm_crtc *crtc; in drm_atomic_helper_fake_vblank() local
2275 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in drm_atomic_helper_fake_vblank()
2283 drm_crtc_send_vblank_event(crtc, in drm_atomic_helper_fake_vblank()
2309 struct drm_crtc *crtc; in drm_atomic_helper_commit_hw_done() local
2314 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_hw_done()
2354 struct drm_crtc *crtc; in drm_atomic_helper_commit_cleanup_done() local
2359 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_commit_cleanup_done()
2367 spin_lock(&crtc->commit_lock); in drm_atomic_helper_commit_cleanup_done()
2369 spin_unlock(&crtc->commit_lock); in drm_atomic_helper_commit_cleanup_done()
2443 return state->crtc && state->crtc->state->active; in plane_crtc_active()
2491 struct drm_crtc *crtc; in drm_atomic_helper_commit_planes() local
2499 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_planes()
2502 funcs = crtc->helper_private; in drm_atomic_helper_commit_planes()
2510 funcs->atomic_begin(crtc, old_crtc_state); in drm_atomic_helper_commit_planes()
2545 crtc_state = old_plane_state->crtc->state; in drm_atomic_helper_commit_planes()
2552 } else if (new_plane_state->crtc || disabling) { in drm_atomic_helper_commit_planes()
2557 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_planes()
2560 funcs = crtc->helper_private; in drm_atomic_helper_commit_planes()
2568 funcs->atomic_flush(crtc, old_crtc_state); in drm_atomic_helper_commit_planes()
2594 struct drm_crtc *crtc = old_crtc_state->crtc; in drm_atomic_helper_commit_planes_on_crtc() local
2597 drm_atomic_get_new_crtc_state(old_state, crtc); in drm_atomic_helper_commit_planes_on_crtc()
2604 crtc_funcs = crtc->helper_private; in drm_atomic_helper_commit_planes_on_crtc()
2606 crtc_funcs->atomic_begin(crtc, old_crtc_state); in drm_atomic_helper_commit_planes_on_crtc()
2608 drm_for_each_plane_mask(plane, crtc->dev, plane_mask) { in drm_atomic_helper_commit_planes_on_crtc()
2620 WARN_ON(new_plane_state->crtc && in drm_atomic_helper_commit_planes_on_crtc()
2621 new_plane_state->crtc != crtc); in drm_atomic_helper_commit_planes_on_crtc()
2626 else if (new_plane_state->crtc || in drm_atomic_helper_commit_planes_on_crtc()
2632 crtc_funcs->atomic_flush(crtc, old_crtc_state); in drm_atomic_helper_commit_planes_on_crtc()
2656 struct drm_crtc *crtc = old_crtc_state->crtc; in drm_atomic_helper_disable_planes_on_crtc() local
2658 crtc->helper_private; in drm_atomic_helper_disable_planes_on_crtc()
2662 crtc_funcs->atomic_begin(crtc, NULL); in drm_atomic_helper_disable_planes_on_crtc()
2677 crtc_funcs->atomic_flush(crtc, NULL); in drm_atomic_helper_disable_planes_on_crtc()
2762 struct drm_crtc *crtc; in drm_atomic_helper_swap_state() local
2780 for_each_old_crtc_in_state(state, crtc, old_crtc_state, i) { in drm_atomic_helper_swap_state()
2824 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_swap_state()
2825 WARN_ON(crtc->state != old_crtc_state); in drm_atomic_helper_swap_state()
2831 crtc->state = new_crtc_state; in drm_atomic_helper_swap_state()
2834 spin_lock(&crtc->commit_lock); in drm_atomic_helper_swap_state()
2836 &crtc->commit_list); in drm_atomic_helper_swap_state()
2837 spin_unlock(&crtc->commit_lock); in drm_atomic_helper_swap_state()
2888 struct drm_crtc *crtc, in drm_atomic_helper_update_plane() argument
2911 ret = drm_atomic_set_crtc_for_plane(plane_state, crtc); in drm_atomic_helper_update_plane()
2924 if (plane == crtc->cursor) in drm_atomic_helper_update_plane()
2962 if (plane_state->crtc && plane_state->crtc->cursor == plane) in drm_atomic_helper_disable_plane()
2996 struct drm_crtc *crtc = set->crtc; in drm_atomic_helper_set_config() local
2999 state = drm_atomic_state_alloc(crtc->dev); in drm_atomic_helper_set_config()
3052 struct drm_crtc *crtc; in drm_atomic_helper_disable_all() local
3061 drm_for_each_crtc(crtc, dev) { in drm_atomic_helper_disable_all()
3062 crtc_state = drm_atomic_get_crtc_state(state, crtc); in drm_atomic_helper_disable_all()
3074 ret = drm_atomic_add_affected_planes(state, crtc); in drm_atomic_helper_disable_all()
3078 ret = drm_atomic_add_affected_connectors(state, crtc); in drm_atomic_helper_disable_all()
3162 struct drm_crtc *crtc; in drm_atomic_helper_duplicate_state() local
3172 drm_for_each_crtc(crtc, dev) { in drm_atomic_helper_duplicate_state()
3175 crtc_state = drm_atomic_get_crtc_state(state, crtc); in drm_atomic_helper_duplicate_state()
3297 struct drm_crtc *crtc; in drm_atomic_helper_commit_duplicated_state() local
3305 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) in drm_atomic_helper_commit_duplicated_state()
3306 state->crtcs[i].old_state = crtc->state; in drm_atomic_helper_commit_duplicated_state()
3355 struct drm_crtc *crtc, in page_flip_common() argument
3360 struct drm_plane *plane = crtc->primary; in page_flip_common()
3365 crtc_state = drm_atomic_get_crtc_state(state, crtc); in page_flip_common()
3376 ret = drm_atomic_set_crtc_for_plane(plane_state, crtc); in page_flip_common()
3385 crtc->base.id, crtc->name); in page_flip_common()
3409 int drm_atomic_helper_page_flip(struct drm_crtc *crtc, in drm_atomic_helper_page_flip() argument
3415 struct drm_plane *plane = crtc->primary; in drm_atomic_helper_page_flip()
3425 ret = page_flip_common(state, crtc, fb, event, flags); in drm_atomic_helper_page_flip()
3452 int drm_atomic_helper_page_flip_target(struct drm_crtc *crtc, in drm_atomic_helper_page_flip_target() argument
3459 struct drm_plane *plane = crtc->primary; in drm_atomic_helper_page_flip_target()
3470 ret = page_flip_common(state, crtc, fb, event, flags); in drm_atomic_helper_page_flip_target()
3474 crtc_state = drm_atomic_get_new_crtc_state(state, crtc); in drm_atomic_helper_page_flip_target()
3502 int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, in drm_atomic_helper_legacy_gamma_set() argument
3507 struct drm_device *dev = crtc->dev; in drm_atomic_helper_legacy_gamma_set()
3515 state = drm_atomic_state_alloc(crtc->dev); in drm_atomic_helper_legacy_gamma_set()
3537 crtc_state = drm_atomic_get_crtc_state(state, crtc); in drm_atomic_helper_legacy_gamma_set()