bcm27xx: update to latest patches from RPi foundation
[oweals/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0333-drm-v3d-Suppress-all-but-the-first-MMU-error.patch
1 From f1f228c84864bad0bb07de1c72ceafaec035ac15 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Mon, 11 Nov 2019 20:18:08 +0000
4 Subject: [PATCH] drm/v3d: Suppress all but the first MMU error
5
6 The v3d driver currently encounters a lot of MMU PTE exceptions, so
7 only log the first to avoid swamping the kernel log.
8
9 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
10 ---
11  drivers/gpu/drm/v3d/v3d_irq.c | 3 +++
12  1 file changed, 3 insertions(+)
13
14 --- a/drivers/gpu/drm/v3d/v3d_irq.c
15 +++ b/drivers/gpu/drm/v3d/v3d_irq.c
16 @@ -177,6 +177,7 @@ v3d_hub_irq(int irq, void *arg)
17                         "GMP",
18                 };
19                 const char *client = "?";
20 +               static int logged_error;
21  
22                 V3D_WRITE(V3D_MMU_CTL, V3D_READ(V3D_MMU_CTL));
23  
24 @@ -186,6 +187,7 @@ v3d_hub_irq(int irq, void *arg)
25                                 client = v3d41_axi_ids[axi_id];
26                 }
27  
28 +               if (!logged_error)
29                 dev_err(v3d->dev, "MMU error from client %s (%d) at 0x%llx%s%s%s\n",
30                         client, axi_id, (long long)vio_addr,
31                         ((intsts & V3D_HUB_INT_MMU_WRV) ?
32 @@ -194,6 +196,7 @@ v3d_hub_irq(int irq, void *arg)
33                          ", pte invalid" : ""),
34                         ((intsts & V3D_HUB_INT_MMU_CAP) ?
35                          ", cap exceeded" : ""));
36 +               logged_error = 1;
37                 status = IRQ_HANDLED;
38         }
39