| @@ -984,7 +984,17 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, · 983 unmodified lines |
| 984 | 984 | } |
| 985 | 985 | EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_enables); |
| 986 | 986 | |
| 987 | | −static void wait_for_fences(struct drm_device *dev, |
| 987 | +/** |
| 988 | + * drm_atomic_helper_wait_for_fences - wait for fences stashed in plane state |
| 989 | + * @dev: DRM device |
| 990 | + * @state: atomic state object with old state structures |
| 991 | + * |
| 992 | + * For implicit sync, driver should fish the exclusive fence out from the |
| 993 | + * incoming fb's and stash it in the drm_plane_state. This is called after |
| 994 | + * drm_atomic_helper_swap_state() so it uses the current plane state (and |
| 995 | + * just uses the atomic state to find the changed planes) |
| 996 | + */ |
| 997 | +void drm_atomic_helper_wait_for_fences(struct drm_device *dev, |
| 988 | 998 | struct drm_atomic_state *state) |
| 989 | 999 | { |
| 990 | 1000 | struct drm_plane *plane; |
| @@ -1002,6 +1012,7 @@ static void wait_for_fences(struct drm_device *dev, · 11 unmodified lines |
| 1002 | 1012 | plane->state->fence = NULL; |
| 1003 | 1013 | } |
| 1004 | 1014 | } |
| 1015 | +EXPORT_SYMBOL(drm_atomic_helper_wait_for_fences); |
| 1005 | 1016 | |
| 1006 | 1017 | /** |
| 1007 | 1018 | * drm_atomic_helper_framebuffer_changed - check if framebuffer has changed |
| @@ -1163,7 +1174,7 @@ int drm_atomic_helper_commit(struct drm_device *dev, · 155 unmodified lines |
| 1163 | 1174 | * current layout. |
| 1164 | 1175 | */ |
| 1165 | 1176 | |
| 1166 | | − wait_for_fences(dev, state); |
| 1177 | + drm_atomic_helper_wait_for_fences(dev, state); |
| 1167 | 1178 | |
| 1168 | 1179 | drm_atomic_helper_commit_modeset_disables(dev, state); |
| 1169 | 1180 | |