]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: Fix race condition in msm driver with async layer updates
authorKrishna Manikandan <mkrishn@codeaurora.org>
Fri, 16 Oct 2020 14:10:43 +0000 (19:40 +0530)
committerRob Clark <robdclark@chromium.org>
Sun, 1 Nov 2020 18:11:59 +0000 (10:11 -0800)
commit7bd9419f8e60b61ca4ff7def9386db9bbd415522
tree7df1768f68354c9be9cec39476d139d5a3ac02d2
parent68ed2672b8fdb9454c449f573990714135c93adc
drm/msm: Fix race condition in msm driver with async layer updates

When there are back to back commits with async cursor update,
there is a case where second commit can program the DPU hw
blocks while first didn't complete flushing config to HW.

Synchronize the compositions such that second commit waits
until first commit flushes the composition.

This change also introduces per crtc commit lock, such that
commits on different crtcs are not blocked by each other.

Changes in v2:
- Use an array of mutexes in kms to handle commit
  lock per crtc. (Rob Clark)

Changes in v3:
- Add wrapper functions to handle lock and unlock of
  commit_lock for each crtc. (Rob Clark)

Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_atomic.c
drivers/gpu/drm/msm/msm_kms.h