Skip to content

Commit ba38b68

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 70024a4 commit ba38b68

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
@@ -93,6 +93,13 @@ static irqreturn_t apple_isp_isr(int irq, void *dev)
9393
isp_mbox_write32(isp, ISP_MBOX_IRQ_ACK,
9494
isp_mbox_read32(isp, ISP_MBOX_IRQ_INTERRUPT));
9595

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

98105
ipc_chan_handle(isp, isp->chan_sm);
@@ -117,7 +124,8 @@ static int isp_enable_irq(struct apple_isp *isp)
117124
{
118125
int err;
119126

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

0 commit comments

Comments
 (0)