summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/kernel/vdso/gettimeofday.S1
-rw-r--r--drivers/media/platform/msm/ais/isp/msm_isp_util.c4
-rw-r--r--drivers/soc/qcom/scm_qcpe.c4
-rw-r--r--drivers/spmi/spmi-pmic-arb.c21
-rw-r--r--include/sound/q6core.h4
-rw-r--r--sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c5
-rw-r--r--sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c4
-rw-r--r--sound/soc/msm/qdsp6v2/msm-qti-pp-config.c5
-rw-r--r--sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c5
-rw-r--r--sound/soc/msm/qdsp6v2/q6core.c6
10 files changed, 31 insertions, 28 deletions
diff --git a/arch/arm64/kernel/vdso/gettimeofday.S b/arch/arm64/kernel/vdso/gettimeofday.S
index c97ce91cf023..c39872a7b03c 100644
--- a/arch/arm64/kernel/vdso/gettimeofday.S
+++ b/arch/arm64/kernel/vdso/gettimeofday.S
@@ -256,7 +256,6 @@ monotonic_raw:
seqcnt_check fail=monotonic_raw
/* All computations are done with left-shifted nsecs. */
- lsl x14, x14, x12
get_nsec_per_sec res=x9
lsl x9, x9, x12
diff --git a/drivers/media/platform/msm/ais/isp/msm_isp_util.c b/drivers/media/platform/msm/ais/isp/msm_isp_util.c
index e4e368424007..2ba19b13535b 100644
--- a/drivers/media/platform/msm/ais/isp/msm_isp_util.c
+++ b/drivers/media/platform/msm/ais/isp/msm_isp_util.c
@@ -919,9 +919,7 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd,
break;
case VIDIOC_MSM_ISP_CFG_STREAM:
mutex_lock(&vfe_dev->core_mutex);
- mutex_lock(&vfe_dev->buf_mgr->lock);
rc = msm_isp_cfg_axi_stream(vfe_dev, arg);
- mutex_unlock(&vfe_dev->buf_mgr->lock);
mutex_unlock(&vfe_dev->core_mutex);
break;
case VIDIOC_MSM_ISP_CFG_HW_STATE:
@@ -1022,9 +1020,7 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd,
break;
case VIDIOC_MSM_ISP_CFG_STATS_STREAM:
mutex_lock(&vfe_dev->core_mutex);
- mutex_lock(&vfe_dev->buf_mgr->lock);
rc = msm_isp_cfg_stats_stream(vfe_dev, arg);
- mutex_unlock(&vfe_dev->buf_mgr->lock);
mutex_unlock(&vfe_dev->core_mutex);
break;
case VIDIOC_MSM_ISP_UPDATE_STATS_STREAM:
diff --git a/drivers/soc/qcom/scm_qcpe.c b/drivers/soc/qcom/scm_qcpe.c
index c9df0957f359..4b44d9694092 100644
--- a/drivers/soc/qcom/scm_qcpe.c
+++ b/drivers/soc/qcom/scm_qcpe.c
@@ -416,11 +416,11 @@ static int scm_call_qcpe(u32 fn_id, struct scm_desc *desc)
static bool opened;
static u32 handle;
u32 size_bytes;
- int i;
- uint64_t arglen = desc->arginfo & 0xf;
struct smc_params_s smc_params = {0,};
int ret;
#ifdef CONFIG_GHS_VMM
+ int i;
+ uint64_t arglen = desc->arginfo & 0xf;
struct ion_handle *ihandle = NULL;
#endif
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index d3130cfd6433..4e4b39c26e89 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018, 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
@@ -691,19 +691,26 @@ static int qpnpint_irq_set_type(struct irq_data *d, unsigned int flow_type)
if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) {
type.type |= bit_mask_irq;
if (flow_type & IRQF_TRIGGER_RISING)
- type.polarity_high |= bit_mask_irq;
+ type.polarity_high |= bit_mask_irq;
+ else
+ type.polarity_high &= ~bit_mask_irq;
if (flow_type & IRQF_TRIGGER_FALLING)
- type.polarity_low |= bit_mask_irq;
+ type.polarity_low |= bit_mask_irq;
+ else
+ type.polarity_low &= ~bit_mask_irq;
} else {
if ((flow_type & (IRQF_TRIGGER_HIGH)) &&
(flow_type & (IRQF_TRIGGER_LOW)))
return -EINVAL;
type.type &= ~bit_mask_irq; /* level trig */
- if (flow_type & IRQF_TRIGGER_HIGH)
- type.polarity_high |= bit_mask_irq;
- else
- type.polarity_low |= bit_mask_irq;
+ if (flow_type & IRQF_TRIGGER_HIGH) {
+ type.polarity_high |= bit_mask_irq;
+ type.polarity_low &= ~bit_mask_irq;
+ } else {
+ type.polarity_low |= bit_mask_irq;
+ type.polarity_high &= ~bit_mask_irq;
+ }
}
qpnpint_spmi_write(d, QPNPINT_REG_SET_TYPE, &type, sizeof(type));
diff --git a/include/sound/q6core.h b/include/sound/q6core.h
index e70e4ba9b968..148df25cbd51 100644
--- a/include/sound/q6core.h
+++ b/include/sound/q6core.h
@@ -19,8 +19,10 @@
#define AVCS_CMD_ADSP_EVENT_GET_STATE 0x0001290C
#define AVCS_CMDRSP_ADSP_EVENT_GET_STATE 0x0001290D
+#define AVCS_SERVICES_AND_STATIC_MODULES_READY 0x1
+#define AVCS_SERVICE_AND_ALL_MODULES_READY 0x5
-bool q6core_is_adsp_ready(void);
+int q6core_is_adsp_ready(void);
int q6core_add_remove_pool_pages(phys_addr_t buf_add, uint32_t bufsz,
uint32_t mempool_id, bool add_pages);
diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
index 15134a0d662e..69951e12ecb1 100644
--- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c
@@ -3748,9 +3748,8 @@ static int msm_compr_adsp_stream_cmd_put(struct snd_kcontrol *kcontrol,
goto done;
}
-
- if ((sizeof(struct msm_adsp_event_data) + event_data->payload_len) >=
- sizeof(ucontrol->value.bytes.data)) {
+ if (event_data->payload_len > sizeof(ucontrol->value.bytes.data)
+ - sizeof(struct msm_adsp_event_data)) {
pr_err("%s param length=%d exceeds limit",
__func__, event_data->payload_len);
ret = -EINVAL;
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c
index 11b86cb5ff5c..280c665dded4 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c
@@ -1165,8 +1165,8 @@ static int msm_pcm_adsp_stream_cmd_put(struct snd_kcontrol *kcontrol,
goto done;
}
- if ((sizeof(struct msm_adsp_event_data) + event_data->payload_len) >=
- sizeof(ucontrol->value.bytes.data)) {
+ if (event_data->payload_len > sizeof(ucontrol->value.bytes.data)
+ - sizeof(struct msm_adsp_event_data)) {
pr_err("%s param length=%d exceeds limit",
__func__, event_data->payload_len);
ret = -EINVAL;
diff --git a/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c b/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
index 1ddb3845cd40..e890e6a71fb3 100644
--- a/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
+++ b/sound/soc/msm/qdsp6v2/msm-qti-pp-config.c
@@ -982,8 +982,9 @@ int msm_adsp_inform_mixer_ctl(struct snd_soc_pcm_runtime *rtd,
event_data = (struct msm_adsp_event_data *)payload;
kctl->info(kctl, &kctl_info);
- if (sizeof(struct msm_adsp_event_data)
- + event_data->payload_len > kctl_info.count) {
+
+ if (event_data->payload_len >
+ kctl_info.count - sizeof(struct msm_adsp_event_data)) {
pr_err("%s: payload length exceeds limit of %u bytes.\n",
__func__, kctl_info.count);
ret = -EINVAL;
diff --git a/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
index 72dd751bb0d8..3b53614aba31 100644
--- a/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-transcode-loopback-q6-v2.c
@@ -692,9 +692,8 @@ static int msm_transcode_stream_cmd_put(struct snd_kcontrol *kcontrol,
goto done;
}
-
- if ((sizeof(struct msm_adsp_event_data) + event_data->payload_len) >=
- sizeof(ucontrol->value.bytes.data)) {
+ if (event_data->payload_len > sizeof(ucontrol->value.bytes.data)
+ - sizeof(struct msm_adsp_event_data)) {
pr_err("%s param length=%d exceeds limit",
__func__, event_data->payload_len);
ret = -EINVAL;
diff --git a/sound/soc/msm/qdsp6v2/q6core.c b/sound/soc/msm/qdsp6v2/q6core.c
index ec018c24591f..d736af0c35b0 100644
--- a/sound/soc/msm/qdsp6v2/q6core.c
+++ b/sound/soc/msm/qdsp6v2/q6core.c
@@ -636,10 +636,10 @@ uint32_t core_set_dolby_manufacturer_id(int manufacturer_id)
return rc;
}
-bool q6core_is_adsp_ready(void)
+int q6core_is_adsp_ready(void)
{
int rc = 0;
- bool ret = false;
+ int ret = false;
struct apr_hdr hdr;
pr_debug("%s: enter\n", __func__);
@@ -666,7 +666,7 @@ bool q6core_is_adsp_ready(void)
if (rc > 0 && q6core_lcl.bus_bw_resp_received) {
/* ensure to read updated param by callback thread */
rmb();
- ret = !!q6core_lcl.param;
+ ret = q6core_lcl.param;
}
}
bail: