msm: mdss: Add extra panel info element in the fb_data_type

Dynamically allocating memory and using can cause overhead
while the memory is getting allocated and de-allocated for
every update for recovery use-cases. Hence, add one more
instance of struct panel info element in the fb_data_type
and use it.

Change-Id: Ic26b73bd779e21b008093cab1cb3decc28a95587
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
(cherry picked from commit b2110a1e44c030cbdc715a18af2adc5f37da2411)
[veeras@codeaurora.org: Resolve merge conflict in mdss_fb.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Jayant Shekhar 2015-01-30 11:01:59 +05:30 committed by David Keitel
parent b6cd64fd53
commit d0abb3685d
2 changed files with 5 additions and 10 deletions

View file

@ -3076,19 +3076,13 @@ static int mdss_fb_check_var(struct fb_var_screeninfo *var,
return -EINVAL; return -EINVAL;
if (mfd->panel_info) { if (mfd->panel_info) {
struct mdss_panel_info *pinfo;
int rc; int rc;
pinfo = kmalloc(sizeof(struct mdss_panel_info), GFP_KERNEL); memcpy(&mfd->reconfig_panel_info, mfd->panel_info,
if (!pinfo) { sizeof(mfd->reconfig_panel_info));
pr_err("unable to allocate memory for pinfo\n"); mdss_fb_var_to_panelinfo(var, &mfd->reconfig_panel_info);
return -ENOMEM;
}
memcpy(pinfo, mfd->panel_info, sizeof(*pinfo));
mdss_fb_var_to_panelinfo(var, pinfo);
rc = mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS, rc = mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS,
pinfo); &mfd->reconfig_panel_info);
kfree(pinfo);
if (IS_ERR_VALUE(rc)) if (IS_ERR_VALUE(rc))
return rc; return rc;
mfd->panel_reconfig = rc; mfd->panel_reconfig = rc;

View file

@ -249,6 +249,7 @@ struct msm_fb_data_type {
struct panel_id panel; struct panel_id panel;
struct mdss_panel_info *panel_info; struct mdss_panel_info *panel_info;
struct mdss_panel_info reconfig_panel_info;
int split_mode; int split_mode;
int split_fb_left; int split_fb_left;
int split_fb_right; int split_fb_right;