]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dp: wait for audio notification before disabling clocks
authorAbhinav Kumar <abhinavk@codeaurora.org>
Sat, 12 Sep 2020 20:49:32 +0000 (13:49 -0700)
committerRob Clark <robdclark@chromium.org>
Tue, 15 Sep 2020 17:54:35 +0000 (10:54 -0700)
commite62370e1a6c99bd28f5933852e494e4bddd99119
tree6768265267b788f69ada719bc8440524ee63b0e8
parent9ac196b93f8f7577ac726c6be8761680d2a89797
drm/msm/dp: wait for audio notification before disabling clocks

In the current implementation, there is a very small window for
the audio side to safely signal the hdmi_code_shutdown() before
the clocks are disabled.

Add some synchronization between the DP display and DP audio module
to safely disable the clocks to avoid unclocked access from audio
side.

In addition, audio side can open the sound card even if DP monitor
is not connected. Avoid programming hardware registers in this case
and bail out early.

Changes in v4:
- removed some leftover prints

Changes in v5:
- fix crash when user tries to play audio in suspended
  state

Changes in v6:
- rebased on top of latest patchset of dependency

Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/dp/dp_audio.c
drivers/gpu/drm/msm/dp/dp_display.c
drivers/gpu/drm/msm/dp/dp_display.h