diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2017-08-18 06:52:29 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-22 06:53:51 -0400 |
commit | 81868a187fa3b217368206f17b19309846e8e7fb (patch) | |
tree | 2b59e33b61cc6e206f7781f3b4ab44c5c7b6d721 /drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |
parent | 5f010177de985c901c33c914efe70a8498a5974f (diff) |
gpu: nvgpu: Nvgpu abstraction for linux barriers.
construct wrapper nvgpu_* methods to replace
mb,rmb,wmb,smp_mb,smp_rmb,smp_wmb,read_barrier_depends and
smp_read_barrier_depends.
NVGPU-122
Change-Id: I8d24dd70fef5cb0fadaacc15f3ab11531667a0df
Signed-off-by: Debarshi <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1541199
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index 8ad24c44..5fa9a0df 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <nvgpu/kmem.h> | 21 | #include <nvgpu/kmem.h> |
22 | #include <nvgpu/soc.h> | 22 | #include <nvgpu/soc.h> |
23 | #include <nvgpu/nvhost.h> | 23 | #include <nvgpu/nvhost.h> |
24 | #include <nvgpu/barrier.h> | ||
24 | 25 | ||
25 | #include "gk20a.h" | 26 | #include "gk20a.h" |
26 | #include "channel_gk20a.h" | 27 | #include "channel_gk20a.h" |
@@ -73,7 +74,7 @@ static inline bool gk20a_fence_is_valid(struct gk20a_fence *f) | |||
73 | { | 74 | { |
74 | bool valid = f->valid; | 75 | bool valid = f->valid; |
75 | 76 | ||
76 | rmb(); | 77 | nvgpu_smp_rmb(); |
77 | return valid; | 78 | return valid; |
78 | } | 79 | } |
79 | 80 | ||
@@ -252,7 +253,7 @@ int gk20a_fence_from_semaphore( | |||
252 | f->semaphore_wq = semaphore_wq; | 253 | f->semaphore_wq = semaphore_wq; |
253 | 254 | ||
254 | /* commit previous writes before setting the valid flag */ | 255 | /* commit previous writes before setting the valid flag */ |
255 | wmb(); | 256 | nvgpu_smp_wmb(); |
256 | f->valid = true; | 257 | f->valid = true; |
257 | 258 | ||
258 | return 0; | 259 | return 0; |
@@ -327,7 +328,7 @@ int gk20a_fence_from_syncpt( | |||
327 | f->syncpt_value = value; | 328 | f->syncpt_value = value; |
328 | 329 | ||
329 | /* commit previous writes before setting the valid flag */ | 330 | /* commit previous writes before setting the valid flag */ |
330 | wmb(); | 331 | nvgpu_smp_wmb(); |
331 | f->valid = true; | 332 | f->valid = true; |
332 | 333 | ||
333 | return 0; | 334 | return 0; |