drm/msm: Add .commit() callback to msm_kms functions
authorJeykumar Sankaran <jsanka@codeaurora.org>
Wed, 27 Jun 2018 17:49:23 +0000 (13:49 -0400)
committerSean Paul <seanpaul@chromium.org>
Thu, 26 Jul 2018 14:40:16 +0000 (10:40 -0400)
Called right before wait_for_commit_done() to perform kickoff for
active crtcs.

Changes in v3:
- None

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
[seanpaul split this out of the megapatch]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_atomic.c
drivers/gpu/drm/msm/msm_kms.h

index e6f1e25c60afdb2f1529ad450656d075c6172b88..c1f1779c980f615ce8b339d0f34f351990d8ff5d 100644 (file)
@@ -71,6 +71,11 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
 
        drm_atomic_helper_commit_modeset_enables(dev, state);
 
+       if (kms->funcs->commit) {
+               DRM_DEBUG_ATOMIC("triggering commit\n");
+               kms->funcs->commit(kms, state);
+       }
+
        msm_atomic_wait_for_commit_done(dev, state);
 
        kms->funcs->complete_commit(kms, state);
index 76c14221ffdf9ca44c3f6fe9812b8641737c1a17..761bb07cd7bf31a4dde120fefa6f42dd81c738a4 100644 (file)
@@ -42,6 +42,7 @@ struct msm_kms_funcs {
        void (*disable_vblank)(struct msm_kms *kms, struct drm_crtc *crtc);
        /* modeset, bracketing atomic_commit(): */
        void (*prepare_commit)(struct msm_kms *kms, struct drm_atomic_state *state);
+       void (*commit)(struct msm_kms *kms, struct drm_atomic_state *state);
        void (*complete_commit)(struct msm_kms *kms, struct drm_atomic_state *state);
        /* functions to wait for atomic commit completed on each CRTC */
        void (*wait_for_crtc_commit_done)(struct msm_kms *kms,