]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00221370 IPUv3:Clean up IPUv3 interrupt handler
authorLiu Ying <Ying.Liu@freescale.com>
Thu, 30 Aug 2012 01:39:59 +0000 (09:39 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:21 +0000 (08:35 +0200)
commit3b2a98feac6b2a955135c13c28271549a60dc067
tree2824c7d0ae1410ecb543e3dbfa6d79c9ed7be77b
parent0aa21561a6aff5d0793102059cf0f8dabe7cfa0f
ENGR00221370 IPUv3:Clean up IPUv3 interrupt handler

1) In the interrupt handler, we access sync interrupt
   control registers 2 times, and each time with spin
   lock being held and then released, which may cause
   potential racing on the registers. We see that
   as long as the racing happens with two displays
   enabled on the same IPU, one IPU display channel
   will lose EOF interrupt and it makes its fb's pan
   display ioctrl fail with timeout. This patch changes
   to hold the spin lock one time for the whole irq
   handler, as the handler should return quickly.
   Holding and releasing the spin lock unnecessarily
   may bring performance penalty as well.
2) We do not need to use spin_lock_irqsave() and
   spin_unlock_irqrestore() in the interrupt handler,
   as we are already in the hard irq context. Using
   spin_lock() and spin_unlock() is enough to protect
   the registers.
3) Clear an interrupt control bit as soon as its related
   handler finishes.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit c5d3731fa0880a65efafb4826d3722aacb79edd5)
drivers/mxc/ipu3/ipu_common.c