From e768e74df8be8abe8442d958bde7a4a2886694ba Mon Sep 17 00:00:00 2001 From: skadamati Date: Fri, 30 Jun 2017 14:17:25 +0530 Subject: gpu: nvgpu: Fix race condition during poweron When two or more apps ran simultaneously First app context sets power_on flag & starts init Other app context check the power_on flag and try to use GPU without init completed Which makes aother apps to assert Added mutex to synchronize poweron access Bug 200297265 Change-Id: Ie138f7f43bb0dd3304ed91ae3649a6a4947bee91 Signed-off-by: skadamati Reviewed-on: https://git-master/r/1511436 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 9203882c..d45477fc 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1075,6 +1075,7 @@ struct gk20a { #endif unsigned int ch_wdt_timeout_ms; + struct nvgpu_mutex poweron_lock; struct nvgpu_mutex poweroff_lock; /* Channel priorities */ -- cgit v1.2.2