msm: mdss: Tune the mdss event timer wakeup time
Adjust the mdss event timer to wakeup before the readpointer to help with latency issues. Crs-Fixed: 840497 Change-Id: I384d7e13af1e4893aa200240c6a057ebc2bf92c6 Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
This commit is contained in:
parent
1e08f68d56
commit
ac685c4538
5 changed files with 28 additions and 1 deletions
|
@ -450,6 +450,8 @@ Optional properites:
|
|||
slice.
|
||||
- qcom,mdss-dsc-config-by-manufacture-cmd: A boolean to indicates panel use manufacture command to setup pps
|
||||
instead of standard dcs type 0x0A.
|
||||
- qcom,adjust-timer-wakeup-ms: An integer value to indicate the timer delay(in ms) to accommodate
|
||||
s/w delay while configuring the event timer wakeup logic.
|
||||
|
||||
Note, if a given optional qcom,* binding is not present, then the driver will configure
|
||||
the default values specified.
|
||||
|
@ -591,6 +593,7 @@ Example:
|
|||
qcom,mdss-dsi-panel-orientation = "180"
|
||||
qcom,mdss-dsi-force-clock-lane-hs;
|
||||
qcom,compression-mode = "dsc";
|
||||
qcom,adjust-timer-wakeup-ms = <1>;
|
||||
qcom,panel-supply-entries {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
|
|
@ -2310,6 +2310,9 @@ static int mdss_panel_parse_dt(struct device_node *np,
|
|||
mdss_dsi_parse_dcs_cmds(np, &ctrl_pdata->off_cmds,
|
||||
"qcom,mdss-dsi-off-command", "qcom,mdss-dsi-off-command-state");
|
||||
|
||||
rc = of_property_read_u32(np, "qcom,adjust-timer-wakeup-ms", &tmp);
|
||||
pinfo->adjust_timer_delay_ms = (!rc ? tmp : 0);
|
||||
|
||||
pinfo->mipi.force_clk_lane_hs = of_property_read_bool(np,
|
||||
"qcom,mdss-dsi-force-clock-lane-hs");
|
||||
|
||||
|
|
|
@ -4096,7 +4096,8 @@ int mdss_mdp_display_wakeup_time(struct mdss_mdp_ctl *ctl,
|
|||
struct mdss_panel_info *pinfo;
|
||||
u32 clk_rate, clk_period;
|
||||
u32 current_line, total_line;
|
||||
u32 time_of_line, time_to_vsync;
|
||||
u32 time_of_line, time_to_vsync, adjust_line_ns;
|
||||
|
||||
ktime_t current_time = ktime_get();
|
||||
|
||||
if (!ctl->ops.read_line_cnt_fnc)
|
||||
|
@ -4141,6 +4142,16 @@ int mdss_mdp_display_wakeup_time(struct mdss_mdp_ctl *ctl,
|
|||
return -EINVAL;
|
||||
|
||||
time_to_vsync = time_of_line * (total_line - current_line);
|
||||
|
||||
if (pinfo->adjust_timer_delay_ms) {
|
||||
adjust_line_ns = pinfo->adjust_timer_delay_ms
|
||||
* 1000000; /* convert to ns */
|
||||
|
||||
/* Ignore large values of adjust_line_ns\ */
|
||||
if (time_to_vsync > adjust_line_ns)
|
||||
time_to_vsync -= adjust_line_ns;
|
||||
}
|
||||
|
||||
if (!time_to_vsync)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -365,6 +365,8 @@ static int _create_dsi_panel_nodes(struct mdss_panel_debugfs_info *dfs,
|
|||
(char *)&pinfo->mipi.rx_eot_ignore);
|
||||
debugfs_create_u8("tx_eot_append", 0644, mipi_root,
|
||||
(char *)&pinfo->mipi.tx_eot_append);
|
||||
debugfs_create_u32("adjust_timer_ms", 0644, mipi_root,
|
||||
(u32 *)&pinfo->adjust_timer_delay_ms);
|
||||
|
||||
/* TE reltaed nodes */
|
||||
debugfs_create_u32("te_tear_check_en", 0644, te_root,
|
||||
|
@ -539,6 +541,8 @@ void mdss_panel_debugfsinfo_to_panelinfo(struct mdss_panel_info *panel_info)
|
|||
pinfo->bl_min = dfs_info->panel_info.bl_min;
|
||||
pinfo->bl_max = dfs_info->panel_info.bl_max;
|
||||
pinfo->brightness_max = dfs_info->panel_info.brightness_max;
|
||||
pinfo->adjust_timer_delay_ms =
|
||||
dfs_info->panel_info.adjust_timer_delay_ms;
|
||||
|
||||
if ((pinfo->type == MIPI_CMD_PANEL) ||
|
||||
(pinfo->type == MIPI_VIDEO_PANEL)) {
|
||||
|
|
|
@ -575,6 +575,12 @@ struct mdss_panel_info {
|
|||
struct lvds_panel_info lvds;
|
||||
struct edp_panel_info edp;
|
||||
|
||||
/*
|
||||
* Delay(in ms) to accommodate s/w delay while
|
||||
* configuring the event timer wakeup logic.
|
||||
*/
|
||||
u32 adjust_timer_delay_ms;
|
||||
|
||||
/* debugfs structure for the panel */
|
||||
struct mdss_panel_debugfs_info *debugfs_info;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue