[PATCH v7 13/14] drm/atomic-helper: Export drm_atomic_helper_wait_for_fences

Philipp Zabel
2015-11-30T21:07:55Z

From: Daniel Kurtz <djkurtz@chromium.org>

This is useful for drivers that want to implement async commits, but
need to wait on per-plane fences.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/gpu/drm/drm_atomic_helper.c | 7 ++++---
include/drm/drm_atomic_helper.h | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 0c6f621..ce84d99 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -886,8 +886,8 @@ 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,
- struct drm_atomic_state *state)
+void drm_atomic_helper_wait_for_fences(struct drm_device *dev,
+ struct drm_atomic_state *state)
{
struct drm_plane *plane;
struct drm_plane_state *plane_state;
@@ -904,6 +904,7 @@ static void wait_for_fences(struct drm_device *dev,
plane->state->fence = NULL;
}
}
+EXPORT_SYMBOL(drm_atomic_helper_wait_for_fences);

static bool framebuffer_changed(struct drm_device *dev,
struct drm_atomic_state *old_state,
@@ -1049,7 +1050,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);

diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index 8cba54a..92b5699 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -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);
void drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
struct drm_atomic_state *old_state);