From b12de3763b4d887dedd826aa82893f53ca855f86 Mon Sep 17 00:00:00 2001 From: George Shen Date: Tue, 3 Dec 2019 18:16:39 -0800 Subject: [PATCH] msm: cvp: Disabe sys cache and dsp initialization System cache and DSP CVP driver not ready for Lahaina bring up. Disable them until they are ready. Change-Id: I70acfe8d53e527f7456084d72d93116a047f919a Signed-off-by: George Shen --- drivers/media/platform/msm/cvp/cvp_hfi.c | 18 ++++++++++++++++-- drivers/media/platform/msm/cvp/msm_cvp_debug.c | 3 ++- drivers/media/platform/msm/cvp/msm_cvp_debug.h | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/msm/cvp/cvp_hfi.c b/drivers/media/platform/msm/cvp/cvp_hfi.c index cd563b0f6822..1c85dff8959e 100644 --- a/drivers/media/platform/msm/cvp/cvp_hfi.c +++ b/drivers/media/platform/msm/cvp/cvp_hfi.c @@ -487,6 +487,11 @@ static int __dsp_send_hfi_queue(struct iris_hfi_device *device) { int rc; + if (msm_cvp_dsp_disable) { + dprintk(CVP_WARN, "%s: DSP support is disabled\n", __func__); + return 0; + } + if (!device->dsp_iface_q_table.mem_data.dma_handle) { dprintk(CVP_ERR, "%s: invalid dsm_handle\n", __func__); return -EINVAL; @@ -518,6 +523,9 @@ static int __dsp_suspend(struct iris_hfi_device *device, bool force, u32 flags) int rc; struct cvp_hal_session *temp; + if (msm_cvp_dsp_disable) + return 0; + if (!(device->dsp_flags & DSP_INIT)) return 0; @@ -555,6 +563,9 @@ static int __dsp_resume(struct iris_hfi_device *device, u32 flags) { int rc; + if (msm_cvp_dsp_disable) + return 0; + if (!(device->dsp_flags & DSP_SUSPEND)) { dprintk(CVP_DBG, "%s: dsp not suspended\n", __func__); return 0; @@ -578,6 +589,9 @@ static int __dsp_shutdown(struct iris_hfi_device *device, u32 flags) { int rc; + if (msm_cvp_dsp_disable) + return 0; + cvp_dsp_set_cvp_ssr(); if (!(device->dsp_flags & DSP_INIT)) { @@ -3886,8 +3900,8 @@ static int __set_subcaches(struct iris_hfi_device *device) struct cvp_hfi_resource_subcache_type *sc_res; struct cvp_resource_hdr rhdr; - if (device->res->sys_cache_res_set) { - dprintk(CVP_DBG, "Subcaches already set to CVP\n"); + if (device->res->sys_cache_res_set || msm_cvp_syscache_disable) { + dprintk(CVP_DBG, "Subcaches already set or disabled\n"); return 0; } diff --git a/drivers/media/platform/msm/cvp/msm_cvp_debug.c b/drivers/media/platform/msm/cvp/msm_cvp_debug.c index ee513421466b..dac7d908c8d4 100644 --- a/drivers/media/platform/msm/cvp/msm_cvp_debug.c +++ b/drivers/media/platform/msm/cvp/msm_cvp_debug.c @@ -21,7 +21,8 @@ int msm_cvp_fw_low_power_mode = 1; bool msm_cvp_fw_coverage = !true; bool msm_cvp_thermal_mitigation_disabled = !true; int msm_cvp_clock_voting = !1; -bool msm_cvp_syscache_disable = !true; +bool msm_cvp_syscache_disable = true; +bool msm_cvp_dsp_disable = true; #define MAX_DBG_BUF_SIZE 4096 diff --git a/drivers/media/platform/msm/cvp/msm_cvp_debug.h b/drivers/media/platform/msm/cvp/msm_cvp_debug.h index e96843509736..a7e348063e51 100644 --- a/drivers/media/platform/msm/cvp/msm_cvp_debug.h +++ b/drivers/media/platform/msm/cvp/msm_cvp_debug.h @@ -52,6 +52,7 @@ extern bool msm_cvp_fw_coverage; extern bool msm_cvp_thermal_mitigation_disabled; extern int msm_cvp_clock_voting; extern bool msm_cvp_syscache_disable; +extern bool msm_cvp_dsp_disable; #define dprintk(__level, __fmt, arg...) \ do { \