Skip to content

Commit f9a760d

Browse files
hoshinolinajannau
authored andcommitted
media: apple: isp: Switch to threaded IRQs
There's no reason to run all the command handling in hard IRQ context. Let's switch to threaded IRQs, which should simplify some things. Signed-off-by: Asahi Lina <lina@asahilina.net>
1 parent b77fd42 commit f9a760d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • drivers/media/platform/apple/isp

drivers/media/platform/apple/isp/isp-fw.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ static irqreturn_t apple_isp_isr(int irq, void *dev)
9292
isp_mbox_write32(isp, ISP_MBOX_IRQ_ACK,
9393
isp_mbox_read32(isp, ISP_MBOX_IRQ_INTERRUPT));
9494

95+
return IRQ_WAKE_THREAD;
96+
}
97+
98+
static irqreturn_t apple_isp_isr_thread(int irq, void *dev)
99+
{
100+
struct apple_isp *isp = dev;
101+
95102
wake_up_interruptible_all(&isp->wait);
96103

97104
ipc_chan_handle(isp, isp->chan_sm);
@@ -116,7 +123,8 @@ static int isp_enable_irq(struct apple_isp *isp)
116123
{
117124
int err;
118125

119-
err = request_irq(isp->irq, apple_isp_isr, 0, "apple-isp", isp);
126+
err = request_threaded_irq(isp->irq, apple_isp_isr,
127+
apple_isp_isr_thread, 0, "apple-isp", isp);
120128
if (err < 0) {
121129
isp_err(isp, "failed to request IRQ#%u (%d)\n", isp->irq, err);
122130
return err;

0 commit comments

Comments
 (0)