display: msm: optimize driver debug allocations

This change uses kvzalloc to allocate memory for eventlog and register
dumps. This is needed since kernel cannot guarantee that physically
contiguous allocations greater than 32 KB will succeed.
Additionally it reduces the number of entries for evt logs and
register dumps for trusted vm.

Change-Id: I8b76e79d62850904f6445d8b66c882529ba6e9ba
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Este commit está contenido en:
Abhijit Kulkarni
2021-05-20 13:59:01 -07:00
padre 72f7dfe428
commit b4f00361f3
Se han modificado 3 ficheros con 16 adiciones y 6 borrados

Ver fichero

@@ -224,7 +224,7 @@ struct sde_dbg_evtlog *sde_evtlog_init(void)
{
struct sde_dbg_evtlog *evtlog;
evtlog = kzalloc(sizeof(*evtlog), GFP_KERNEL);
evtlog = kvzalloc(sizeof(*evtlog), GFP_KERNEL);
if (!evtlog)
return ERR_PTR(-ENOMEM);
@@ -241,7 +241,7 @@ struct sde_dbg_reglog *sde_reglog_init(void)
{
struct sde_dbg_reglog *reglog;
reglog = kzalloc(sizeof(*reglog), GFP_KERNEL);
reglog = kvzalloc(sizeof(*reglog), GFP_KERNEL);
if (!reglog)
return ERR_PTR(-ENOMEM);
@@ -349,7 +349,7 @@ void sde_evtlog_destroy(struct sde_dbg_evtlog *evtlog)
list_del(&filter_node->list);
kfree(filter_node);
}
kfree(evtlog);
kvfree(evtlog);
}
void sde_reglog_destroy(struct sde_dbg_reglog *reglog)
@@ -357,5 +357,5 @@ void sde_reglog_destroy(struct sde_dbg_reglog *reglog)
if (!reglog)
return;
kfree(reglog);
kvfree(reglog);
}