diff options
author | David Nieto <dmartineznie@nvidia.com> | 2017-04-06 18:46:36 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-09-22 18:49:37 -0400 |
commit | 7eabc16b8488e20a6cbfe1a80dc99a0b046750eb (patch) | |
tree | 1adf2b98e4473d575ebce14bb45298eb9efc7e35 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | 90568a2ce58c03f457bdd4fab6675cd327ed13fd (diff) |
gpu: nvgpu: defer channel worker initialization
kthread_run can fail if SIGKILL is triggered on an application during
driver load.
On this change we defer the channel worker init to the enqueue to avoid
this condition during driver power on which would cause the driver state to be
corrupted leaving subsequent attempts to load the driver unsuccesful.
By moving this code to a later time, it is now needed to protect the task
structure with a mutex.
JIRA: EVLR-956
Bug 1816515
Change-Id: I3a159de2d1f03e70b2a3969730a927532ede2d6e
Signed-off-by: David Nieto <dmartineznie@nvidia.com>
Reviewed-on: http://git-master/r/1462490
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1460689
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 0cd77d1e..35d58ef1 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -1215,6 +1215,7 @@ struct gk20a { | |||
1215 | struct nvgpu_cond wq; | 1215 | struct nvgpu_cond wq; |
1216 | struct nvgpu_list_node items; | 1216 | struct nvgpu_list_node items; |
1217 | struct nvgpu_spinlock items_lock; | 1217 | struct nvgpu_spinlock items_lock; |
1218 | struct nvgpu_mutex start_lock; | ||
1218 | } channel_worker; | 1219 | } channel_worker; |
1219 | 1220 | ||
1220 | struct gk20a_scale_profile *scale_profile; | 1221 | struct gk20a_scale_profile *scale_profile; |