Merge "msm:ais:Handling bigger value than upper bound in msm_cpp_irq api"
This commit is contained in:
commit
d2c711c7ab
1 changed files with 10 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -836,10 +836,15 @@ static irqreturn_t msm_cpp_irq(int irq_num, void *data)
|
||||||
if (irq_status & 0x8) {
|
if (irq_status & 0x8) {
|
||||||
tx_level = msm_camera_io_r(cpp_dev->base +
|
tx_level = msm_camera_io_r(cpp_dev->base +
|
||||||
MSM_CPP_MICRO_FIFO_TX_STAT) >> 2;
|
MSM_CPP_MICRO_FIFO_TX_STAT) >> 2;
|
||||||
|
if (tx_level < MSM_CPP_TX_FIFO_LEVEL) {
|
||||||
for (i = 0; i < tx_level; i++) {
|
for (i = 0; i < tx_level; i++) {
|
||||||
tx_fifo[i] = msm_camera_io_r(cpp_dev->base +
|
tx_fifo[i] = msm_camera_io_r(cpp_dev->base +
|
||||||
MSM_CPP_MICRO_FIFO_TX_DATA);
|
MSM_CPP_MICRO_FIFO_TX_DATA);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
pr_err("Fatal invalid tx level %d", tx_level);
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
spin_lock_irqsave(&cpp_dev->tasklet_lock, flags);
|
spin_lock_irqsave(&cpp_dev->tasklet_lock, flags);
|
||||||
queue_cmd = &cpp_dev->tasklet_queue_cmd[cpp_dev->taskletq_idx];
|
queue_cmd = &cpp_dev->tasklet_queue_cmd[cpp_dev->taskletq_idx];
|
||||||
if (queue_cmd->cmd_used) {
|
if (queue_cmd->cmd_used) {
|
||||||
|
@ -893,6 +898,7 @@ static irqreturn_t msm_cpp_irq(int irq_num, void *data)
|
||||||
pr_debug("DEBUG_R1: 0x%x\n",
|
pr_debug("DEBUG_R1: 0x%x\n",
|
||||||
msm_camera_io_r(cpp_dev->base + 0x8C));
|
msm_camera_io_r(cpp_dev->base + 0x8C));
|
||||||
}
|
}
|
||||||
|
err:
|
||||||
msm_camera_io_w(irq_status, cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR);
|
msm_camera_io_w(irq_status, cpp_dev->base + MSM_CPP_MICRO_IRQGEN_CLR);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue