disp: msm: use vzalloc for large allocations

Large allocations using kzalloc can lead to timeouts. This updates
the allocation calls accordingly to use vzalloc to remove
requirements on contiguous memory.

Change-Id: I86fa0ae13277d97477210a082703514df792d8a9
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
这个提交包含在:
Nilaan Gunabalachandran
2021-11-04 15:55:23 -04:00
父节点 669a9a3190
当前提交 e51018b92c
修改 6 个文件,包含 32 行新增29 行删除

查看文件

@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*/
@@ -211,7 +212,7 @@ struct sde_dbg_evtlog *sde_evtlog_init(void)
{
struct sde_dbg_evtlog *evtlog;
evtlog = kvzalloc(sizeof(*evtlog), GFP_KERNEL);
evtlog = vzalloc(sizeof(*evtlog));
if (!evtlog)
return ERR_PTR(-ENOMEM);
@@ -229,7 +230,7 @@ struct sde_dbg_reglog *sde_reglog_init(void)
{
struct sde_dbg_reglog *reglog;
reglog = kvzalloc(sizeof(*reglog), GFP_KERNEL);
reglog = vzalloc(sizeof(*reglog));
if (!reglog)
return ERR_PTR(-ENOMEM);
@@ -337,7 +338,7 @@ void sde_evtlog_destroy(struct sde_dbg_evtlog *evtlog)
list_del(&filter_node->list);
kfree(filter_node);
}
kvfree(evtlog);
vfree(evtlog);
}
void sde_reglog_destroy(struct sde_dbg_reglog *reglog)
@@ -345,5 +346,5 @@ void sde_reglog_destroy(struct sde_dbg_reglog *reglog)
if (!reglog)
return;
kvfree(reglog);
vfree(reglog);
}