mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: display: fix division-by-zero bug
Panel v_back_porch could be zero for virtual panels, so the check for zero is added to fix the bug. Change-Id: I6a29f3d8d771092bca2374cc9a1c11dd77ad569e Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This commit is contained in:
parent
38351d4a0a
commit
2764083d28
1 changed files with 2 additions and 1 deletions
|
@ -2616,7 +2616,8 @@ static int mdp4_calc_pipe_mdp_clk(struct msm_fb_data_type *mfd,
|
|||
* required(FIR).
|
||||
*/
|
||||
if ((mfd->panel_info.lcdc.v_back_porch <= 4) &&
|
||||
(pipe->src_h != pipe->dst_h)) {
|
||||
(pipe->src_h != pipe->dst_h) &&
|
||||
(mfd->panel_info.lcdc.v_back_porch)) {
|
||||
u32 clk = 0;
|
||||
clk = 4 * (pclk >> shift) / mfd->panel_info.lcdc.v_back_porch;
|
||||
clk <<= shift;
|
||||
|
|
Loading…
Reference in a new issue