disp: msm: check max FPS of DFPS to update UIDLE configurations

It is not applicable for all DFPS cases to update UIDLE state
according to current frame rate. If DFPS changes frame rate
through vertical front porch values, the SDE clocks and transfer
time will not get changed accordingly, and it always get fixed
at max frame rate configuration of DFPS.
Add this change to check max FPS of DFPS instead of current
frame rate for UIDLE update, if DFPS is enabled with VFP.

Change-Id: I7634bce6a9eb1af212ba19a267735be08b20ae1f
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
这个提交包含在:
Lei Chen
2020-08-26 17:34:13 +08:00
父节点 987b50fe8f
当前提交 c44e0b42df
修改 6 个文件,包含 78 行新增1 行删除

查看文件

@@ -439,6 +439,28 @@ static bool dsi_bridge_mode_fixup(struct drm_bridge *bridge,
return true;
}
u32 dsi_drm_get_dfps_maxfps(void *display)
{
u32 dfps_maxfps = 0;
struct dsi_display *dsi_display = display;
/*
* The time of SDE transmitting one frame active data
* will not be changed, if frame rate is adjusted with
* VFP method.
* So only return max fps of DFPS for UIDLE update, if DFPS
* is enabled with VFP.
*/
if (dsi_display && dsi_display->panel &&
dsi_display->panel->panel_mode == DSI_OP_VIDEO_MODE &&
dsi_display->panel->dfps_caps.type ==
DSI_DFPS_IMMEDIATE_VFP)
dfps_maxfps =
dsi_display->panel->dfps_caps.max_refresh_rate;
return dfps_maxfps;
}
u64 dsi_drm_find_bit_clk_rate(void *display,
const struct drm_display_mode *drm_mode)
{
@@ -492,6 +514,7 @@ int dsi_conn_get_mode_info(struct drm_connector *connector,
mode_info->jitter_numer = dsi_mode.priv_info->panel_jitter_numer;
mode_info->jitter_denom = dsi_mode.priv_info->panel_jitter_denom;
mode_info->clk_rate = dsi_drm_find_bit_clk_rate(display, drm_mode);
mode_info->dfps_maxfps = dsi_drm_get_dfps_maxfps(display);
mode_info->mdp_transfer_time_us =
dsi_mode.priv_info->mdp_transfer_time_us;