drm/msm/dsi: allocate current mode memory early for DMS
There can be a scenario where dynamic mode set can come for first commit also, allocate memory for current mode before checking for DMS. Change-Id: Ief856a372629112380f199bc336160b3fa278eef Signed-off-by: Vara Reddy <varar@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
4fbdc64598
commit
7e86c13d25
@@ -6306,6 +6306,15 @@ int dsi_display_set_mode(struct dsi_display *display,
|
|||||||
timing = adj_mode.timing;
|
timing = adj_mode.timing;
|
||||||
adjust_timing_by_ctrl_count(display, &adj_mode);
|
adjust_timing_by_ctrl_count(display, &adj_mode);
|
||||||
|
|
||||||
|
if (!display->panel->cur_mode) {
|
||||||
|
display->panel->cur_mode =
|
||||||
|
kzalloc(sizeof(struct dsi_display_mode), GFP_KERNEL);
|
||||||
|
if (!display->panel->cur_mode) {
|
||||||
|
rc = -ENOMEM;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*For dynamic DSI setting, use specified clock rate */
|
/*For dynamic DSI setting, use specified clock rate */
|
||||||
if (display->cached_clk_rate > 0)
|
if (display->cached_clk_rate > 0)
|
||||||
adj_mode.priv_info->clk_rate_hz = display->cached_clk_rate;
|
adj_mode.priv_info->clk_rate_hz = display->cached_clk_rate;
|
||||||
@@ -6322,15 +6331,6 @@ int dsi_display_set_mode(struct dsi_display *display,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!display->panel->cur_mode) {
|
|
||||||
display->panel->cur_mode =
|
|
||||||
kzalloc(sizeof(struct dsi_display_mode), GFP_KERNEL);
|
|
||||||
if (!display->panel->cur_mode) {
|
|
||||||
rc = -ENOMEM;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DSI_INFO("mdp_transfer_time_us=%d us\n",
|
DSI_INFO("mdp_transfer_time_us=%d us\n",
|
||||||
adj_mode.priv_info->mdp_transfer_time_us);
|
adj_mode.priv_info->mdp_transfer_time_us);
|
||||||
DSI_INFO("hactive= %d,vactive= %d,fps=%d\n",
|
DSI_INFO("hactive= %d,vactive= %d,fps=%d\n",
|
||||||
|
Reference in New Issue
Block a user