diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-12-19 06:01:43 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-12-27 04:24:35 -0500 |
commit | 505b442551a2e27aa3bc9e608c5a2bc9fccecbc4 (patch) | |
tree | 5b4d1d9664ab819e009fc9300784b897be035058 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | f3d2dd4fd2c3d0fa3f774bcbc1d2b9ef482d7663 (diff) |
gpu: nvgpu: acquire mutex for notifier read
We use &ch->error_notifier_mutex to protect
writes and free of error notifier
But we currently do not protect reading of
notifier in gk20a_fifo_set_ctx_mmu_error()
and vgpu_fifo_set_ctx_mmu_error()
Add new API gk20a_set_error_notifier_locked()
which is same as gk20a_set_error_notifier()
but without the locks.
In *_fifo_set_ctx_mmu_error() APIs, acquire
the mutex explicitly, and then use this new
API
gk20a_set_error_notifier() will now just call
gk20a_set_error_notifier_locked() within
a mutex
Bug 1824788
Bug 1844312
Change-Id: I1f3831dc63fe1daa761b2e17e4de3c155f505d6f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1273471
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h index ed0b04ee..0a0d94b7 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -235,6 +235,7 @@ void gk20a_disable_channel(struct channel_gk20a *ch); | |||
235 | void gk20a_channel_abort(struct channel_gk20a *ch, bool channel_preempt); | 235 | void gk20a_channel_abort(struct channel_gk20a *ch, bool channel_preempt); |
236 | void gk20a_channel_abort_clean_up(struct channel_gk20a *ch); | 236 | void gk20a_channel_abort_clean_up(struct channel_gk20a *ch); |
237 | void gk20a_set_error_notifier(struct channel_gk20a *ch, __u32 error); | 237 | void gk20a_set_error_notifier(struct channel_gk20a *ch, __u32 error); |
238 | void gk20a_set_error_notifier_locked(struct channel_gk20a *ch, __u32 error); | ||
238 | void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events); | 239 | void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events); |
239 | int gk20a_channel_alloc_priv_cmdbuf(struct channel_gk20a *c, u32 size, | 240 | int gk20a_channel_alloc_priv_cmdbuf(struct channel_gk20a *c, u32 size, |
240 | struct priv_cmd_entry *entry); | 241 | struct priv_cmd_entry *entry); |