From 9fc38223a5042173d02620f329bbb72704e5f494 Mon Sep 17 00:00:00 2001 From: Yu SI Date: Wed, 1 Apr 2020 20:03:51 -0700 Subject: [PATCH] msm: cvp: add cache operation control flag added flag to enable or disable cache operation Change-Id: Iee91cef86eebe951aa25bcc3042b21d800028e1a Signed-off-by: Yu SI --- drivers/media/platform/msm/cvp/msm_cvp_buf.c | 5 +++++ drivers/media/platform/msm/cvp/msm_cvp_debug.c | 3 +++ drivers/media/platform/msm/cvp/msm_cvp_debug.h | 1 + 3 files changed, 9 insertions(+) diff --git a/drivers/media/platform/msm/cvp/msm_cvp_buf.c b/drivers/media/platform/msm/cvp/msm_cvp_buf.c index 8c716b954ecd..7aa7d12d26c1 100644 --- a/drivers/media/platform/msm/cvp/msm_cvp_buf.c +++ b/drivers/media/platform/msm/cvp/msm_cvp_buf.c @@ -233,6 +233,11 @@ void msm_cvp_cache_operations(struct msm_cvp_smem *smem, u32 type, { enum smem_cache_ops cache_op; + if (!msm_cvp_cacheop_enabled) { + dprintk(CVP_DBG, "%s: cache operation not enabled\n", __func__); + return; + } + if (!smem) { dprintk(CVP_ERR, "%s: invalid params\n", __func__); return; diff --git a/drivers/media/platform/msm/cvp/msm_cvp_debug.c b/drivers/media/platform/msm/cvp/msm_cvp_debug.c index bb9e528e9e45..cf3f44516f30 100644 --- a/drivers/media/platform/msm/cvp/msm_cvp_debug.c +++ b/drivers/media/platform/msm/cvp/msm_cvp_debug.c @@ -22,6 +22,7 @@ int msm_cvp_fw_debug_mode = 1; int msm_cvp_fw_low_power_mode = 1; bool msm_cvp_fw_coverage = !true; bool msm_cvp_thermal_mitigation_disabled = !true; +bool msm_cvp_cacheop_enabled = true; int msm_cvp_clock_voting = !1; bool msm_cvp_syscache_disable = !true; bool msm_cvp_dsp_disable = !true; @@ -258,6 +259,8 @@ struct dentry *msm_cvp_debugfs_init_drv(void) __debugfs_create(u32, "debug_output", &msm_cvp_debug_out) && __debugfs_create(bool, "disable_thermal_mitigation", &msm_cvp_thermal_mitigation_disabled) && + __debugfs_create(bool, "enable_cacheop", + &msm_cvp_cacheop_enabled) && __debugfs_create(bool, "disable_cvp_syscache", &msm_cvp_syscache_disable); diff --git a/drivers/media/platform/msm/cvp/msm_cvp_debug.h b/drivers/media/platform/msm/cvp/msm_cvp_debug.h index 5285b4095955..6aa16cfce2f3 100644 --- a/drivers/media/platform/msm/cvp/msm_cvp_debug.h +++ b/drivers/media/platform/msm/cvp/msm_cvp_debug.h @@ -50,6 +50,7 @@ extern int msm_cvp_fw_debug_mode; extern int msm_cvp_fw_low_power_mode; extern bool msm_cvp_fw_coverage; extern bool msm_cvp_thermal_mitigation_disabled; +extern bool msm_cvp_cacheop_enabled; extern int msm_cvp_clock_voting; extern bool msm_cvp_syscache_disable; extern bool msm_cvp_dsp_disable;