summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-03-22 19:57:56 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-23 23:34:50 -0400
commitab401c70682c98adae6f3c5c7225fdc8e1294fc7 (patch)
tree7cd1344ee97b628cf347c96a9f20dfa5fd371214 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
parentfb71b882750332fde543550adffe3f70f1d47d47 (diff)
gpu: nvgpu: fix running condition on fifo isr
The fifo interrupt path was reading the PBDMA interrupt status after clearing interrupts and this could lead to a situation in which the host may have advanced to another channel, leading to the recovery code resetting the wrong channel. Bug 200278729 JIRA: EVLR-1036 Change-Id: I392423d1eaa8d23acf88454bf113c015e649e13d Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1326461 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 60190521..8f7a2e22 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -2289,6 +2289,8 @@ static u32 gk20a_fifo_handle_pbdma_intr(struct device *dev,
2289{ 2289{
2290 u32 pbdma_intr_0 = gk20a_readl(g, pbdma_intr_0_r(pbdma_id)); 2290 u32 pbdma_intr_0 = gk20a_readl(g, pbdma_intr_0_r(pbdma_id));
2291 u32 pbdma_intr_1 = gk20a_readl(g, pbdma_intr_1_r(pbdma_id)); 2291 u32 pbdma_intr_1 = gk20a_readl(g, pbdma_intr_1_r(pbdma_id));
2292 u32 status = gk20a_readl(g, fifo_pbdma_status_r(pbdma_id));
2293
2292 u32 handled = 0; 2294 u32 handled = 0;
2293 u32 error_notifier = NVGPU_CHANNEL_PBDMA_ERROR; 2295 u32 error_notifier = NVGPU_CHANNEL_PBDMA_ERROR;
2294 bool reset = false; 2296 bool reset = false;
@@ -2374,7 +2376,6 @@ static u32 gk20a_fifo_handle_pbdma_intr(struct device *dev,
2374 2376
2375 if (reset) { 2377 if (reset) {
2376 /* Remove the channel from runlist */ 2378 /* Remove the channel from runlist */
2377 u32 status = gk20a_readl(g, fifo_pbdma_status_r(pbdma_id));
2378 u32 id = fifo_pbdma_status_id_v(status); 2379 u32 id = fifo_pbdma_status_id_v(status);
2379 if (fifo_pbdma_status_id_type_v(status) 2380 if (fifo_pbdma_status_id_type_v(status)
2380 == fifo_pbdma_status_id_type_chid_v()) { 2381 == fifo_pbdma_status_id_type_chid_v()) {