msm: mdss: fix frame rate calculation for resolution switch
Current resolution switch calculation is using the wrong values for the fps calculation. Correct the values, by using the correct pixel clock value and adjusting if dsc is enabled as well as use the default fps, for panels where default frame rate is not 60. Change-Id: I4be0a9d5d163b0630e8cfeb930e72c32f487ccb1 Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org> Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
This commit is contained in:
parent
43270c072e
commit
40783c97f5
2 changed files with 16 additions and 3 deletions
|
@ -3367,6 +3367,14 @@ static void mdss_fb_var_to_panelinfo(struct fb_var_screeninfo *var,
|
|||
pinfo->clk_rate = var->pixclock;
|
||||
else
|
||||
pinfo->clk_rate = PICOS2KHZ(var->pixclock) * 1000;
|
||||
|
||||
/*
|
||||
* if it is a DBA panel i.e. HDMI TV connected through
|
||||
* DSI interface, then store the pixel clock value in
|
||||
* DSI specific variable.
|
||||
*/
|
||||
if (pinfo->is_dba_panel)
|
||||
pinfo->mipi.dsi_pclk_rate = pinfo->clk_rate;
|
||||
}
|
||||
|
||||
void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
|
||||
|
|
|
@ -956,12 +956,17 @@ static inline u8 mdss_panel_calc_frame_rate(struct mdss_panel_info *pinfo)
|
|||
{
|
||||
u32 pixel_total = 0;
|
||||
u8 frame_rate = 0;
|
||||
unsigned long pclk_rate = pinfo->clk_rate;
|
||||
unsigned long pclk_rate = pinfo->mipi.dsi_pclk_rate;
|
||||
u32 xres;
|
||||
|
||||
xres = pinfo->xres;
|
||||
if (pinfo->compression_mode == COMPRESSION_DSC)
|
||||
xres /= 3;
|
||||
|
||||
pixel_total = (pinfo->lcdc.h_back_porch +
|
||||
pinfo->lcdc.h_front_porch +
|
||||
pinfo->lcdc.h_pulse_width +
|
||||
pinfo->xres) *
|
||||
xres) *
|
||||
(pinfo->lcdc.v_back_porch +
|
||||
pinfo->lcdc.v_front_porch +
|
||||
pinfo->lcdc.v_pulse_width +
|
||||
|
@ -971,7 +976,7 @@ static inline u8 mdss_panel_calc_frame_rate(struct mdss_panel_info *pinfo)
|
|||
frame_rate =
|
||||
DIV_ROUND_CLOSEST(pclk_rate, pixel_total);
|
||||
else
|
||||
frame_rate = DEFAULT_FRAME_RATE;
|
||||
frame_rate = pinfo->panel_max_fps;
|
||||
|
||||
return frame_rate;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue