[PATCH] staging: imx/drm: request irq only after adding the crtc

Lothar Waßmann LW at KARO-electronics.de
Thu Feb 21 02:10:31 EST 2013


Hi,

Matt Sealey writes:
> On Tue, Feb 19, 2013 at 8:35 AM, Philipp Zabel <p.zabel at pengutronix.de> wrote:
> > 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 at 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
___________________________________________________________



More information about the linux-arm-kernel mailing list