Skip to content

Commit

Permalink
Merge "msm: mdss: dp: fix div by zero error"
Browse files Browse the repository at this point in the history
  • Loading branch information
lnxbuild authored and Gerrit - the friendly Code Review server committed Aug 28, 2017
2 parents 77e6d09 + ba94891 commit 012b319
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/fbdev/msm/mdss_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,6 +1637,7 @@ int mdss_dp_on_hpd(struct mdss_dp_drv_pdata *dp_drv)
dp_drv->link_rate = mdss_dp_gen_link_clk(dp_drv);
if (!dp_drv->link_rate) {
pr_err("Unable to configure required link rate\n");
mdss_dp_clk_ctrl(dp_drv, DP_CORE_PM, false);
ret = -EINVAL;
goto exit;
}
Expand Down
5 changes: 5 additions & 0 deletions drivers/video/fbdev/msm/mdss_dp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,11 @@ char mdss_dp_gen_link_clk(struct mdss_dp_drv_pdata *dp)
pr_debug("clk_rate=%llu, bpp= %d, lane_cnt=%d\n",
pinfo->clk_rate, pinfo->bpp, lane_cnt);

if (lane_cnt == 0) {
pr_warn("Invalid max lane count\n");
return 0;
}

/*
* The max pixel clock supported is 675Mhz. The
* current calculations below will make sure
Expand Down

0 comments on commit 012b319

Please sign in to comment.