Lines Matching refs:old_state

988 crtc_needs_disable(struct drm_crtc_state *old_state,  in crtc_needs_disable()  argument
996 return drm_atomic_crtc_effectively_active(old_state); in crtc_needs_disable()
1003 return old_state->active || in crtc_needs_disable()
1004 (old_state->self_refresh_active && !new_state->enable) || in crtc_needs_disable()
1009 disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) in disable_outputs() argument
1017 for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) { in disable_outputs()
1027 old_crtc_state = drm_atomic_get_old_crtc_state(old_state, old_conn_state->crtc); in disable_outputs()
1031 old_state, in disable_outputs()
1058 drm_atomic_bridge_chain_disable(bridge, old_state); in disable_outputs()
1063 funcs->atomic_disable(encoder, old_state); in disable_outputs()
1072 drm_atomic_bridge_chain_post_disable(bridge, old_state); in disable_outputs()
1075 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in disable_outputs()
1131 struct drm_atomic_state *old_state) in drm_atomic_helper_update_legacy_modeset_state() argument
1140 for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) { in drm_atomic_helper_update_legacy_modeset_state()
1161 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { 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()
1181 drm_atomic_get_new_plane_state(old_state, primary); in drm_atomic_helper_update_legacy_modeset_state()
1213 crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state) in crtc_set_mode() argument
1221 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in crtc_set_mode()
1237 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { in crtc_set_mode()
1289 struct drm_atomic_state *old_state) in drm_atomic_helper_commit_modeset_disables() argument
1291 disable_outputs(dev, old_state); in drm_atomic_helper_commit_modeset_disables()
1293 drm_atomic_helper_update_legacy_modeset_state(dev, old_state); in drm_atomic_helper_commit_modeset_disables()
1294 drm_atomic_helper_calc_timestamping_constants(old_state); in drm_atomic_helper_commit_modeset_disables()
1296 crtc_set_mode(dev, old_state); in drm_atomic_helper_commit_modeset_disables()
1301 struct drm_atomic_state *old_state) in drm_atomic_helper_commit_writebacks() argument
1307 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { in drm_atomic_helper_commit_writebacks()
1336 struct drm_atomic_state *old_state) in drm_atomic_helper_commit_modeset_enables() argument
1345 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_modeset_enables()
1367 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) { in drm_atomic_helper_commit_modeset_enables()
1390 drm_atomic_bridge_chain_pre_enable(bridge, old_state); in drm_atomic_helper_commit_modeset_enables()
1394 funcs->atomic_enable(encoder, old_state); in drm_atomic_helper_commit_modeset_enables()
1401 drm_atomic_bridge_chain_enable(bridge, old_state); in drm_atomic_helper_commit_modeset_enables()
1404 drm_atomic_helper_commit_writebacks(dev, old_state); in drm_atomic_helper_commit_modeset_enables()
1477 struct drm_atomic_state *old_state) in drm_atomic_helper_wait_for_vblanks() argument
1488 if (old_state->legacy_cursor_update) in drm_atomic_helper_wait_for_vblanks()
1491 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { 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()
1508 old_state->crtcs[i].last_vblank_count != in drm_atomic_helper_wait_for_vblanks()
1536 struct drm_atomic_state *old_state) in drm_atomic_helper_wait_for_flip_done() argument
1542 struct drm_crtc_commit *commit = old_state->crtcs[i].commit; in drm_atomic_helper_wait_for_flip_done()
1545 crtc = old_state->crtcs[i].ptr; in drm_atomic_helper_wait_for_flip_done()
1556 if (old_state->fake_commit) in drm_atomic_helper_wait_for_flip_done()
1557 complete_all(&old_state->fake_commit->flip_done); in drm_atomic_helper_wait_for_flip_done()
1574 void drm_atomic_helper_commit_tail(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_tail() argument
1576 struct drm_device *dev = old_state->dev; in drm_atomic_helper_commit_tail()
1578 drm_atomic_helper_commit_modeset_disables(dev, old_state); in drm_atomic_helper_commit_tail()
1580 drm_atomic_helper_commit_planes(dev, old_state, 0); in drm_atomic_helper_commit_tail()
1582 drm_atomic_helper_commit_modeset_enables(dev, old_state); in drm_atomic_helper_commit_tail()
1584 drm_atomic_helper_fake_vblank(old_state); in drm_atomic_helper_commit_tail()
1586 drm_atomic_helper_commit_hw_done(old_state); in drm_atomic_helper_commit_tail()
1588 drm_atomic_helper_wait_for_vblanks(dev, old_state); in drm_atomic_helper_commit_tail()
1590 drm_atomic_helper_cleanup_planes(dev, old_state); in drm_atomic_helper_commit_tail()
1604 void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_tail_rpm() argument
1606 struct drm_device *dev = old_state->dev; in drm_atomic_helper_commit_tail_rpm()
1608 drm_atomic_helper_commit_modeset_disables(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1610 drm_atomic_helper_commit_modeset_enables(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1612 drm_atomic_helper_commit_planes(dev, old_state, in drm_atomic_helper_commit_tail_rpm()
1615 drm_atomic_helper_fake_vblank(old_state); in drm_atomic_helper_commit_tail_rpm()
1617 drm_atomic_helper_commit_hw_done(old_state); in drm_atomic_helper_commit_tail_rpm()
1619 drm_atomic_helper_wait_for_vblanks(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1621 drm_atomic_helper_cleanup_planes(dev, old_state); in drm_atomic_helper_commit_tail_rpm()
1625 static void commit_tail(struct drm_atomic_state *old_state) in commit_tail() argument
1627 struct drm_device *dev = old_state->dev; in commit_tail()
1649 drm_atomic_helper_wait_for_fences(dev, old_state, false); in commit_tail()
1651 drm_atomic_helper_wait_for_dependencies(old_state); in commit_tail()
1658 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) in commit_tail()
1663 funcs->atomic_commit_tail(old_state); in commit_tail()
1665 drm_atomic_helper_commit_tail(old_state); in commit_tail()
1669 drm_self_refresh_helper_update_avg_times(old_state, in commit_tail()
1673 drm_atomic_helper_commit_cleanup_done(old_state); in commit_tail()
1675 drm_atomic_state_put(old_state); in commit_tail()
2174 void drm_atomic_helper_wait_for_dependencies(struct drm_atomic_state *old_state) in drm_atomic_helper_wait_for_dependencies() argument
2186 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_wait_for_dependencies()
2207 for_each_old_connector_in_state(old_state, conn, old_conn_state, i) { in drm_atomic_helper_wait_for_dependencies()
2228 for_each_old_plane_in_state(old_state, plane, old_plane_state, i) { in drm_atomic_helper_wait_for_dependencies()
2269 void drm_atomic_helper_fake_vblank(struct drm_atomic_state *old_state) in drm_atomic_helper_fake_vblank() argument
2275 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) { in drm_atomic_helper_fake_vblank()
2281 spin_lock_irqsave(&old_state->dev->event_lock, flags); in drm_atomic_helper_fake_vblank()
2287 spin_unlock_irqrestore(&old_state->dev->event_lock, flags); in drm_atomic_helper_fake_vblank()
2307 void drm_atomic_helper_commit_hw_done(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_hw_done() argument
2314 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_hw_done()
2334 if (old_state->fake_commit) { in drm_atomic_helper_commit_hw_done()
2335 complete_all(&old_state->fake_commit->hw_done); in drm_atomic_helper_commit_hw_done()
2336 complete_all(&old_state->fake_commit->flip_done); in drm_atomic_helper_commit_hw_done()
2352 void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *old_state) in drm_atomic_helper_commit_cleanup_done() argument
2359 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) { in drm_atomic_helper_commit_cleanup_done()
2372 if (old_state->fake_commit) { in drm_atomic_helper_commit_cleanup_done()
2373 complete_all(&old_state->fake_commit->cleanup_done); in drm_atomic_helper_commit_cleanup_done()
2374 WARN_ON(!try_wait_for_completion(&old_state->fake_commit->hw_done)); in drm_atomic_helper_commit_cleanup_done()
2488 struct drm_atomic_state *old_state, in drm_atomic_helper_commit_planes() argument
2499 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) { in drm_atomic_helper_commit_planes()
2513 for_each_oldnew_plane_in_state(old_state, plane, old_plane_state, new_plane_state, i) { 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()
2595 struct drm_atomic_state *old_state = old_crtc_state->state; 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()
2610 drm_atomic_get_old_plane_state(old_state, plane); in drm_atomic_helper_commit_planes_on_crtc()
2612 drm_atomic_get_new_plane_state(old_state, plane); in drm_atomic_helper_commit_planes_on_crtc()
2694 struct drm_atomic_state *old_state) in drm_atomic_helper_cleanup_planes() argument
2700 for_each_oldnew_plane_in_state(old_state, plane, old_plane_state, new_plane_state, i) { in drm_atomic_helper_cleanup_planes()
3303 state->planes[i].old_state = plane->state; in drm_atomic_helper_commit_duplicated_state()
3306 state->crtcs[i].old_state = crtc->state; in drm_atomic_helper_commit_duplicated_state()
3309 state->connectors[i].old_state = connector->state; in drm_atomic_helper_commit_duplicated_state()