]> git.baikalelectronics.ru Git - kernel.git/commit
staging: imx/drm: request irq only after adding the crtc
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 20 Feb 2013 02:57:01 +0000 (10:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Mar 2013 16:31:48 +0000 (09:31 -0700)
commit0034e93f4ea848c9b330296f6d94a51b7a4bd375
tree23952890412449a978d3b59ff6f10472c820e99c
parentca70d8896d7a0c8cf967c2b5836b18b3e47de125
staging: imx/drm: request irq only after adding the crtc

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.

The patch fixes a kernel panic [1], which has been on linux-next since
Jan 8 [2].

[1] http://thread.gmane.org/gmane.linux.ports.arm.kernel/218858
[2] http://thread.gmane.org/gmane.linux.ports.arm.kernel/208192

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/ipuv3-crtc.c