From a9c6f595399074e88c16f3557e5acb29db1d52d5 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Mon, 4 Jan 2016 10:28:04 -0800 Subject: 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 Reviewed-on: http://git-master/r/928827 GVS: Gerrit_Virtual_Submit Reviewed-by: Vladislav Buzov --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') 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 @@ /* * GK20A Graphics FIFO (gr host) * - * Copyright (c) 2011-2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * 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, pbdma_intr_0); } + if (pbdma_intr_0 & pbdma_intr_0_acquire_pending_f()) { + u32 val = gk20a_readl(g, pbdma_acquire_r(pbdma_id)); + val &= ~pbdma_acquire_timeout_en_enable_f(); + gk20a_writel(g, pbdma_acquire_r(pbdma_id), val); + } + if (pbdma_intr_0 & pbdma_intr_0_pbentry_pending_f()) { gk20a_fifo_reset_pbdma_header(g, pbdma_id); gk20a_fifo_reset_pbdma_method(g, pbdma_id, 0); -- cgit v1.2.2