Hi,
On 10/04/14 14:33, Russell King - ARM Linux wrote:
It looks like this is caused by something in the depths of OMAPDSS. I see a failure to allocate an order-9 page (2MB), which then provokes the OMAP DSS cleanup paths.
Is CONFIG_CMA disabled? I don't think we're able to allocate the framebuffer without CMA, except for very very small framebuffers.
We get to dss_dispc_uninitialize_irq(), which calls devm_free_irq(). Because CONFIG_DEBUG_SHIRQ is enabled, __free_irq ends up calling the handler, and we hang somewhere in the handler.
One for Tomi I think.
My previous boots have succeeded inspite of the allocation failure, so something has changed between 18a1a7a1d862 and a7963eb7f4c4 (Linus' commits) which has caused this to hang.
The last few messages from my debugging are:
omapfb omapfb: failed to allocate framebuffer omapfb omapfb: failed to allocate fbmem omapdss_compat_uninit() APPLY: dss_dispc_uninitialize_irq() omapdss_dispc 58001000.dispc: find_dr: dr=c1363dc0 devm_irq_match: irq 57,57 data c0c0a350,c0c0a350 devm_free_irq: 57 c0c0a350 genirq: __free_irq: calling omap_dispc_irq_handler+0x0/0x11c
The dss irq handler presumes that the DSS hardware is enabled, which is not the case at uninitialize time. So it crashes when the handler tries to access DISPC registers.
This doesn't happen normally, as the DSS IRQ is only shared between two DSS submodules, DISPC and DSI, and when one of them is enabled, effectively both are enabled. But even so, the code is not correct.
That said, I don't understand why it breaks now but not earlier, nothing has changed around that. Hmm, except now we use proper DT bindings, so the IRQ comes from DT. But I don't see why that would affect this.
I wonder what's the correct way to handle shared interrupts... Should I always keep the HW enabled when an irq handler is registered, or should I check whether the HW is enabled or not in the irq handler?
The latter sounds like an easy source for race issues, so I guess the former is better. It means doing request/free_irq at runtime instead or probe time, based on whether a display is enabled or not, though.
Tomi