[PATCH] staging: imx/drm: request irq only after adding the crtc
From: Lothar Waßmann <hidden>
Date: 2013-02-21 07:10:31
Hi, Matt Sealey writes:
On Tue, Feb 19, 2013 at 8:35 AM, Philipp Zabel [off-list ref] wrote:quoted
If the bootloader already enabled the display, the interrupt handler will be called as soon as it is registered. If the CRTC is not already added at this time, the call to imx_drm_handle_vblank will result in a NULL pointer dereference. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>Doesn't this imply that the bootloader doesn't properly quiesce all interrupt-causing modules and halt all dma operations? Sean Bean said it best: One does not simply walk into Mordor! I am not nacking the patch (since it would not change behavior at all for those scenarios where quiescence of interrupts and dma was done properly before the handover) but I am really unsure that this sets a good precedent.. is this all about getting a "glitch free" splash screen displayed between bootloader and kernel?
IMO its more about defensive programming. Registering an interrupt handler only after everything that the handler needs has been initialized is a Good Thing(TM), no matter whether the interrupt could possibly occur or not. Lothar Wa?mann -- ___________________________________________________________ Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10 Gesch?ftsf?hrer: Matthias Kaussen Handelsregistereintrag: Amtsgericht Aachen, HRB 4996 www.karo-electronics.de | info at karo-electronics.de ___________________________________________________________