From b1fc42302b75bb9c4940317e3bf2f1e2efdb3a1a Mon Sep 17 00:00:00 2001 From: Manjunath Hadli Date: Fri, 13 Apr 2012 04:43:10 -0300 Subject: [media] davinci: vpif: add check for genuine interrupts in the isr As the same interrupt is shared between capture and display devices, sometimes we get isr calls where the interrupt might not genuinely belong to capture or display. Hence, add a condition in the isr to check for interrupt ownership and channel number to make sure we do not service wrong interrupts. Signed-off-by: Manjunath Hadli Signed-off-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/davinci/vpif_display.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/media/video/davinci/vpif_display.c') diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index e6488ee7db18..a5049a92f851 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c @@ -307,6 +307,9 @@ static irqreturn_t vpif_channel_isr(int irq, void *dev_id) int channel_id = 0; channel_id = *(int *)(dev_id); + if (!vpif_intr_status(channel_id + 2)) + return IRQ_NONE; + ch = dev->dev[channel_id]; field = ch->common[VPIF_VIDEO_INDEX].fmt.fmt.pix.field; for (i = 0; i < VPIF_NUMOBJECTS; i++) { -- cgit v1.2.3