Lines Matching refs:old_state
965 crtc_needs_disable(struct drm_crtc_state *old_state, in crtc_needs_disable() argument
973 return drm_atomic_crtc_effectively_active(old_state); in crtc_needs_disable()
980 return old_state->active || in crtc_needs_disable()
981 (old_state->self_refresh_active && !new_state->enable) || in crtc_needs_disable()
986 disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) in disable_outputs() argument
994 for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) { in disable_outputs()
1003 old_crtc_state = drm_atomic_get_old_crtc_state(old_state, old_conn_state->crtc); in disable_outputs()
1007 old_state, in disable_outputs()
1033 drm_atomic_bridge_disable(encoder->bridge, old_state); in disable_outputs()
1038 funcs->atomic_disable(encoder, old_state); in disable_outputs()
1047 drm_atomic_bridge_post_disable(encoder->bridge, old_state); in disable_outputs()
1050 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in disable_outputs()
1108 struct drm_atomic_state *old_state) in drm_atomic_helper_update_legacy_modeset_state() argument
1117 for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) { in drm_atomic_helper_update_legacy_modeset_state()
1138 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { in drm_atomic_helper_update_legacy_modeset_state()
1150 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in drm_atomic_helper_update_legacy_modeset_state()
1158 drm_atomic_get_new_plane_state(old_state, primary); in drm_atomic_helper_update_legacy_modeset_state()
1173 crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state) in crtc_set_mode() argument
1181 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in crtc_set_mode()
1197 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { in crtc_set_mode()
1247 struct drm_atomic_state *old_state) in drm_atomic_helper_commit_modeset_disables() argument
1249 disable_outputs(dev, old_state); in drm_atomic_helper_commit_modeset_disables()
1251 drm_atomic_helper_update_legacy_modeset_state(dev, old_state); in drm_atomic_helper_commit_modeset_disables()
1253 crtc_set_mode(dev, old_state); in drm_atomic_helper_commit_modeset_disables()
1258 struct drm_atomic_state *old_state) in drm_atomic_helper_commit_writebacks() argument
1264 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { in drm_atomic_helper_commit_writebacks()
1293 struct drm_atomic_state *old_state) in drm_atomic_helper_commit_modeset_enables() argument
1302 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_modeset_enables()
1324 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { in drm_atomic_helper_commit_modeset_enables()
1345 drm_atomic_bridge_pre_enable(encoder->bridge, old_state); in drm_atomic_helper_commit_modeset_enables()
1349 funcs->atomic_enable(encoder, old_state); in drm_atomic_helper_commit_modeset_enables()
1356 drm_atomic_bridge_enable(encoder->bridge, old_state); in drm_atomic_helper_commit_modeset_enables()
1359 drm_atomic_helper_commit_writebacks(dev, old_state); in drm_atomic_helper_commit_modeset_enables()
1432 struct drm_atomic_state *old_state) in drm_atomic_helper_wait_for_vblanks() argument
1443 if (old_state->legacy_cursor_update) in drm_atomic_helper_wait_for_vblanks()
1446 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_wait_for_vblanks()
1455 old_state->crtcs[i].last_vblank_count = drm_crtc_vblank_count(crtc); in drm_atomic_helper_wait_for_vblanks()
1458 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_wait_for_vblanks()
1463 old_state->crtcs[i].last_vblank_count != in drm_atomic_helper_wait_for_vblanks()
1491 struct drm_atomic_state *old_state) in drm_atomic_helper_wait_for_flip_done() argument
1497 struct drm_crtc_commit *commit = old_state->crtcs[i].commit; in drm_atomic_helper_wait_for_flip_done()
1500 crtc = old_state->crtcs[i].ptr; in drm_atomic_helper_wait_for_flip_done()
1511 if (old_state->fake_commit) in drm_atomic_helper_wait_for_flip_done()
1512 complete_all(&old_state->fake_commit->flip_done); in drm_atomic_helper_wait_for_flip_done()
1529 void drm_atomic_helper_commit_tail(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_tail() argument
1531 struct drm_device *dev = old_state->dev; in drm_atomic_helper_commit_tail()
1533 drm_atomic_helper_commit_modeset_disables(dev, old_state); in drm_atomic_helper_commit_tail()
1535 drm_atomic_helper_commit_planes(dev, old_state, 0); in drm_atomic_helper_commit_tail()
1537 drm_atomic_helper_commit_modeset_enables(dev, old_state); in drm_atomic_helper_commit_tail()
1539 drm_atomic_helper_fake_vblank(old_state); in drm_atomic_helper_commit_tail()
1541 drm_atomic_helper_commit_hw_done(old_state); in drm_atomic_helper_commit_tail()
1543 drm_atomic_helper_wait_for_vblanks(dev, old_state); in drm_atomic_helper_commit_tail()
1545 drm_atomic_helper_cleanup_planes(dev, old_state); in drm_atomic_helper_commit_tail()
1559 void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_tail_rpm() argument
1561 struct drm_device *dev = old_state->dev; in drm_atomic_helper_commit_tail_rpm()
1563 drm_atomic_helper_commit_modeset_disables(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1565 drm_atomic_helper_commit_modeset_enables(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1567 drm_atomic_helper_commit_planes(dev, old_state, in drm_atomic_helper_commit_tail_rpm()
1570 drm_atomic_helper_fake_vblank(old_state); in drm_atomic_helper_commit_tail_rpm()
1572 drm_atomic_helper_commit_hw_done(old_state); in drm_atomic_helper_commit_tail_rpm()
1574 drm_atomic_helper_wait_for_vblanks(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1576 drm_atomic_helper_cleanup_planes(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1580 static void commit_tail(struct drm_atomic_state *old_state) in commit_tail() argument
1582 struct drm_device *dev = old_state->dev; in commit_tail()
1604 drm_atomic_helper_wait_for_fences(dev, old_state, false); in commit_tail()
1606 drm_atomic_helper_wait_for_dependencies(old_state); in commit_tail()
1613 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) in commit_tail()
1618 funcs->atomic_commit_tail(old_state); in commit_tail()
1620 drm_atomic_helper_commit_tail(old_state); in commit_tail()
1624 drm_self_refresh_helper_update_avg_times(old_state, in commit_tail()
1628 drm_atomic_helper_commit_cleanup_done(old_state); in commit_tail()
1630 drm_atomic_state_put(old_state); in commit_tail()
2117 void drm_atomic_helper_wait_for_dependencies(struct drm_atomic_state *old_state) in drm_atomic_helper_wait_for_dependencies() argument
2129 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_wait_for_dependencies()
2150 for_each_old_connector_in_state(old_state, conn, old_conn_state, i) { in drm_atomic_helper_wait_for_dependencies()
2171 for_each_old_plane_in_state(old_state, plane, old_plane_state, i) { in drm_atomic_helper_wait_for_dependencies()
2210 void drm_atomic_helper_fake_vblank(struct drm_atomic_state *old_state) in drm_atomic_helper_fake_vblank() argument
2216 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in drm_atomic_helper_fake_vblank()
2222 spin_lock_irqsave(&old_state->dev->event_lock, flags); in drm_atomic_helper_fake_vblank()
2228 spin_unlock_irqrestore(&old_state->dev->event_lock, flags); in drm_atomic_helper_fake_vblank()
2248 void drm_atomic_helper_commit_hw_done(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_hw_done() argument
2255 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_hw_done()
2275 if (old_state->fake_commit) { in drm_atomic_helper_commit_hw_done()
2276 complete_all(&old_state->fake_commit->hw_done); in drm_atomic_helper_commit_hw_done()
2277 complete_all(&old_state->fake_commit->flip_done); in drm_atomic_helper_commit_hw_done()
2293 void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_cleanup_done() argument
2300 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_commit_cleanup_done()
2313 if (old_state->fake_commit) { in drm_atomic_helper_commit_cleanup_done()
2314 complete_all(&old_state->fake_commit->cleanup_done); in drm_atomic_helper_commit_cleanup_done()
2315 WARN_ON(!try_wait_for_completion(&old_state->fake_commit->hw_done)); in drm_atomic_helper_commit_cleanup_done()
2429 struct drm_atomic_state *old_state, in drm_atomic_helper_commit_planes() argument
2440 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_planes()
2454 for_each_oldnew_plane_in_state(old_state, plane, old_plane_state, new_plane_state, i) { in drm_atomic_helper_commit_planes()
2498 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_planes()
2536 struct drm_atomic_state *old_state = old_crtc_state->state; in drm_atomic_helper_commit_planes_on_crtc() local
2538 drm_atomic_get_new_crtc_state(old_state, crtc); in drm_atomic_helper_commit_planes_on_crtc()
2551 drm_atomic_get_old_plane_state(old_state, plane); in drm_atomic_helper_commit_planes_on_crtc()
2553 drm_atomic_get_new_plane_state(old_state, plane); in drm_atomic_helper_commit_planes_on_crtc()
2635 struct drm_atomic_state *old_state) in drm_atomic_helper_cleanup_planes() argument
2641 for_each_oldnew_plane_in_state(old_state, plane, old_plane_state, new_plane_state, i) { in drm_atomic_helper_cleanup_planes()
3244 state->planes[i].old_state = plane->state; in drm_atomic_helper_commit_duplicated_state()
3247 state->crtcs[i].old_state = crtc->state; in drm_atomic_helper_commit_duplicated_state()
3250 state->connectors[i].old_state = connector->state; in drm_atomic_helper_commit_duplicated_state()