From 97108797a28faaf3c7249345611f68817a99f522 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Fri, 12 Feb 2016 14:15:52 -0800 Subject: gpu: nvgpu: enable semaphore acquire timeout only when timeouts_enabled is set Bug 1727687 Change-Id: I7a7a4a2011b029474122fdbfbeb02b6302a5902b Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/1011486 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (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 28cc3086..661c2c38 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -462,8 +462,7 @@ static void gk20a_init_fifo_pbdma_intr_descs(struct fifo_gk20a *f) /* Can be used for sw-methods, or represents * a recoverable timeout. */ f->intr.pbdma.restartable_0 = - pbdma_intr_0_device_pending_f() | - pbdma_intr_0_acquire_pending_f(); + pbdma_intr_0_device_pending_f(); } static int gk20a_init_fifo_setup_sw(struct gk20a *g) @@ -1653,6 +1652,12 @@ static u32 gk20a_fifo_handle_pbdma_intr(struct device *dev, 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 (g->timeouts_enabled) { + reset = true; + gk20a_err(dev_from_gk20a(g), + "semaphore acquire timeout!"); + } + handled |= pbdma_intr_0_acquire_pending_f(); } if (pbdma_intr_0 & pbdma_intr_0_pbentry_pending_f()) { -- cgit v1.2.2