summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
index 7f43a6ce..cb6ef9c7 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
@@ -2041,21 +2041,21 @@ static int gr_gp10b_suspend_contexts(struct gk20a *g,
2041 struct channel_ctx_gk20a *ch_ctx = 2041 struct channel_ctx_gk20a *ch_ctx =
2042 &cilp_preempt_pending_ch->ch_ctx; 2042 &cilp_preempt_pending_ch->ch_ctx;
2043 struct gr_ctx_desc *gr_ctx = ch_ctx->gr_ctx; 2043 struct gr_ctx_desc *gr_ctx = ch_ctx->gr_ctx;
2044 unsigned long end_jiffies = jiffies + 2044 struct nvgpu_timeout timeout;
2045 msecs_to_jiffies(gk20a_get_gr_idle_timeout(g));
2046 2045
2047 gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg | gpu_dbg_intr, 2046 gk20a_dbg(gpu_dbg_fn | gpu_dbg_gpu_dbg | gpu_dbg_intr,
2048 "CILP preempt pending, waiting %lu msecs for preemption", 2047 "CILP preempt pending, waiting %lu msecs for preemption",
2049 gk20a_get_gr_idle_timeout(g)); 2048 gk20a_get_gr_idle_timeout(g));
2050 2049
2050 nvgpu_timeout_init(g, &timeout, gk20a_get_gr_idle_timeout(g),
2051 NVGPU_TIMER_CPU_TIMER);
2051 do { 2052 do {
2052 if (!gr_ctx->t18x.cilp_preempt_pending) 2053 if (!gr_ctx->t18x.cilp_preempt_pending)
2053 break; 2054 break;
2054 2055
2055 usleep_range(delay, delay * 2); 2056 usleep_range(delay, delay * 2);
2056 delay = min_t(u32, delay << 1, GR_IDLE_CHECK_MAX); 2057 delay = min_t(u32, delay << 1, GR_IDLE_CHECK_MAX);
2057 } while (time_before(jiffies, end_jiffies) 2058 } while (!nvgpu_timeout_expired(&timeout));
2058 || !tegra_platform_is_silicon());
2059 2059
2060 /* If cilp is still pending at this point, timeout */ 2060 /* If cilp is still pending at this point, timeout */
2061 if (gr_ctx->t18x.cilp_preempt_pending) 2061 if (gr_ctx->t18x.cilp_preempt_pending)