msm: mdss: refactor pipe retrieval and ref count logic

Allow only retrieval of pipes that are on particular framebuffer device
used list. This ensures that pipe is not modified from a different fb
device node and cause potential issues.

Also, modify the ref count logic to use kref and ensure pipe is freed
only while holding mutex in case there could be race condition that
pipe is allocated while being freed.

Change-Id: I626323b5df981a7ed1e03196126cd4376b5ba6a6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
msm: mdss: Add BTA status check API in DSI controller

Add Bus-Turn-Around (BTA) status check API in DSI
controller to check if it is alive or not. Subscriber
of this API should send relevant notification to user
space for correct action. Update fb driver and cmd
interface to support the BTA failure scenario.

Change-Id: Ic78379b31a48278282182fdba6ba7b2e6f9c26d5
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
msm: mdss: Fix clk warnings for esc clk with dual-dsi panels

In current implementation if dual-dsi panel's continuous splash screen
feature is enabled then feature flag is disabled only for master and
not for secondary panel. This leads to clk prepare without clk set rate.
For esc clk this leads to clk warning back-trace in the logs. For other
clocks, if clk rate changes between suspend/resume then it will lead to
rate incorrect programming and unknown behaviour. Fix this by disabling
secondary panel's feature flag.

Change-Id: I09fd3968c4eecc97a9f07e2c731e6ccce8036119
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>