Skip to content

Commit

Permalink
drm/atomic: export drm_atomic_helper_wait_for_fences()
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1458342904-23326-3-git-send-email-robdclark@gmail.com
  • Loading branch information
Rob Clark authored and Daniel Vetter committed Mar 31, 2016
1 parent 00c9672 commit 4c5b7f3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/gpu/drm/drm_atomic_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,17 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
}
EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_enables);

static void wait_for_fences(struct drm_device *dev,
/**
* drm_atomic_helper_wait_for_fences - wait for fences stashed in plane state
* @dev: DRM device
* @state: atomic state object with old state structures
*
* For implicit sync, driver should fish the exclusive fence out from the
* incoming fb's and stash it in the drm_plane_state. This is called after
* drm_atomic_helper_swap_state() so it uses the current plane state (and
* just uses the atomic state to find the changed planes)
*/
void drm_atomic_helper_wait_for_fences(struct drm_device *dev,
struct drm_atomic_state *state)
{
struct drm_plane *plane;
Expand All @@ -1002,6 +1012,7 @@ static void wait_for_fences(struct drm_device *dev,
plane->state->fence = NULL;
}
}
EXPORT_SYMBOL(drm_atomic_helper_wait_for_fences);

/**
* drm_atomic_helper_framebuffer_changed - check if framebuffer has changed
Expand Down Expand Up @@ -1163,7 +1174,7 @@ int drm_atomic_helper_commit(struct drm_device *dev,
* current layout.
*/

wait_for_fences(dev, state);
drm_atomic_helper_wait_for_fences(dev, state);

drm_atomic_helper_commit_modeset_disables(dev, state);

Expand Down
2 changes: 2 additions & 0 deletions include/drm/drm_atomic_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ int drm_atomic_helper_commit(struct drm_device *dev,
struct drm_atomic_state *state,
bool async);

void drm_atomic_helper_wait_for_fences(struct drm_device *dev,
struct drm_atomic_state *state);
bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev,
struct drm_atomic_state *old_state,
struct drm_crtc *crtc);
Expand Down

0 comments on commit 4c5b7f3

Please sign in to comment.