summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorVijayakumar <vsubbu@nvidia.com>2015-02-10 04:48:54 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 21:06:41 -0400
commitaa96b6bd1efa1e26a757080137486884972d248c (patch)
tree3e64695e63ba15462f325a1bd222c5b702326965 /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parentdbc46f0bf2dc4f6f03f53427fe0595fd8909e2db (diff)
gpu: nvgpu: optimize fecs status polling
bug 200078367 using udelay for fecs status polling during GR init phase brings down fecs transaction time to < 20usec from few hundred usec. Change-Id: I61a27daaf1187ac086a42779b46aa3fbee3b37f2 Signed-off-by: Vijayakumar <vsubbu@nvidia.com> Reviewed-on: http://git-master/r/691918 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
index 5b49ba8b..84391377 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GM20B GPC MMU 2 * GM20B GPC MMU
3 * 3 *
4 * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2015, 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,
@@ -672,7 +672,7 @@ static void gr_gm20b_load_gpccs_with_bootloader(struct gk20a *g)
672static int gr_gm20b_ctx_wait_lsf_ready(struct gk20a *g, u32 timeout, u32 val) 672static int gr_gm20b_ctx_wait_lsf_ready(struct gk20a *g, u32 timeout, u32 val)
673{ 673{
674 unsigned long end_jiffies = jiffies + msecs_to_jiffies(timeout); 674 unsigned long end_jiffies = jiffies + msecs_to_jiffies(timeout);
675 unsigned long delay = GR_IDLE_CHECK_DEFAULT; 675 unsigned long delay = GR_FECS_POLL_INTERVAL;
676 u32 reg; 676 u32 reg;
677 677
678 gk20a_dbg_fn(""); 678 gk20a_dbg_fn("");
@@ -681,8 +681,7 @@ static int gr_gm20b_ctx_wait_lsf_ready(struct gk20a *g, u32 timeout, u32 val)
681 reg = gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(0)); 681 reg = gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(0));
682 if (reg == val) 682 if (reg == val)
683 return 0; 683 return 0;
684 usleep_range(delay, delay * 2); 684 udelay(delay);
685 delay = min_t(u32, delay << 1, GR_IDLE_CHECK_MAX);
686 } while (time_before(jiffies, end_jiffies) || 685 } while (time_before(jiffies, end_jiffies) ||
687 !tegra_platform_is_silicon()); 686 !tegra_platform_is_silicon());
688 687