diff options
author | Richard Zhao <rizhao@nvidia.com> | 2016-01-04 13:28:04 -0500 |
---|---|---|
committer | Vladislav Buzov <vbuzov@nvidia.com> | 2016-01-10 23:07:53 -0500 |
commit | a9c6f595399074e88c16f3557e5acb29db1d52d5 (patch) | |
tree | 2d2665668bac915b5598d83881a1efec892be435 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | 3484fd0d1365c6f97723d97cb45664aa75c45f32 (diff) |
gpu: nvgpu: enable semaphore acquire timeout
It'll detect dead semaphore acquire. The worst case is when
ACQUIRE_SWITCH is disabled, semaphore acquire will poll and
consume full gpu timeslicees.
The timeout value is set to half of channel WDT.
Bug 1636800
Change-Id: Ida6ccc534006a191513edf47e7b82d4b5b758684
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/928827
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 1727cf1d..5c99877b 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Graphics FIFO (gr host) | 2 | * GK20A Graphics FIFO (gr host) |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -1642,6 +1642,12 @@ static u32 gk20a_fifo_handle_pbdma_intr(struct device *dev, | |||
1642 | pbdma_intr_0); | 1642 | pbdma_intr_0); |
1643 | } | 1643 | } |
1644 | 1644 | ||
1645 | if (pbdma_intr_0 & pbdma_intr_0_acquire_pending_f()) { | ||
1646 | u32 val = gk20a_readl(g, pbdma_acquire_r(pbdma_id)); | ||
1647 | val &= ~pbdma_acquire_timeout_en_enable_f(); | ||
1648 | gk20a_writel(g, pbdma_acquire_r(pbdma_id), val); | ||
1649 | } | ||
1650 | |||
1645 | if (pbdma_intr_0 & pbdma_intr_0_pbentry_pending_f()) { | 1651 | if (pbdma_intr_0 & pbdma_intr_0_pbentry_pending_f()) { |
1646 | gk20a_fifo_reset_pbdma_header(g, pbdma_id); | 1652 | gk20a_fifo_reset_pbdma_header(g, pbdma_id); |
1647 | gk20a_fifo_reset_pbdma_method(g, pbdma_id, 0); | 1653 | gk20a_fifo_reset_pbdma_method(g, pbdma_id, 0); |