media: atomisp: improve IRQ handling debug messages
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 31 May 2020 09:55:21 +0000 (11:55 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Jun 2020 17:04:44 +0000 (19:04 +0200)
When an IRQ is not handled, it is nice to know what's the
reason.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_cmd.c

index c5a602f..8d0a437 100644 (file)
@@ -566,7 +566,7 @@ irqreturn_t atomisp_isr(int irq, void *dev)
 
        if (irq_infos & IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF) {
                dev_dbg_ratelimited(isp->dev,
-                                   "irq:0x%x (IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF)\n",
+                                   "irq:0x%x (SOF)\n",
                                    irq_infos);
                irq_infos &= ~IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF;
        }
@@ -591,14 +591,14 @@ irqreturn_t atomisp_isr(int irq, void *dev)
                        /* EOF Event does not have the css_pipe returned */
                        asd = __get_asd_from_port(isp, eof_event.event.port);
                        if (!asd) {
-                               dev_err(isp->dev, "%s:no subdev.event:%d",
+                               dev_err(isp->dev, "%s: ISYS event, but no subdev.event:%d",
                                        __func__, eof_event.event.type);
                                continue;
                        }
 
                        atomisp_eof_event(asd, eof_event.event.exp_id);
                        dev_dbg_ratelimited(isp->dev,
-                                           "%s EOF exp_id %d, asd %d\n",
+                                           "%s ISYS event: EOF exp_id %d, asd %d\n",
                                            __func__, eof_event.event.exp_id,
                                            asd->index);
                }
@@ -610,7 +610,7 @@ irqreturn_t atomisp_isr(int irq, void *dev)
 
        spin_unlock_irqrestore(&isp->lock, flags);
 
-       dev_dbg_ratelimited(isp->dev, "irq:0x%x\n", irq_infos);
+       dev_dbg_ratelimited(isp->dev, "irq:0x%x (unhandled)\n", irq_infos);
 
        return IRQ_WAKE_THREAD;
 
@@ -618,7 +618,8 @@ out_nowake:
        spin_unlock_irqrestore(&isp->lock, flags);
 
        if (irq_infos)
-               dev_dbg_ratelimited(isp->dev, "irq:0x%x\n", irq_infos);
+               dev_dbg_ratelimited(isp->dev, "irq:0x%x (ignored, as not streaming anymore)\n",
+                                   irq_infos);
 
        return IRQ_HANDLED;
 }