2019-12-03 14:13:34

by Pintu Kumar

[permalink] [raw]
Subject: interrupt handler not getting called after resume

Hi All,

I have one general query.

If an interrupt handler is NOT getting called (for one device) after
the system resume (from snapshot image), then what could be the issue?
Note:
* The suspend worked perfectly fine.
* The runtime suspend/resume of the system is also working fine.

If anybody have experienced this situation and fixed it, please let us know.
It will be a great input for further debugging.

Regards,
Pintu


2019-12-03 19:00:24

by anish singh

[permalink] [raw]
Subject: Re: interrupt handler not getting called after resume

On Tue, Dec 3, 2019 at 6:12 AM Pintu Agarwal <[email protected]> wrote:
>
> Hi All,
>
> I have one general query.
>
> If an interrupt handler is NOT getting called (for one device) after
> the system resume (from snapshot image), then what could be the issue?

Most likely during resume the interrupt was not enabled. So check
irq status registers to see in the working and non working case.

> Note:
> * The suspend worked perfectly fine.
> * The runtime suspend/resume of the system is also working fine.
>
> If anybody have experienced this situation and fixed it, please let us know.
> It will be a great input for further debugging.

Need more context.
>
> Regards,
> Pintu
>
> _______________________________________________
> Kernelnewbies mailing list
> [email protected]
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

2019-12-04 09:50:45

by Pintu Kumar

[permalink] [raw]
Subject: Re: interrupt handler not getting called after resume

On Wed, 4 Dec 2019 at 00:28, anish singh <[email protected]> wrote:
>
> On Tue, Dec 3, 2019 at 6:12 AM Pintu Agarwal <[email protected]> wrote:
> >
> > Hi All,
> >
> > I have one general query.
> >
> > If an interrupt handler is NOT getting called (for one device) after
> > the system resume (from snapshot image), then what could be the issue?
>
> Most likely during resume the interrupt was not enabled. So check
> irq status registers to see in the working and non working case.
>
Oh sorry, I forgot to mention one thing.
After resume, I can see that the interrupts are visible under /proc/interrupts.
# cat /proc/interrupts
CPU0 CPU1
[...]
416: 1 0 IPU (null)
417: 0 0 IPU (null)
418: 0 0 IPU imx_drm ===> HDMI
419: 2242 2 IPU imx_drm ===> LCD
[...]

The interrupts are coming only for LCD display and thus its irq
handler is getting called.
But the interrupts are not coming for HDMI case, thus HDMI gives
"vblank timeout issue".
Apart from this I also tried calling enable_irq(irq) after resume, but
it did not help much.

2019-12-04 19:37:05

by anish singh

[permalink] [raw]
Subject: Re: interrupt handler not getting called after resume

On Wed, Dec 4, 2019 at 1:49 AM Pintu Agarwal <[email protected]> wrote:
>
> On Wed, 4 Dec 2019 at 00:28, anish singh <[email protected]> wrote:
> >
> > On Tue, Dec 3, 2019 at 6:12 AM Pintu Agarwal <[email protected]> wrote:
> > >
> > > Hi All,
> > >
> > > I have one general query.
> > >
> > > If an interrupt handler is NOT getting called (for one device) after
> > > the system resume (from snapshot image), then what could be the issue?
> >
> > Most likely during resume the interrupt was not enabled. So check
> > irq status registers to see in the working and non working case.
> >
> Oh sorry, I forgot to mention one thing.
> After resume, I can see that the interrupts are visible under /proc/interrupts.
> # cat /proc/interrupts
> CPU0 CPU1
> [...]
> 416: 1 0 IPU (null)
> 417: 0 0 IPU (null)
> 418: 0 0 IPU imx_drm ===> HDMI
> 419: 2242 2 IPU imx_drm ===> LCD
> [...]
>
> The interrupts are coming only for LCD display and thus its irq
> handler is getting called.
> But the interrupts are not coming for HDMI case, thus HDMI gives
> "vblank timeout issue".

Is it something to do with MHL cable? Have you used scope
to find out if the interrupt was actually triggered?

> Apart from this I also tried calling enable_irq(irq) after resume, but
> it did not help much.

2019-12-30 13:51:41

by Pintu Kumar

[permalink] [raw]
Subject: Re: interrupt handler not getting called after resume

Dear Anish,

On Thu, 5 Dec 2019 at 00:55, anish singh <[email protected]> wrote:
>
> On Wed, Dec 4, 2019 at 1:49 AM Pintu Agarwal <[email protected]> wrote:
> >
> > On Wed, 4 Dec 2019 at 00:28, anish singh <[email protected]> wrote:
> > >
> > > On Tue, Dec 3, 2019 at 6:12 AM Pintu Agarwal <[email protected]> wrote:
> > > >
> > > > Hi All,
> > > >
> > > > I have one general query.
> > > >
> > > > If an interrupt handler is NOT getting called (for one device) after
> > > > the system resume (from snapshot image), then what could be the issue?
> > >
> > > Most likely during resume the interrupt was not enabled. So check
> > > irq status registers to see in the working and non working case.
> > >
> > Oh sorry, I forgot to mention one thing.
> > After resume, I can see that the interrupts are visible under /proc/interrupts.
> > # cat /proc/interrupts
> > CPU0 CPU1
> > [...]
> > 416: 1 0 IPU (null)
> > 417: 0 0 IPU (null)
> > 418: 0 0 IPU imx_drm ===> HDMI
> > 419: 2242 2 IPU imx_drm ===> LCD
> > [...]
> >
> > The interrupts are coming only for LCD display and thus its irq
> > handler is getting called.
> > But the interrupts are not coming for HDMI case, thus HDMI gives
> > "vblank timeout issue".

Just wanted to update you that I have resolved the "vblank timeout
issue" for HDMI (by restoring clock data during resume path).
Now the ipu-v3 interrupts are coming even for HDMI crtc.

But HDMI display is still not working. May be this is another issue.

Anyways, thank you so much for your support :)


Regards,
Pintu