diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2018-04-24 01:08:30 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-10 11:40:36 -0400 |
commit | 4f40637c580c5f25f34f45c2c16b5332104897bc (patch) | |
tree | 997eb7390801e3159611d59e0b2f149e43d14470 /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |
parent | 70e69e2686527990865b221a60e0ec1e9a53d316 (diff) |
gpu: nvgpu: remove sync_fence dependencies from fence_gk20a
Replaced all instances of sync_fence in gk20a_fence* code with
nvgpu_os_fence. Added the API install_fence for the nvgpu_os_fence
abstraction. sync_fence mechanism and its dependencies are completely
removed from the fence_gk20a methods. Due to the recent os_fence changes
and the changes to fence_gk20a, we can finally get rid of all the CONFIG_SYNCS
present in the submit path.
JIRA NVGPU-66
Change-Id: I3551dab04b93b1e94db83fc102a41872be89e9ed
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1701245
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.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 16898593..a2047444 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -37,10 +37,6 @@ | |||
37 | #include "sync_gk20a.h" | 37 | #include "sync_gk20a.h" |
38 | #include "mm_gk20a.h" | 38 | #include "mm_gk20a.h" |
39 | 39 | ||
40 | #ifdef CONFIG_SYNC | ||
41 | #include "../drivers/staging/android/sync.h" | ||
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 40 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
45 | 41 | ||
46 | struct gk20a_channel_syncpt { | 42 | struct gk20a_channel_syncpt { |
@@ -145,7 +141,6 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, | |||
145 | struct gk20a_channel_syncpt *sp = | 141 | struct gk20a_channel_syncpt *sp = |
146 | container_of(s, struct gk20a_channel_syncpt, ops); | 142 | container_of(s, struct gk20a_channel_syncpt, ops); |
147 | struct channel_gk20a *c = sp->c; | 143 | struct channel_gk20a *c = sp->c; |
148 | struct sync_fence *sync_fence = NULL; | ||
149 | struct nvgpu_os_fence os_fence = {0}; | 144 | struct nvgpu_os_fence os_fence = {0}; |
150 | 145 | ||
151 | err = gk20a_channel_alloc_priv_cmdbuf(c, | 146 | err = gk20a_channel_alloc_priv_cmdbuf(c, |
@@ -194,12 +189,10 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, | |||
194 | 189 | ||
195 | if (err) | 190 | if (err) |
196 | goto clean_up_priv_cmd; | 191 | goto clean_up_priv_cmd; |
197 | |||
198 | sync_fence = (struct sync_fence *)os_fence.priv; | ||
199 | } | 192 | } |
200 | 193 | ||
201 | err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev, | 194 | err = gk20a_fence_from_syncpt(fence, sp->nvhost_dev, |
202 | sp->id, thresh, sync_fence); | 195 | sp->id, thresh, os_fence); |
203 | 196 | ||
204 | if (err) { | 197 | if (err) { |
205 | if (nvgpu_os_fence_is_initialized(&os_fence)) | 198 | if (nvgpu_os_fence_is_initialized(&os_fence)) |
@@ -494,7 +487,6 @@ static int __gk20a_channel_semaphore_incr( | |||
494 | struct channel_gk20a *c = sp->c; | 487 | struct channel_gk20a *c = sp->c; |
495 | struct nvgpu_semaphore *semaphore; | 488 | struct nvgpu_semaphore *semaphore; |
496 | int err = 0; | 489 | int err = 0; |
497 | struct sync_fence *sync_fence = NULL; | ||
498 | struct nvgpu_os_fence os_fence = {0}; | 490 | struct nvgpu_os_fence os_fence = {0}; |
499 | 491 | ||
500 | semaphore = nvgpu_semaphore_alloc(c); | 492 | semaphore = nvgpu_semaphore_alloc(c); |
@@ -521,14 +513,12 @@ static int __gk20a_channel_semaphore_incr( | |||
521 | 513 | ||
522 | if (err) | 514 | if (err) |
523 | goto clean_up_sema; | 515 | goto clean_up_sema; |
524 | |||
525 | sync_fence = (struct sync_fence *)os_fence.priv; | ||
526 | } | 516 | } |
527 | 517 | ||
528 | err = gk20a_fence_from_semaphore(fence, | 518 | err = gk20a_fence_from_semaphore(fence, |
529 | semaphore, | 519 | semaphore, |
530 | &c->semaphore_wq, | 520 | &c->semaphore_wq, |
531 | sync_fence); | 521 | os_fence); |
532 | 522 | ||
533 | if (err) { | 523 | if (err) { |
534 | if (nvgpu_os_fence_is_initialized(&os_fence)) | 524 | if (nvgpu_os_fence_is_initialized(&os_fence)) |