Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79805d69 authored by Dhaval Patel's avatar Dhaval Patel
Browse files

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: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent dc9078ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment