diff options
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 40c7b268a9bc..297713bab549 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
| @@ -1114,13 +1114,13 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_vblanks); | |||
| 1114 | * drm_atomic_helper_commit - commit validated state object | 1114 | * drm_atomic_helper_commit - commit validated state object |
| 1115 | * @dev: DRM device | 1115 | * @dev: DRM device |
| 1116 | * @state: the driver state object | 1116 | * @state: the driver state object |
| 1117 | * @async: asynchronous commit | 1117 | * @nonblocking: whether nonblocking behavior is requested. |
| 1118 | * | 1118 | * |
| 1119 | * This function commits a with drm_atomic_helper_check() pre-validated state | 1119 | * This function commits a with drm_atomic_helper_check() pre-validated state |
| 1120 | * object. This can still fail when e.g. the framebuffer reservation fails. For | 1120 | * object. This can still fail when e.g. the framebuffer reservation fails. For |
| 1121 | * now this doesn't implement asynchronous commits. | 1121 | * now this doesn't implement nonblocking commits. |
| 1122 | * | 1122 | * |
| 1123 | * Note that right now this function does not support async commits, and hence | 1123 | * Note that right now this function does not support nonblocking commits, hence |
| 1124 | * driver writers must implement their own version for now. Also note that the | 1124 | * driver writers must implement their own version for now. Also note that the |
| 1125 | * default ordering of how the various stages are called is to match the legacy | 1125 | * default ordering of how the various stages are called is to match the legacy |
| 1126 | * modeset helper library closest. One peculiarity of that is that it doesn't | 1126 | * modeset helper library closest. One peculiarity of that is that it doesn't |
| @@ -1141,11 +1141,11 @@ EXPORT_SYMBOL(drm_atomic_helper_wait_for_vblanks); | |||
| 1141 | */ | 1141 | */ |
| 1142 | int drm_atomic_helper_commit(struct drm_device *dev, | 1142 | int drm_atomic_helper_commit(struct drm_device *dev, |
| 1143 | struct drm_atomic_state *state, | 1143 | struct drm_atomic_state *state, |
| 1144 | bool async) | 1144 | bool nonblock) |
| 1145 | { | 1145 | { |
| 1146 | int ret; | 1146 | int ret; |
| 1147 | 1147 | ||
| 1148 | if (async) | 1148 | if (nonblock) |
| 1149 | return -EBUSY; | 1149 | return -EBUSY; |
| 1150 | 1150 | ||
| 1151 | ret = drm_atomic_helper_prepare_planes(dev, state); | 1151 | ret = drm_atomic_helper_prepare_planes(dev, state); |
| @@ -1195,20 +1195,20 @@ int drm_atomic_helper_commit(struct drm_device *dev, | |||
| 1195 | EXPORT_SYMBOL(drm_atomic_helper_commit); | 1195 | EXPORT_SYMBOL(drm_atomic_helper_commit); |
| 1196 | 1196 | ||
| 1197 | /** | 1197 | /** |
| 1198 | * DOC: implementing async commit | 1198 | * DOC: implementing nonblocking commit |
| 1199 | * | 1199 | * |
| 1200 | * For now the atomic helpers don't support async commit directly. If there is | 1200 | * For now the atomic helpers don't support nonblocking commit directly. If |
| 1201 | * real need it could be added though, using the dma-buf fence infrastructure | 1201 | * there is real need it could be added though, using the dma-buf fence |
| 1202 | * for generic synchronization with outstanding rendering. | 1202 | * infrastructure for generic synchronization with outstanding rendering. |
| 1203 | * | 1203 | * |
| 1204 | * For now drivers have to implement async commit themselves, with the following | 1204 | * For now drivers have to implement nonblocking commit themselves, with the |
| 1205 | * sequence being the recommended one: | 1205 | * following sequence being the recommended one: |
| 1206 | * | 1206 | * |
| 1207 | * 1. Run drm_atomic_helper_prepare_planes() first. This is the only function | 1207 | * 1. Run drm_atomic_helper_prepare_planes() first. This is the only function |
| 1208 | * which commit needs to call which can fail, so we want to run it first and | 1208 | * which commit needs to call which can fail, so we want to run it first and |
| 1209 | * synchronously. | 1209 | * synchronously. |
| 1210 | * | 1210 | * |
| 1211 | * 2. Synchronize with any outstanding asynchronous commit worker threads which | 1211 | * 2. Synchronize with any outstanding nonblocking commit worker threads which |
| 1212 | * might be affected the new state update. This can be done by either cancelling | 1212 | * might be affected the new state update. This can be done by either cancelling |
| 1213 | * or flushing the work items, depending upon whether the driver can deal with | 1213 | * or flushing the work items, depending upon whether the driver can deal with |
| 1214 | * cancelled updates. Note that it is important to ensure that the framebuffer | 1214 | * cancelled updates. Note that it is important to ensure that the framebuffer |
| @@ -1222,9 +1222,9 @@ EXPORT_SYMBOL(drm_atomic_helper_commit); | |||
| 1222 | * 3. The software state is updated synchronously with | 1222 | * 3. The software state is updated synchronously with |
| 1223 | * drm_atomic_helper_swap_state(). Doing this under the protection of all modeset | 1223 | * drm_atomic_helper_swap_state(). Doing this under the protection of all modeset |
| 1224 | * locks means concurrent callers never see inconsistent state. And doing this | 1224 | * locks means concurrent callers never see inconsistent state. And doing this |
| 1225 | * while it's guaranteed that no relevant async worker runs means that async | 1225 | * while it's guaranteed that no relevant nonblocking worker runs means that |
| 1226 | * workers do not need grab any locks. Actually they must not grab locks, for | 1226 | * nonblocking workers do not need grab any locks. Actually they must not grab |
| 1227 | * otherwise the work flushing will deadlock. | 1227 | * locks, for otherwise the work flushing will deadlock. |
| 1228 | * | 1228 | * |
| 1229 | * 4. Schedule a work item to do all subsequent steps, using the split-out | 1229 | * 4. Schedule a work item to do all subsequent steps, using the split-out |
| 1230 | * commit helpers: a) pre-plane commit b) plane commit c) post-plane commit and | 1230 | * commit helpers: a) pre-plane commit b) plane commit c) post-plane commit and |
