]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
drivers/video: fsl-diu-fb: fix bugs in interrupt handling
authorAnatolij Gustschin <agust@denx.de>
Sat, 19 Jan 2013 09:59:10 +0000 (10:59 +0100)
committerAnatolij Gustschin <agust@denx.de>
Tue, 29 Jan 2013 08:29:57 +0000 (08:29 +0000)
commitb2639b5f1d01f218dc95537a1c352b3a551c4dd5
tree220965a5adad447c7cce418035c12c4cfc97be7c
parent5d3cc311a76073f6e0a27c0752f7e41f69e95ea7
drivers/video: fsl-diu-fb: fix bugs in interrupt handling

Since commit f74de500 "drivers/video: fsl-diu-fb: streamline
enabling of interrupts" the interrupt handling in the driver
is broken. Enabling diu interrupt causes an interrupt storm and
results in system lockup.

The cookie for the interrupt handler function passed to request_irq()
is wrong (it must be a pointer to the diu struct, and not the address
of the pointer to the diu struct). As a result the interrupt handler
can not read diu registers and acknowledge the interrupt. Fix cookie
arguments for request_irq() and free_irq().

Registering the diu interrupt handler in probe() must happen before
install_fb() calls since this function registers framebuffer devices
and if fbcon tries to take over framebuffer after registering a frame
buffer device, it will call fb_open of the diu driver and enable the
interrupts. At this time the diu interrupt handler must be registered
already.

Disabling the interrupts in fsl_diu_release() must happen only if all
other AOIs are closed. Otherwise closing an overlay plane will disable
the interrupts even if the primary frame buffer plane is opened. Add
an appropriate check in the release function.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Timur Tabi <timur@tabi.org>
Cc: stable@vger.kernel.org
drivers/video/fsl-diu-fb.c