video: mdss: fix a mdss_dsi_clk access issue.

Due to some reason, the dsi clock is closed before tear off transmission, it results in transfer fail, this will cause a non-clock register access
and then will cause a tz non-watchdog reset crash.  so we need add a force clk reopen/close protection to avoid this exception.

when this issue happends it will show the abnormal information in kmsg as follow:
[ 8768.009223] ------------[ cut here ]------------
[ 8768.009234] WARNING: at /mnt/G/z00208928/emerald_lnx.lw.3.0-07501/kernel/drivers/clk/qcom/clock-local2.c:414 branch_clk_halt_check+0x104/0x12c()
[ 8768.009249] mdss_pclk0_clk: mdss_pclk0_clk status stuck on, CBCR: 0
[ 8768.009250] CPU: 0 PID: 182 Comm: surfaceflinger Tainted: G        W    3.10.40-gf7602b8-dirty #3
[ 8768.009268] [<c010b9dc>] (unwind_backtrace+0x0/0x11c) from [<c0109b34>] (show_stack+0x10/0x14)
[ 8768.009286] [<c0109b34>] (show_stack+0x10/0x14) from [<c0126114>] (warn_slowpath_common+0x48/0x68)
[ 8768.009302] [<c0126114>] (warn_slowpath_common+0x48/0x68) from [<c012618c>] (warn_slowpath_fmt+0x2c/0x3c)
[ 8768.009318] [<c012618c>] (warn_slowpath_fmt+0x2c/0x3c) from [<c067e15c>] (branch_clk_halt_check+0x104/0x12c)
[ 8768.009334] [<c067e15c>] (branch_clk_halt_check+0x104/0x12c) from [<c067a8d4>] (clk_disable+0xa8/0x168)
[ 8768.009352] [<c067a8d4>] (clk_disable+0xa8/0x168) from [<c039904c>] (mdss_dsi_link_clk_disable+0x50/0x6c)
[ 8768.009370] [<c039904c>] (mdss_dsi_link_clk_disable+0x50/0x6c) from [<c039a9ec>] (mdss_dsi_clk_ctrl_sub+0x15c/0x3b8)
[ 8768.009387] [<c039a9ec>] (mdss_dsi_clk_ctrl_sub+0x15c/0x3b8) from [<c039b518>] (mdss_dsi_clk_ctrl+0x300/0x5cc)
[ 8768.009404] [<c039b518>] (mdss_dsi_clk_ctrl+0x300/0x5cc) from [<c038fbac>] (mdss_dsi_event_handler+0x2f0/0x7e4)
[ 8768.009422] [<c038fbac>] (mdss_dsi_event_handler+0x2f0/0x7e4) from [<c036653c>] (mdss_mdp_ctl_intf_event+0x6c/0xa8)
[ 8768.009441] [<c036653c>] (mdss_mdp_ctl_intf_event+0x6c/0xa8) from [<c037f948>] (mdss_mdp_cmd_intfs_stop+0x2c0/0x3b0)
[ 8768.009459] [<c037f948>] (mdss_mdp_cmd_intfs_stop+0x2c0/0x3b0) from [<c037fdec>] (mdss_mdp_cmd_stop+0x3b4/0x438)
[ 8768.009477] [<c037fdec>] (mdss_mdp_cmd_stop+0x3b4/0x438) from [<c0366cc0>] (mdss_mdp_ctl_stop+0xdc/0x388)
[ 8768.009496] [<c0366cc0>] (mdss_mdp_ctl_stop+0xdc/0x388) from [<c0387054>] (mdss_mdp_overlay_off+0x21c/0x33c)
[ 8768.009514] [<c0387054>] (mdss_mdp_overlay_off+0x21c/0x33c) from [<c039ed64>] (mdss_fb_blank_blank+0x110/0x198)
[ 8768.009533] [<c039ed64>] (mdss_fb_blank_blank+0x110/0x198) from [<c039f008>] (mdss_fb_blank_sub.isra.20+0x21c/0x288)
[ 8768.009549] [<c039f008>] (mdss_fb_blank_sub.isra.20+0x21c/0x288) from [<c035750c>] (fb_blank+0x54/0x88)
[ 8768.009563] [<c035750c>] (fb_blank+0x54/0x88) from [<c0357a3c>] (do_fb_ioctl+0x4fc/0x574)
[ 8768.009578] [<c0357a3c>] (do_fb_ioctl+0x4fc/0x574) from [<c01f9bd8>] (vfs_ioctl+0x28/0x3c)
[ 8768.009593] [<c01f9bd8>] (vfs_ioctl+0x28/0x3c) from [<c01fa654>] (do_vfs_ioctl+0x4c0/0x570)
[ 8768.009607] [<c01fa654>] (do_vfs_ioctl+0x4c0/0x570) from [<c01fa750>] (SyS_ioctl+0x4c/0x78)
[ 8768.009623] [<c01fa750>] (SyS_ioctl+0x4c/0x78) from [<c0106240>] (ret_fast_syscall+0x0/0x30)
[ 8768.009628] ---[ end trace 46c9739d9fd38498 ]---
[ 8768.011126]
[ 8768.011456] dsi_vco_clk
[ 8768.011459] analog_postdiv_clk
[ 8768.011462] indirect_path_div2_clk
[ 8768.011464] byte_mux
[ 8768.011467] byte_clk_src
[ 8768.011470] byte0_clk_src
[ 8768.011476]             CMD_RCGR: 0x00000000
[ 8768.011482]             CFG_RCGR: 0x00000101
[ 8768.011485] mdss_byte0_clk
[ 8768.011490]                 CBCR: 0x00000000

Bug:26337690
Change-Id: Id0d6aa1ee8ae640706ef4cf0b34a2821aa0389b6
Signed-off-by: z00208928 <z00208928@notesmail.huawei.com>
1 file changed