Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 223de5ba authored by Yan He's avatar Yan He
Browse files

msm: sps: check new pending IRQs before exit IRQ handler



New pipe IRQs may come when the IRQ handler is handling the exposed
IRQs on other pipes. Add the checking here to handle the new coming
IRQs.

CRs-fixed: 720964
Change-Id: Ic9377fbf74c399c5d5c0b500feef762e45ec0afb
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent e4b5be8f
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ int sps_bam_check_irq(struct sps_bam *dev)

	spin_lock_irqsave(&dev->isr_lock, flags);

polling:
	/* Get BAM interrupt source(s) */
	if ((dev->state & BAM_STATE_MTI) == 0) {
		u32 mask = dev->pipe_active_mask;
@@ -181,6 +182,26 @@ int sps_bam_check_irq(struct sps_bam *dev)
		dev->irq_from_disabled_pipe++;
	}

	if (dev->props.options & SPS_BAM_RES_CONFIRM) {
		u32 mask = dev->pipe_active_mask;
		enum sps_callback_case cb_case;
		source = bam_check_irq_source(dev->base, dev->props.ee,
						mask, &cb_case);

		SPS_DBG1(
			"sps:check if there is any new IRQ coming:bam=%pa;source=0x%x;mask=0x%x.\n",
				BAM_ID(dev), source, mask);

		if ((source & (1UL << 31)) && (dev->props.callback)) {
			SPS_DBG1("sps:bam=%pa;callback for case %d.\n",
				BAM_ID(dev), cb_case);
			dev->props.callback(cb_case, dev->props.user);
		}

		if (source)
			goto polling;
	}

	spin_unlock_irqrestore(&dev->isr_lock, flags);

	return ret;