From 62b1d246c8033f90af45521ec626d1861de5d15c Mon Sep 17 00:00:00 2001 From: Guchun Chen Date: Tue, 13 Jun 2017 18:00:23 +0800 Subject: [PATCH] msm: sde: release LK's pool when LK exits LK's pool is reserved for running on its code stack. So once LK exits, the memory region it stays on should be released and reused by system. Change-Id: Iec5af69573eb633de48c931a052bd596f5ed3bda Signed-off-by: Guchun Chen --- drivers/gpu/drm/msm/sde/sde_splash.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/sde/sde_splash.c b/drivers/gpu/drm/msm/sde/sde_splash.c index 8b2894163eae..79989f3ac1e9 100644 --- a/drivers/gpu/drm/msm/sde/sde_splash.c +++ b/drivers/gpu/drm/msm/sde/sde_splash.c @@ -529,7 +529,8 @@ int sde_splash_clean_up_free_resource(struct msm_kms *kms, /* When both hdmi's and dsi's resource are freed, * 1. Destroy splash node objects. - * 2. Decrease ref count in bandwidth voting function. + * 2. Release the memory which LK's stack is running on. + * 3. Withdraw AHB data bus bandwidth voting. */ if (sinfo->hdmi_connector_cnt == 0 && sinfo->dsi_connector_cnt == 0) { @@ -539,8 +540,12 @@ int sde_splash_clean_up_free_resource(struct msm_kms *kms, _sde_splash_destroy_splash_node(sinfo); + _sde_splash_free_bootup_memory_to_system(sinfo->lk_pool_paddr, + sinfo->lk_pool_size); + sde_power_data_bus_bandwidth_ctrl(phandle, sde_kms->core_client, false); + return 0; }