From 797dde3e32647df3b616cea67f4defae59d38b3f Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Tue, 27 Feb 2018 11:54:30 -0800 Subject: gpu: nvgpu: gv11b: disable/enable runlist sched during tsg preempt Disable sched before tsg preempt and re-enable after preempt is done or timed out. This is a WAR to fix Bug 2065990. Bug 2065990 Change-Id: I5f807449960d83366a3ed8c352ba4627fc1e7836 Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1665319 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index 9c64675f..7e0ce4c6 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c @@ -837,6 +837,9 @@ int gv11b_fifo_preempt_tsg(struct gk20a *g, u32 tsgid) nvgpu_mutex_acquire(&f->runlist_info[runlist_id].runlist_lock); + /* WAR for Bug 2065990 */ + gk20a_fifo_disable_tsg_sched(g, &f->tsg[tsgid]); + mutex_ret = nvgpu_pmu_mutex_acquire(&g->pmu, PMU_MUTEX_ID_FIFO, &token); ret = __locked_fifo_preempt(g, tsgid, true); @@ -844,6 +847,9 @@ int gv11b_fifo_preempt_tsg(struct gk20a *g, u32 tsgid) if (!mutex_ret) nvgpu_pmu_mutex_release(&g->pmu, PMU_MUTEX_ID_FIFO, &token); + /* WAR for Bug 2065990 */ + gk20a_fifo_enable_tsg_sched(g, &f->tsg[tsgid]); + nvgpu_mutex_release(&f->runlist_info[runlist_id].runlist_lock); if (ret) -- cgit v1.2.2