diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-03-20 07:51:23 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-23 11:20:35 -0400 |
commit | b5b4353ca6cc9b6457ddccc00bf87538291870fc (patch) | |
tree | 1e2334728031345a3cb042bcc934bb0d9e3b0f82 /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h | |
parent | 2aead38194fb6f3166a9ccb501467f7b0662f6c1 (diff) |
gpu: nvgpu: set safe state for user managed syncpoints
MAX/threshold value of user managed syncpoint is not tracked by nvgpu
So if channel is reset by nvgpu there could be waiters still waiting on some
user syncpoint fence
Fix this by setting a large safe value to user managed syncpoint when aborting
the channel and when closing the channel
We right now increment the current value by 0x10000 which should be sufficient
to release any pending waiter
Bug 200326065
Jira NVGPU-179
Change-Id: Ie6432369bb4c21bd922c14b8d5a74c1477116f0b
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1678768
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h index 3f44b27a..da8cb251 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h | |||
@@ -86,6 +86,13 @@ struct gk20a_channel_sync { | |||
86 | /* Reset the channel syncpoint/semaphore. */ | 86 | /* Reset the channel syncpoint/semaphore. */ |
87 | void (*set_min_eq_max)(struct gk20a_channel_sync *s); | 87 | void (*set_min_eq_max)(struct gk20a_channel_sync *s); |
88 | 88 | ||
89 | /* | ||
90 | * Set the channel syncpoint/semaphore to safe state | ||
91 | * This should be used to reset User managed syncpoint since we don't | ||
92 | * track threshold values for those syncpoints | ||
93 | */ | ||
94 | void (*set_safe_state)(struct gk20a_channel_sync *s); | ||
95 | |||
89 | /* Signals the sync timeline (if owned by the gk20a_channel_sync layer). | 96 | /* Signals the sync timeline (if owned by the gk20a_channel_sync layer). |
90 | * This should be called when we notice that a gk20a_fence is | 97 | * This should be called when we notice that a gk20a_fence is |
91 | * expired. */ | 98 | * expired. */ |
@@ -101,7 +108,8 @@ struct gk20a_channel_sync { | |||
101 | void (*destroy)(struct gk20a_channel_sync *s); | 108 | void (*destroy)(struct gk20a_channel_sync *s); |
102 | }; | 109 | }; |
103 | 110 | ||
104 | void gk20a_channel_sync_destroy(struct gk20a_channel_sync *sync); | 111 | void gk20a_channel_sync_destroy(struct gk20a_channel_sync *sync, |
112 | bool set_safe_state); | ||
105 | struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c, | 113 | struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c, |
106 | bool user_managed); | 114 | bool user_managed); |
107 | bool gk20a_channel_sync_needs_sync_framework(struct gk20a *g); | 115 | bool gk20a_channel_sync_needs_sync_framework(struct gk20a *g); |