msm: mdss: fix race condition in dsi clk off request
DSI clocks are requested from mdp and dsi for
different use cases. The master clocks(DSI0 clocks)
are refcounted to avoid toggling during slave
clock ON/OFF sequence. Same applies to split controller
clocks if broadcast mode is enabled. Now, mdp client
can remove the dsi client's vote in below case:
- MDP requested clocks in ECG state
- clk_ctrl has removed both votes from ctrl-0
using dsi client handler.
- DSI turns ON clock for ctrl-1
- clk_ctrl turns on clk for ctrl-0 using dsi
client handler.
- clk_ctrl increase the ctrl-1 refcount to 1
- clk_ctrl turns on clk for ctrl-1
- MDP request to turn OFF the clk for ctrl-1
- clk_ctrl turns on clk for ctrl-0 using dsi
client handler
- clk_ctrl increase the ctrl-1 refcount to 2
- clk_ctrl turns off clk for ctrl-1
- clk_ctrl turns off clk(twice) for ctrl-0
using dsi client handler.
This race condition leads to dsi0 clocks off event when
interface is using clocks. This change start tracking
extra vote based on calling client id.
Change-Id: I4812330453dedacd16dad1d920a2bacc3f67042b
Signed-off-by:
Dhaval Patel <pdhaval@codeaurora.org>
Loading
Please register or sign in to comment