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:
parent
b6cd64fd53
commit
d0abb3685d
2 changed files with 5 additions and 10 deletions
|
@ -3076,19 +3076,13 @@ static int mdss_fb_check_var(struct fb_var_screeninfo *var,
|
|||
return -EINVAL;
|
||||
|
||||
if (mfd->panel_info) {
|
||||
struct mdss_panel_info *pinfo;
|
||||
int rc;
|
||||
|
||||
pinfo = kmalloc(sizeof(struct mdss_panel_info), GFP_KERNEL);
|
||||
if (!pinfo) {
|
||||
pr_err("unable to allocate memory for pinfo\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memcpy(pinfo, mfd->panel_info, sizeof(*pinfo));
|
||||
mdss_fb_var_to_panelinfo(var, pinfo);
|
||||
memcpy(&mfd->reconfig_panel_info, mfd->panel_info,
|
||||
sizeof(mfd->reconfig_panel_info));
|
||||
mdss_fb_var_to_panelinfo(var, &mfd->reconfig_panel_info);
|
||||
rc = mdss_fb_send_panel_event(mfd, MDSS_EVENT_CHECK_PARAMS,
|
||||
pinfo);
|
||||
kfree(pinfo);
|
||||
&mfd->reconfig_panel_info);
|
||||
if (IS_ERR_VALUE(rc))
|
||||
return rc;
|
||||
mfd->panel_reconfig = rc;
|
||||
|
|
|
@ -249,6 +249,7 @@ struct msm_fb_data_type {
|
|||
|
||||
struct panel_id panel;
|
||||
struct mdss_panel_info *panel_info;
|
||||
struct mdss_panel_info reconfig_panel_info;
|
||||
int split_mode;
|
||||
int split_fb_left;
|
||||
int split_fb_right;
|
||||
|
|
Loading…
Add table
Reference in a new issue