aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-08-19 18:14:43 -0400
committerLucas Stach <l.stach@pengutronix.de>2016-09-15 09:29:42 -0400
commit128a9b1dec4c379c98beb675383b49ff2d3a641d (patch)
treefa8a3d31a9927d756e88ffcadb1b8e08ede38ba6 /drivers/gpu
parent2e145a22486610100cb2c6d789f56bd0c6f27718 (diff)
drm/etnaviv: handle MMU exception in IRQ handler
Bit 30 of the interrupt status signals an MMU exception. Handle this condition properly and dump some useful registers. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.c15
-rw-r--r--drivers/gpu/drm/etnaviv/state_hi.xml.h9
2 files changed, 20 insertions, 4 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 9b61be847d45..39b5be3916d5 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1363,6 +1363,21 @@ static irqreturn_t irq_handler(int irq, void *data)
1363 intr &= ~VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR; 1363 intr &= ~VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR;
1364 } 1364 }
1365 1365
1366 if (intr & VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION) {
1367 int i;
1368
1369 dev_err_ratelimited(gpu->dev,
1370 "MMU fault status 0x%08x\n",
1371 gpu_read(gpu, VIVS_MMUv2_STATUS));
1372 for (i = 0; i < 4; i++) {
1373 dev_err_ratelimited(gpu->dev,
1374 "MMU %d fault addr 0x%08x\n",
1375 i, gpu_read(gpu,
1376 VIVS_MMUv2_EXCEPTION_ADDR(i)));
1377 }
1378 intr &= ~VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION;
1379 }
1380
1366 while ((event = ffs(intr)) != 0) { 1381 while ((event = ffs(intr)) != 0) {
1367 struct fence *fence; 1382 struct fence *fence;
1368 1383
diff --git a/drivers/gpu/drm/etnaviv/state_hi.xml.h b/drivers/gpu/drm/etnaviv/state_hi.xml.h
index 807a3d9e0dd5..43c73e2ed34f 100644
--- a/drivers/gpu/drm/etnaviv/state_hi.xml.h
+++ b/drivers/gpu/drm/etnaviv/state_hi.xml.h
@@ -8,10 +8,10 @@ http://0x04.net/cgit/index.cgi/rules-ng-ng
8git clone git://0x04.net/rules-ng-ng 8git clone git://0x04.net/rules-ng-ng
9 9
10The rules-ng-ng source files this header was generated from are: 10The rules-ng-ng source files this header was generated from are:
11- state_hi.xml ( 24309 bytes, from 2015-12-12 09:02:53) 11- state_hi.xml ( 25620 bytes, from 2016-08-19 22:07:37)
12- common.xml ( 18437 bytes, from 2015-12-12 09:02:53) 12- common.xml ( 20583 bytes, from 2016-06-07 05:22:38)
13 13
14Copyright (C) 2015 14Copyright (C) 2016
15*/ 15*/
16 16
17 17
@@ -78,9 +78,10 @@ Copyright (C) 2015
78#define VIVS_HI_AXI_STATUS_DET_RD_ERR 0x00000200 78#define VIVS_HI_AXI_STATUS_DET_RD_ERR 0x00000200
79 79
80#define VIVS_HI_INTR_ACKNOWLEDGE 0x00000010 80#define VIVS_HI_INTR_ACKNOWLEDGE 0x00000010
81#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__MASK 0x7fffffff 81#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__MASK 0x3fffffff
82#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__SHIFT 0 82#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__SHIFT 0
83#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC(x) (((x) << VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__SHIFT) & VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__MASK) 83#define VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC(x) (((x) << VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__SHIFT) & VIVS_HI_INTR_ACKNOWLEDGE_INTR_VEC__MASK)
84#define VIVS_HI_INTR_ACKNOWLEDGE_MMU_EXCEPTION 0x40000000
84#define VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR 0x80000000 85#define VIVS_HI_INTR_ACKNOWLEDGE_AXI_BUS_ERROR 0x80000000
85 86
86#define VIVS_HI_INTR_ENBL 0x00000014 87#define VIVS_HI_INTR_ENBL 0x00000014