aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2018-02-28 14:18:58 -0500
committerRob Clark <robdclark@gmail.com>2018-06-04 12:50:09 -0400
commit347b90b406ff6b6f3c9f666a527eb46e0fcd7aaf (patch)
tree037b5f747129e72e86a8d52dac1d774a52359f66 /drivers/gpu
parentdrm/msm: Don't subclass drm_atomic_state anymore (diff)
downloadlinux-dev-347b90b406ff6b6f3c9f666a527eb46e0fcd7aaf.tar.xz
linux-dev-347b90b406ff6b6f3c9f666a527eb46e0fcd7aaf.zip
drm/msm: Refactor complete_commit() to look more the helpers
Factor out the commit_tail() portions of complete_commit() into a separate function to facilitate moving to the atomic helpers in future patches. Changes in v2: - None Changes in v3: - Rebased on Archit's private_obj set Changes in v4: - None Cc: Jeykumar Sankaran <jsanka@codeaurora.org> Reviewed-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/msm_atomic.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c
index 9d0a0ca1f0cb..c18f0bee20d4 100644
--- a/drivers/gpu/drm/msm/msm_atomic.c
+++ b/drivers/gpu/drm/msm/msm_atomic.c
@@ -97,18 +97,12 @@ static void msm_atomic_wait_for_commit_done(struct drm_device *dev,
}
}
-/* The (potentially) asynchronous part of the commit. At this point
- * nothing can fail short of armageddon.
- */
-static void complete_commit(struct msm_commit *c, bool async)
+static void msm_atomic_commit_tail(struct drm_atomic_state *state)
{
- struct drm_atomic_state *state = c->state;
struct drm_device *dev = state->dev;
struct msm_drm_private *priv = dev->dev_private;
struct msm_kms *kms = priv->kms;
- drm_atomic_helper_wait_for_fences(dev, state, false);
-
kms->funcs->prepare_commit(kms, state);
drm_atomic_helper_commit_modeset_disables(dev, state);
@@ -135,6 +129,19 @@ static void complete_commit(struct msm_commit *c, bool async)
drm_atomic_helper_cleanup_planes(dev, state);
kms->funcs->complete_commit(kms, state);
+}
+
+/* The (potentially) asynchronous part of the commit. At this point
+ * nothing can fail short of armageddon.
+ */
+static void complete_commit(struct msm_commit *c)
+{
+ struct drm_atomic_state *state = c->state;
+ struct drm_device *dev = state->dev;
+
+ drm_atomic_helper_wait_for_fences(dev, state, false);
+
+ msm_atomic_commit_tail(state);
drm_atomic_state_put(state);
@@ -143,7 +150,7 @@ static void complete_commit(struct msm_commit *c, bool async)
static void commit_worker(struct work_struct *work)
{
- complete_commit(container_of(work, struct msm_commit, work), true);
+ complete_commit(container_of(work, struct msm_commit, work));
}
/**
@@ -248,7 +255,7 @@ int msm_atomic_commit(struct drm_device *dev,
return 0;
}
- complete_commit(c, false);
+ complete_commit(c);
return 0;