summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRama Krishna Phani A <rphani@codeaurora.org>2016-08-04 17:05:52 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-17 05:33:27 -0700
commit56b66ab23142ddb7ded71490b2c97cb1fd00b7ac (patch)
treef491fdb7f315ff46829942e46dc172677e57e014
parent008f057bbab6dd6629b7e1a3b8c67b650a6b9ef1 (diff)
msm: sps: Change the default SPS IPC log level
Set the default IPC logging level to minimal logging in case client driver does not specify ipc logging level. Change-Id: I83174225b4eb7ae72cb16bc8f6dcf9659bc1342e Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
-rw-r--r--drivers/platform/msm/sps/sps.c7
-rw-r--r--drivers/platform/msm/sps/spsi.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/platform/msm/sps/sps.c b/drivers/platform/msm/sps/sps.c
index e9b0945f0782..eab0e47e7cd2 100644
--- a/drivers/platform/msm/sps/sps.c
+++ b/drivers/platform/msm/sps/sps.c
@@ -289,7 +289,8 @@ static ssize_t sps_set_bam_addr(struct file *file, const char __user *buf,
} else {
vir_addr = &bam->base;
num_pipes = bam->props.num_pipes;
- bam->ipc_loglevel = log_level_sel;
+ if (log_level_sel <= SPS_IPC_MAX_LOGLEVEL)
+ bam->ipc_loglevel = log_level_sel;
}
switch (reg_dump_option) {
@@ -500,7 +501,7 @@ static void sps_debugfs_init(void)
debugfs_buf_size = 0;
debugfs_buf_used = 0;
wraparound = false;
- log_level_sel = 0;
+ log_level_sel = SPS_IPC_MAX_LOGLEVEL + 1;
dent = debugfs_create_dir("sps", 0);
if (IS_ERR(dent)) {
@@ -2207,6 +2208,8 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props,
if (bam_props->ipc_loglevel)
bam->ipc_loglevel = bam_props->ipc_loglevel;
+ else
+ bam->ipc_loglevel = SPS_IPC_DEFAULT_LOGLEVEL;
ok = sps_bam_device_init(bam);
mutex_unlock(&bam->lock);
diff --git a/drivers/platform/msm/sps/spsi.h b/drivers/platform/msm/sps/spsi.h
index e09d3cda1d31..1b4ca69bee16 100644
--- a/drivers/platform/msm/sps/spsi.h
+++ b/drivers/platform/msm/sps/spsi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -52,6 +52,8 @@
#define MAX_MSG_LEN 80
#define SPS_IPC_LOGPAGES 10
#define SPS_IPC_REG_DUMP_FACTOR 3
+#define SPS_IPC_DEFAULT_LOGLEVEL 3
+#define SPS_IPC_MAX_LOGLEVEL 4
/* Connection mapping control struct */
struct sps_rm {