mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: display: add mdp clk rate calculation for low vbp
For the panels that have low v_back_porch, if h/w FIR scaling is used, during vbp time, mdp clk should be fast enough to output a line from 4 input lines. MDP rate equation for very small scaling, e.g. 1 or 2 pixels' upscaling or downscaling cannot cover this case, where underruns are seen on those panels. Change-Id: I4f35f98c2c1bc4ef04dfee193427bd3ff674945d Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org> Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
This commit is contained in:
parent
5f6cce3acf
commit
5aac7da9b0
1 changed files with 16 additions and 1 deletions
|
@ -2577,6 +2577,22 @@ static int mdp4_calc_pipe_mdp_clk(struct msm_fb_data_type *mfd,
|
|||
|
||||
rst >>= shift;
|
||||
|
||||
/*
|
||||
* There is one special case for the panels that have low
|
||||
* v_back_porch (<=4), mdp clk should be fast enough to buffer
|
||||
* 4 lines input during back porch time if scaling is
|
||||
* required(FIR).
|
||||
*/
|
||||
if ((mfd->panel_info.lcdc.v_back_porch <= 4) &&
|
||||
(pipe->src_h != pipe->dst_h)) {
|
||||
u32 clk = 0;
|
||||
clk = 4 * (pclk >> shift) / mfd->panel_info.lcdc.v_back_porch;
|
||||
clk <<= shift;
|
||||
pr_debug("%s: mdp clk rate %d based on low vbp %d\n",
|
||||
__func__, clk, mfd->panel_info.lcdc.v_back_porch);
|
||||
rst = (rst > clk) ? rst : clk;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the calculated mdp clk is less than panel pixel clk,
|
||||
* most likely due to upscaling, mdp clk rate will be set to
|
||||
|
@ -3676,4 +3692,3 @@ done:
|
|||
mutex_unlock(&mfd->dma->ov_mutex);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue