disp: msm: limit reglog to user debug builds
This change limits reglog feature by default to user debug builds only and provides debug option to selectively disable reglog for power and perf profiling if required. This change is needed as reglog is considerably heavy on commit thread execution. Change-Id: I781ae73cee09ce0fcddb6d2b3c847343c69f6c59 Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com> Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
* Copyright (c) 2009-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2009-2021, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -2522,6 +2522,7 @@ int sde_dbg_debugfs_register(struct device *dev)
|
|||||||
debugfs_create_file("recovery_reg", 0400, debugfs_root, NULL, &sde_recovery_reg_fops);
|
debugfs_create_file("recovery_reg", 0400, debugfs_root, NULL, &sde_recovery_reg_fops);
|
||||||
|
|
||||||
debugfs_create_u32("enable", 0600, debugfs_root, &(sde_dbg_base.evtlog->enable));
|
debugfs_create_u32("enable", 0600, debugfs_root, &(sde_dbg_base.evtlog->enable));
|
||||||
|
debugfs_create_u32("reglog_enable", 0600, debugfs_root, &(sde_dbg_base.reglog->enable));
|
||||||
debugfs_create_u32("panic", 0600, debugfs_root, &sde_dbg_base.panic_on_err);
|
debugfs_create_u32("panic", 0600, debugfs_root, &sde_dbg_base.panic_on_err);
|
||||||
debugfs_create_u32("dump_mode", 0600, debugfs_root, &sde_dbg_base.dump_option);
|
debugfs_create_u32("dump_mode", 0600, debugfs_root, &sde_dbg_base.dump_option);
|
||||||
debugfs_create_u64("reg_dump_blk_mask", 0600, debugfs_root, &sde_dbg_base.dump_blk_mask);
|
debugfs_create_u64("reg_dump_blk_mask", 0600, debugfs_root, &sde_dbg_base.dump_blk_mask);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ void sde_reglog_log(u8 blk_id, u32 val, u32 addr)
|
|||||||
struct sde_dbg_reglog *reglog = sde_dbg_base_reglog;
|
struct sde_dbg_reglog *reglog = sde_dbg_base_reglog;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
if (!reglog)
|
if (!reglog || !reglog->enable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
index = abs(atomic64_inc_return(®log->curr) % SDE_REGLOG_ENTRY);
|
index = abs(atomic64_inc_return(®log->curr) % SDE_REGLOG_ENTRY);
|
||||||
@@ -250,6 +250,11 @@ struct sde_dbg_reglog *sde_reglog_init(void)
|
|||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
atomic64_set(®log->curr, 0);
|
atomic64_set(®log->curr, 0);
|
||||||
|
#if IS_ENABLED(CONFIG_DEBUG_FS)
|
||||||
|
reglog->enable = true;
|
||||||
|
#else
|
||||||
|
reglog->enable = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
return reglog;
|
return reglog;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user