Lines Matching refs:old_state

1093 crtc_needs_disable(struct drm_crtc_state *old_state,
1101 return drm_atomic_crtc_effectively_active(old_state);
1108 if (old_state->self_refresh_active &&
1109 old_state->crtc != new_state->crtc)
1118 return old_state->active ||
1119 (old_state->self_refresh_active && !new_state->active) ||
1124 disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
1132 for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) {
1144 old_crtc_state = drm_atomic_get_old_crtc_state(old_state, old_conn_state->crtc);
1148 old_state,
1175 drm_atomic_bridge_chain_disable(bridge, old_state);
1180 funcs->atomic_disable(encoder, old_state);
1189 drm_atomic_bridge_chain_post_disable(bridge, old_state);
1192 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
1213 funcs->atomic_disable(crtc, old_state);
1241 * @old_state: atomic state object with old state structures
1257 struct drm_atomic_state *old_state)
1266 for_each_oldnew_connector_in_state(old_state, connector, old_conn_state, new_conn_state, i) {
1287 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) {
1299 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
1307 drm_atomic_get_new_plane_state(old_state, primary);
1339 crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
1347 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
1363 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) {
1403 * @old_state: atomic state object with old state structures
1415 struct drm_atomic_state *old_state)
1417 disable_outputs(dev, old_state);
1419 drm_atomic_helper_update_legacy_modeset_state(dev, old_state);
1420 drm_atomic_helper_calc_timestamping_constants(old_state);
1422 crtc_set_mode(dev, old_state);
1427 struct drm_atomic_state *old_state)
1433 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) {
1442 funcs->atomic_commit(connector, old_state);
1450 * @old_state: atomic state object with old state structures
1462 struct drm_atomic_state *old_state)
1471 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
1487 funcs->atomic_enable(crtc, old_state);
1493 for_each_new_connector_in_state(old_state, connector, new_conn_state, i) {
1516 drm_atomic_bridge_chain_pre_enable(bridge, old_state);
1520 funcs->atomic_enable(encoder, old_state);
1527 drm_atomic_bridge_chain_enable(bridge, old_state);
1530 drm_atomic_helper_commit_writebacks(dev, old_state);
1632 * @old_state: atomic state object with old state structures
1646 struct drm_atomic_state *old_state)
1657 if (old_state->legacy_cursor_update)
1660 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
1669 old_state->crtcs[i].last_vblank_count = drm_crtc_vblank_count(crtc);
1672 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {
1677 old_state->crtcs[i].last_vblank_count !=
1692 * @old_state: atomic state object with old state structures
1705 struct drm_atomic_state *old_state)
1711 struct drm_crtc_commit *commit = old_state->crtcs[i].commit;
1714 crtc = old_state->crtcs[i].ptr;
1725 if (old_state->fake_commit)
1726 complete_all(&old_state->fake_commit->flip_done);
1732 * @old_state: atomic state object with old state structures
1743 void drm_atomic_helper_commit_tail(struct drm_atomic_state *old_state)
1745 struct drm_device *dev = old_state->dev;
1747 drm_atomic_helper_commit_modeset_disables(dev, old_state);
1749 drm_atomic_helper_commit_planes(dev, old_state, 0);
1751 drm_atomic_helper_commit_modeset_enables(dev, old_state);
1753 drm_atomic_helper_fake_vblank(old_state);
1755 drm_atomic_helper_commit_hw_done(old_state);
1757 drm_atomic_helper_wait_for_vblanks(dev, old_state);
1759 drm_atomic_helper_cleanup_planes(dev, old_state);
1765 * @old_state: new modeset state to be committed
1773 void drm_atomic_helper_commit_tail_rpm(struct drm_atomic_state *old_state)
1775 struct drm_device *dev = old_state->dev;
1777 drm_atomic_helper_commit_modeset_disables(dev, old_state);
1779 drm_atomic_helper_commit_modeset_enables(dev, old_state);
1781 drm_atomic_helper_commit_planes(dev, old_state,
1784 drm_atomic_helper_fake_vblank(old_state);
1786 drm_atomic_helper_commit_hw_done(old_state);
1788 drm_atomic_helper_wait_for_vblanks(dev, old_state);
1790 drm_atomic_helper_cleanup_planes(dev, old_state);
1794 static void commit_tail(struct drm_atomic_state *old_state)
1796 struct drm_device *dev = old_state->dev;
1818 drm_atomic_helper_wait_for_fences(dev, old_state, false);
1820 drm_atomic_helper_wait_for_dependencies(old_state);
1827 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i)
1832 funcs->atomic_commit_tail(old_state);
1834 drm_atomic_helper_commit_tail(old_state);
1838 drm_self_refresh_helper_update_avg_times(old_state,
1842 drm_atomic_helper_commit_cleanup_done(old_state);
1844 drm_atomic_state_put(old_state);
2388 * @old_state: atomic state object with old state structures
2391 * @old_state to both be committed to the hardware (as signalled by
2398 void drm_atomic_helper_wait_for_dependencies(struct drm_atomic_state *old_state)
2409 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {
2417 for_each_old_connector_in_state(old_state, conn, old_conn_state, i) {
2425 for_each_old_plane_in_state(old_state, plane, old_plane_state, i) {
2437 * @old_state: atomic state object with old state structures
2453 void drm_atomic_helper_fake_vblank(struct drm_atomic_state *old_state)
2459 for_each_new_crtc_in_state(old_state, crtc, new_crtc_state, i) {
2465 spin_lock_irqsave(&old_state->dev->event_lock, flags);
2471 spin_unlock_irqrestore(&old_state->dev->event_lock, flags);
2478 * @old_state: atomic state object with old state structures
2491 void drm_atomic_helper_commit_hw_done(struct drm_atomic_state *old_state)
2498 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
2518 if (old_state->fake_commit) {
2519 complete_all(&old_state->fake_commit->hw_done);
2520 complete_all(&old_state->fake_commit->flip_done);
2527 * @old_state: atomic state object with old state structures
2529 * This signals completion of the atomic update @old_state, including any
2536 void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *old_state)
2543 for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {
2556 if (old_state->fake_commit) {
2557 complete_all(&old_state->fake_commit->cleanup_done);
2558 WARN_ON(!try_wait_for_completion(&old_state->fake_commit->hw_done));
2696 * @old_state: atomic state object with old state structures
2704 * It still requires the global state object @old_state to know which planes and
2735 struct drm_atomic_state *old_state,
2746 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
2757 funcs->atomic_begin(crtc, old_state);
2760 for_each_oldnew_plane_in_state(old_state, plane, old_plane_state, new_plane_state, i) {
2798 funcs->atomic_disable(plane, old_state);
2800 funcs->atomic_update(plane, old_state);
2804 funcs->atomic_enable(plane, old_state);
2809 for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
2820 funcs->atomic_flush(crtc, old_state);
2827 for_each_old_plane_in_state(old_state, plane, old_plane_state, i) {
2858 struct drm_atomic_state *old_state = old_crtc_state->state;
2860 drm_atomic_get_new_crtc_state(old_state, crtc);
2869 crtc_funcs->atomic_begin(crtc, old_state);
2873 drm_atomic_get_old_plane_state(old_state, plane);
2875 drm_atomic_get_new_plane_state(old_state, plane);
2890 plane_funcs->atomic_disable(plane, old_state);
2892 plane_funcs->atomic_update(plane, old_state);
2896 plane_funcs->atomic_enable(plane, old_state);
2902 crtc_funcs->atomic_flush(crtc, old_state);
2954 * @old_state: atomic state object with old state structures
2957 * configuration. Hence the old configuration must be perserved in @old_state to
2965 struct drm_atomic_state *old_state)
2971 for_each_old_plane_in_state(old_state, plane, old_plane_state, i) {
3567 state->planes[i].old_state = plane->state;
3570 state->crtcs[i].old_state = crtc->state;
3573 state->connectors[i].old_state = connector->state;