diff options
author | Rob Clark <robdclark@chromium.org> | 2019-08-29 09:45:14 -0700 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2019-09-03 16:17:01 -0700 |
commit | 9f6b65642bd2d7ec1fc2eb675cf10a55f29417e2 (patch) | |
tree | 00c7928446631b9e4c0f364d6eb388c0ba0e7b9c /drivers/gpu/drm/msm/msm_atomic.c | |
parent | 80b4b4a703d6e4fb966e5c6a7c74a06001bf7d19 (diff) |
drm/msm: add kms->flush_commit()
Add ->flush_commit(crtc_mask). Currently a no-op, but kms backends
should migrate writing flush registers to this hook, so we can decouple
pushing updates to hardware, and flushing the updates.
Once we add async commit support, the hw updates will be pushed down to
the hw synchronously, but flushing the updates will be deferred until as
close to vblank as possible, so that multiple updates can be combined in
a single frame.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_atomic.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_atomic.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index 1717f430bfb4..7a1c47cd7350 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c @@ -51,16 +51,21 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state) kms->funcs->prepare_commit(kms, state); + /* + * Push atomic updates down to hardware: + */ drm_atomic_helper_commit_modeset_disables(dev, state); - drm_atomic_helper_commit_planes(dev, state, 0); - drm_atomic_helper_commit_modeset_enables(dev, state); + /* + * Flush hardware updates: + */ if (kms->funcs->commit) { DRM_DEBUG_ATOMIC("triggering commit\n"); kms->funcs->commit(kms, state); } + kms->funcs->flush_commit(kms, crtc_mask); kms->funcs->wait_flush(kms, crtc_mask); kms->funcs->complete_commit(kms, crtc_mask); |