drm/msm: async commit support
authorRob Clark <robdclark@chromium.org>
Thu, 29 Aug 2019 16:45:16 +0000 (09:45 -0700)
committerRob Clark <robdclark@chromium.org>
Tue, 3 Sep 2019 23:17:01 +0000 (16:17 -0700)
commit2d99ced787e3d0f251fa370d2aae83cf2085a8d9
tree5af6cb9e1fd834af0b2fb75630e7a25e38a6510e
parente35a29d5c432504e6134c881dc4aaded7de7e717
drm/msm: async commit support

Now that flush/wait/complete is decoupled from the "synchronous" part of
atomic commit_tail(), add support to defer flush to a timer that expires
shortly before vblank for async commits.  In this way, multiple atomic
commits (for example, cursor updates) can be coalesced into a single
flush at the end of the frame.

v2: don't hold lock over ->wait_flush(), to avoid locking interaction
    that was causing fps drop when combining page flips or non-async
    atomic commits and lots of legacy cursor updates

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
drivers/gpu/drm/msm/msm_atomic.c
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_kms.h