Lines Matching defs:commit

50  * This helper library provides implementations of check and commit functions on
57 * drm_atomic_helper_check() and for the commit callback with
327 * atomic check or commit, this is racy. But that's OK: all we care
1139 * Drivers can use this for building their own atomic commit if they don't have
1294 * drm_atomic_helper_commit_modeset_disables - modeset commit to disable outputs
1302 * drm_atomic_helper_commit_planes(), which is what the default commit function
1341 * drm_atomic_helper_commit_modeset_enables - modeset commit to enable outputs
1349 * drm_atomic_helper_commit_planes(), which is what the default commit function
1381 else if (funcs->commit)
1382 funcs->commit(crtc);
1416 else if (funcs->commit)
1417 funcs->commit(encoder);
1440 * around depending upon whether an atomic commit is blocking or
1441 * non-blocking. For non-blocking commit all waiting needs to happen after
1484 * Helper to, after atomic commit, wait for vblanks on all affected
1490 * Drivers using the nonblocking commit tracking support initialized by calling
1544 * Helper to, after atomic commit, wait for page flips on all affected
1551 * This requires that drivers use the nonblocking commit tracking support
1561 struct drm_crtc_commit *commit = old_state->crtcs[i].commit;
1566 if (!crtc || !commit)
1569 ret = wait_for_completion_timeout(&commit->flip_done, 10 * HZ);
1581 * drm_atomic_helper_commit_tail - commit atomic update to hardware
1587 * enabled to perform a commit. Otherwise, see
1614 * drm_atomic_helper_commit_tail_rpm - commit atomic update to hardware
1620 * commit. Otherwise, one should use the default implementation
1657 * We're measuring the _entire_ commit, so the time will vary depending
1710 * This helper will check if it is possible to commit the state asynchronously.
1714 * It will return 0 if the commit can happen in an asynchronous fashion or error
1716 * fails the commit should be treated like a normal synchronous commit.
1753 * Don't do an async update if there is an outstanding commit modifying
1757 if (old_plane_state->commit &&
1758 !try_wait_for_completion(&old_plane_state->commit->hw_done))
1766 * drm_atomic_helper_async_commit - commit state asynchronously
1814 * drm_atomic_helper_commit - commit validated state object
1866 * when the hw goes bonghits. Which means we can commit the new state on
1889 * NOTE: Commit work has multiple phases, first hardware commit, then
1909 * DOC: implementing nonblocking commit
1914 * asynchronous context used to commit the hardware state.
1923 * 2. Synchronize with any outstanding nonblocking commit worker threads which
1931 * individual commit in parallel - userspace is supposed to do that if it cares.
1942 * (nonblocking) commits, both due to locking and due to commit sequencing
1947 * locks means concurrent callers never see inconsistent state. Note that commit
1954 * commit helpers: a) pre-plane commit b) plane commit c) post-plane commit and
1963 struct drm_crtc_commit *commit, *stall_commit = NULL;
1970 list_for_each_entry(commit, &crtc->commit_list, commit_entry) {
1972 completed = try_wait_for_completion(&commit->flip_done);
1974 * commit with nonblocking ones. */
1980 stall_commit = drm_crtc_commit_get(commit);
1992 * stalling on 2nd previous commit means triple-buffer won't ever stall.
2007 struct drm_crtc_commit *commit = container_of(completion,
2008 typeof(*commit),
2011 drm_crtc_commit_put(commit);
2014 static void init_commit(struct drm_crtc_commit *commit, struct drm_crtc *crtc)
2016 init_completion(&commit->flip_done);
2017 init_completion(&commit->hw_done);
2018 init_completion(&commit->cleanup_done);
2019 INIT_LIST_HEAD(&commit->commit_entry);
2020 kref_init(&commit->ref);
2021 commit->crtc = crtc;
2032 return new_crtc_state->commit;
2047 * drm_atomic_helper_setup_commit - setup possibly nonblocking commit
2052 * nonblocking commits. Drivers using the nonblocking commit infrastructure
2060 * and its stall parameter, for when a driver's commit hooks look at the
2063 * Completion of the hardware commit step must be signalled using
2098 struct drm_crtc_commit *commit;
2102 commit = kzalloc(sizeof(*commit), GFP_KERNEL);
2103 if (!commit)
2106 init_commit(commit, crtc);
2108 new_crtc_state->commit = commit;
2118 complete_all(&commit->flip_done);
2124 complete_all(&commit->flip_done);
2129 commit->event = kzalloc(sizeof(*commit->event),
2131 if (!commit->event)
2134 new_crtc_state->event = commit->event;
2137 new_crtc_state->event->base.completion = &commit->flip_done;
2139 drm_crtc_commit_get(commit);
2141 commit->abort_completion = true;
2143 state->crtcs[i].commit = commit;
2144 drm_crtc_commit_get(commit);
2149 * commit with nonblocking ones. */
2150 if (nonblock && old_conn_state->commit &&
2151 !try_wait_for_completion(&old_conn_state->commit->flip_done))
2155 commit = crtc_or_fake_commit(state, new_conn_state->crtc ?: old_conn_state->crtc);
2156 if (!commit)
2159 new_conn_state->commit = drm_crtc_commit_get(commit);
2164 * commit with nonblocking ones. */
2165 if (nonblock && old_plane_state->commit &&
2166 !try_wait_for_completion(&old_plane_state->commit->flip_done))
2170 commit = crtc_or_fake_commit(state, new_plane_state->crtc ?: old_plane_state->crtc);
2171 if (!commit)
2174 new_plane_state->commit = drm_crtc_commit_get(commit);
2201 struct drm_crtc_commit *commit;
2206 commit = old_crtc_state->commit;
2208 if (!commit)
2211 ret = wait_for_completion_timeout(&commit->hw_done,
2219 ret = wait_for_completion_timeout(&commit->flip_done,
2227 commit = old_conn_state->commit;
2229 if (!commit)
2232 ret = wait_for_completion_timeout(&commit->hw_done,
2240 ret = wait_for_completion_timeout(&commit->flip_done,
2248 commit = old_plane_state->commit;
2250 if (!commit)
2253 ret = wait_for_completion_timeout(&commit->hw_done,
2261 ret = wait_for_completion_timeout(&commit->flip_done,
2312 * drm_atomic_helper_commit_hw_done - setup possible nonblocking commit
2315 * This function is used to signal completion of the hardware commit step. After
2330 struct drm_crtc_commit *commit;
2334 commit = new_crtc_state->commit;
2335 if (!commit)
2339 * copy new_crtc_state->commit to old_crtc_state->commit,
2343 if (old_crtc_state->commit)
2344 drm_crtc_commit_put(old_crtc_state->commit);
2346 old_crtc_state->commit = drm_crtc_commit_get(commit);
2350 complete_all(&commit->hw_done);
2361 * drm_atomic_helper_commit_cleanup_done - signal completion of commit
2375 struct drm_crtc_commit *commit;
2379 commit = old_crtc_state->commit;
2380 if (WARN_ON(!commit))
2383 complete_all(&commit->cleanup_done);
2384 WARN_ON(!try_wait_for_completion(&commit->hw_done));
2387 list_del(&commit->commit_entry);
2399 * drm_atomic_helper_prepare_planes - prepare plane resources before commit
2466 * drm_atomic_helper_commit_planes - commit plane state
2593 * drm_atomic_helper_commit_planes_on_crtc - commit plane state for a CRTC
2607 * resolve them through ordering of commit calls or through some other means.
2701 * drm_atomic_helper_cleanup_planes - cleanup plane resources after commit
2724 * This might be called before swapping when commit is aborted,
2760 * 4. Actually commit the hardware state.
2785 struct drm_crtc_commit *commit;
2800 commit = old_crtc_state->commit;
2802 if (!commit)
2805 ret = wait_for_completion_interruptible(&commit->hw_done);
2811 commit = old_conn_state->commit;
2813 if (!commit)
2816 ret = wait_for_completion_interruptible(&commit->hw_done);
2822 commit = old_plane_state->commit;
2824 if (!commit)
2827 ret = wait_for_completion_interruptible(&commit->hw_done);
2852 if (new_crtc_state->commit) {
2854 list_add(&new_crtc_state->commit->commit_entry,
2858 new_crtc_state->commit->event = NULL;
3294 * drm_atomic_helper_commit_duplicated_state - commit duplicated state
3295 * @state: duplicated atomic state to commit
3296 * @ctx: pointer to acquire_ctx to use for commit.
3300 * be fixed up before commit.