bcm27xx: update patches from RPi foundation
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0742-media-bcm2835-unicam-Always-service-interrupts.patch
1 From b52dee833768d1cb3572bf8269baeda077d0e41b Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 13 May 2020 18:28:27 +0100
4 Subject: [PATCH] media: bcm2835-unicam: Always service interrupts
5
6 From when bringing up the driver, there was a check in the isr
7 to ignore interrupts (claiming them handled) should the driver
8 not be streaming.
9
10 The VPU now will not register a camera driver if it finds a
11 CSI2 node enabled in device tree, therefore this flawed check is
12 redundant.
13
14 https://github.com/raspberrypi/linux/issues/3602
15
16 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
17 ---
18 drivers/media/platform/bcm2835/bcm2835-unicam.c | 15 ---------------
19 1 file changed, 15 deletions(-)
20
21 --- a/drivers/media/platform/bcm2835/bcm2835-unicam.c
22 +++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c
23 @@ -766,12 +766,6 @@ static int unicam_all_nodes_streaming(st
24 return ret;
25 }
26
27 -static int unicam_all_nodes_disabled(struct unicam_device *dev)
28 -{
29 - return !dev->node[IMAGE_PAD].streaming &&
30 - !dev->node[METADATA_PAD].streaming;
31 -}
32 -
33 static void unicam_queue_event_sof(struct unicam_device *unicam)
34 {
35 struct v4l2_event event = {
36 @@ -801,15 +795,6 @@ static irqreturn_t unicam_isr(int irq, v
37 u64 ts;
38 int i;
39
40 - /*
41 - * Don't service interrupts if not streaming.
42 - * Avoids issues if the VPU should enable the
43 - * peripheral without the kernel knowing (that
44 - * shouldn't happen, but causes issues if it does).
45 - */
46 - if (unicam_all_nodes_disabled(unicam))
47 - return IRQ_HANDLED;
48 -
49 sta = reg_read(cfg, UNICAM_STA);
50 /* Write value back to clear the interrupts */
51 reg_write(cfg, UNICAM_STA, sta);