Merge "display: msm: optimize driver debug allocations"

このコミットが含まれているのは:
qctecmdr
2021-06-04 19:50:11 -07:00
committed by Gerrit - the friendly Code Review server
コミット 91a9206cb8
3個のファイルの変更16行の追加6行の削除

ファイルの表示

@@ -1467,7 +1467,7 @@ static ssize_t sde_recovery_regdump_read(struct file *file, char __user *ubuf,
if (!rbuf->dump_done && !rbuf->cur_blk) {
if (!rbuf->buf)
rbuf->buf = kzalloc(DUMP_BUF_SIZE, GFP_KERNEL);
rbuf->buf = kvzalloc(DUMP_BUF_SIZE, GFP_KERNEL);
if (!rbuf->buf) {
len = -ENOMEM;
goto err;
@@ -2292,7 +2292,7 @@ static void sde_dbg_dsi_ctrl_destroy(void)
*/
void sde_dbg_destroy(void)
{
kfree(sde_dbg_base.regbuf.buf);
kvfree(sde_dbg_base.regbuf.buf);
memset(&sde_dbg_base.regbuf, 0, sizeof(sde_dbg_base.regbuf));
_sde_dbg_debugfs_destroy();
sde_dbg_base_evtlog = NULL;

ファイルの表示

@@ -117,7 +117,13 @@ enum sde_dbg_dump_context {
* number must be greater than print entry to prevent out of bound evtlog
* entry array access.
*/
#if IS_ENABLED(CONFIG_DRM_SDE_VM)
#define SDE_EVTLOG_ENTRY (SDE_EVTLOG_PRINT_ENTRY * 8)
#else
#define SDE_EVTLOG_ENTRY (SDE_EVTLOG_PRINT_ENTRY * 32)
#endif /* IS_ENABLED(CONFIG_DRM_SDE_VM) */
#define SDE_EVTLOG_MAX_DATA 15
#define SDE_EVTLOG_BUF_MAX 512
#define SDE_EVTLOG_BUF_ALIGN 32
@@ -162,7 +168,11 @@ extern struct sde_dbg_evtlog *sde_dbg_base_evtlog;
* number must be greater than number of possible writes in at least one
* single commit.
*/
#if IS_ENABLED(CONFIG_DRM_SDE_VM)
#define SDE_REGLOG_ENTRY 256
#else
#define SDE_REGLOG_ENTRY 1024
#endif /* IS_ENABLED(CONFIG_DRM_SDE_VM) */
struct sde_dbg_reglog_log {
s64 time;

ファイルの表示

@@ -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);
}