From a012527dbde6308bc158d17cace96d2a2e9fdcfd Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Thu, 14 Jun 2018 12:41:03 -0700 Subject: gpu: nvgpu: gv11b: fix fb flush issue membar.sys does synchronization with the whole system (GPU and CPU), membar.gl does synchronization within the GPU. In gv11b, fb flush is generating membar.gl instead of membar.sys, which is an issue. To fix this issue. following WAR is used: 1. Use bar1 engine id and bind it to a particular pdb, 2. Then instead of a fb_flush, issue a tlb invalidate of the bar1 pdb. Now allocation of vm for bar1 instance block and bar1 binding is done without check for bar1 support. Only bar1 register mapping is done based on bar1 support enabled. Bug 2112790 Change-Id: I76f43f1178a68f10823d48bc9da55d2bd686dd52 Signed-off-by: seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/1750257 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/mm_gv11b.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gv11b/mm_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/mm_gv11b.c b/drivers/gpu/nvgpu/gv11b/mm_gv11b.c index e1d90829..0cf08d4a 100644 --- a/drivers/gpu/nvgpu/gv11b/mm_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/mm_gv11b.c @@ -249,7 +249,11 @@ void gv11b_mm_l2_flush(struct gk20a *g, bool invalidate) g->ops.mm.fb_flush(g); gk20a_mm_l2_flush(g, invalidate); - g->ops.mm.fb_flush(g); + if (g->ops.bus.bar1_bind) + g->ops.fb.tlb_invalidate(g, + g->mm.bar1.vm->pdb.mem); + else + g->ops.mm.fb_flush(g); } /* -- cgit v1.2.2