diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2016-01-28 13:54:32 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-01-29 15:58:22 -0500 |
commit | 9e02111a768ab631a6719c1eae8d7c03e6e89c23 (patch) | |
tree | 7cb3fb7cd59ca679579e4e7b920f2764a7cb7a81 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | 5cb995c7510e0290956a3aa221c6a77d4020b3ff (diff) |
gpu: nvgpu: fix race condition with poweroff
When gpu rail-gating is enabled, it is possible that
both rail gating code and system shudown can start
executing gk20a_pm_prepare_poweroff() in parallel.
To synchronize this execution, protect gk20a_pm_prepare_poweroff()
with a mutex lock.
Bug 200168805
Change-Id: I19536a43ed20c3e82b32c316922dc3e19e3f59bb
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/999548
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index b02d6111..0207588f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -521,6 +521,8 @@ struct gk20a { | |||
521 | 521 | ||
522 | struct mutex ch_wdt_lock; | 522 | struct mutex ch_wdt_lock; |
523 | 523 | ||
524 | struct mutex poweroff_lock; | ||
525 | |||
524 | /* Channel priorities */ | 526 | /* Channel priorities */ |
525 | u32 timeslice_low_priority_us; | 527 | u32 timeslice_low_priority_us; |
526 | u32 timeslice_medium_priority_us; | 528 | u32 timeslice_medium_priority_us; |