msm/display-drivers: release lhbm resource

Malloc the memory when panel init.
So must free the memory when panel put.

refer to https://gerrit.mot.com/#/c/2377115/

Change-Id: I4a2fde8ca012ad17cc0572bb739c31941d4a4f47
Signed-off-by: tinno64 <tinno64@motorola.com>
Reviewed-on: https://gerrit.mot.com/2615038
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
tinno64 2023-05-19 16:26:26 +08:00
commit 2b9042f881

View file

@ -2223,7 +2223,7 @@ static int dsi_panel_parse_dfps_caps(struct dsi_panel *panel)
"qcom,mdss-dsi-pan-dfps-send-command-with-te-async");
dfps_caps->dfps_send_cmd_support = utils->read_bool(utils->data,
"qcom,mdss-dsi-pan-dpfs-send-command");
"qcom,mdss-dsi-pan-dfps-send-command");
if(dfps_caps->dfps_send_cmd_support) {
dfps_caps->panel_on_fps = dfps_caps->dfps_list[0];
dfps_caps->current_fps = dfps_caps->panel_on_fps;
@ -4423,6 +4423,12 @@ static int dsi_panel_parse_local_hbm_config(struct dsi_panel *panel)
return 0;
}
static void dsi_panel_lhbm_config_deinit(struct dsi_panel_lhbm_config *lhbm_config)
{
if (lhbm_config->alpha)
kfree(lhbm_config->alpha);
}
static void dsi_panel_update_util(struct dsi_panel *panel,
struct device_node *parser_node)
{
@ -4825,6 +4831,8 @@ void dsi_panel_put(struct dsi_panel *panel)
/* free resources allocated for ESD check */
dsi_panel_esd_config_deinit(&panel->esd_config);
dsi_panel_lhbm_config_deinit(&panel->lhbm_config);
kfree(panel);
}