]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: dpu: Move crtc runtime resume to encoder
authorSean Paul <seanpaul@chromium.org>
Fri, 16 Nov 2018 18:42:22 +0000 (13:42 -0500)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 18:10:11 +0000 (13:10 -0500)
commit60edeb7d7efd4d9ed73d3168f8f26e230dd6191b
treef1c41e65a3f895437f671f29bb8d5261d8cdc997
parent102c1cff04fb8c6d7aa7fc01d2200cd6483c87bc
drm/msm: dpu: Move crtc runtime resume to encoder

The crtc runtime resume doesn't actually operate on the crtc, but rather
its encoders. The problem with this is that we need to inspect the crtc
state to get the currently connected encoders. Since runtime resume
isn't guaranteed to be called while holding the modeset locks (although
it sometimes is), this presents a race condition.

Now that we have ->enabled on the virtual encoders, and a lock to
protect it, just call resume on each encoder and only restore the ones
that are enabled.

Changes in v2:
- None

Cc: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c