mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
cnss2: Notify MHI to use already allocated images
For firmware and RDDM images, notify MHI driver not to free them after successful allocation. This can help avoid future memory allocation failure. Change-Id: Ic19d42c6d56707200099969e36da91f4afed0163 Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
parent
407257c305
commit
fbef9467c3
1 changed files with 5 additions and 0 deletions
|
|
@ -1270,6 +1270,11 @@ static int cnss_pci_set_mhi_state(struct cnss_pci_data *pci_priv,
|
|||
break;
|
||||
case CNSS_MHI_POWER_ON:
|
||||
ret = mhi_sync_power_up(pci_priv->mhi_ctrl);
|
||||
/* Only set img_pre_alloc when power up succeeds */
|
||||
if (!ret && !pci_priv->mhi_ctrl->img_pre_alloc) {
|
||||
cnss_pr_dbg("Notify MHI to use already allocated images\n");
|
||||
pci_priv->mhi_ctrl->img_pre_alloc = true;
|
||||
}
|
||||
break;
|
||||
case CNSS_MHI_POWER_OFF:
|
||||
mhi_power_down(pci_priv->mhi_ctrl, true);
|
||||
|
|
|
|||
Loading…
Reference in a new issue