From 4f40637c580c5f25f34f45c2c16b5332104897bc Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 24 Apr 2018 10:38:30 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1701245 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/os_fence_android.c | 8 ++++++++ drivers/gpu/nvgpu/common/linux/os_fence_android_sema.c | 1 + drivers/gpu/nvgpu/common/linux/os_fence_android_syncpt.c | 1 + 3 files changed, 10 insertions(+) (limited to 'drivers/gpu/nvgpu/common') diff --git a/drivers/gpu/nvgpu/common/linux/os_fence_android.c b/drivers/gpu/nvgpu/common/linux/os_fence_android.c index d8f70639..9be8c6c0 100644 --- a/drivers/gpu/nvgpu/common/linux/os_fence_android.c +++ b/drivers/gpu/nvgpu/common/linux/os_fence_android.c @@ -52,6 +52,14 @@ void nvgpu_os_fence_android_drop_ref(struct nvgpu_os_fence *s) nvgpu_os_fence_clear(s); } +void nvgpu_os_fence_android_install_fd(struct nvgpu_os_fence *s, int fd) +{ + struct sync_fence *fence = nvgpu_get_sync_fence(s); + + sync_fence_get(fence); + sync_fence_install(fence, fd); +} + int nvgpu_os_fence_fdget(struct nvgpu_os_fence *fence_out, struct channel_gk20a *c, int fd) { diff --git a/drivers/gpu/nvgpu/common/linux/os_fence_android_sema.c b/drivers/gpu/nvgpu/common/linux/os_fence_android_sema.c index b61bd893..d4aeb6ed 100644 --- a/drivers/gpu/nvgpu/common/linux/os_fence_android_sema.c +++ b/drivers/gpu/nvgpu/common/linux/os_fence_android_sema.c @@ -69,6 +69,7 @@ int nvgpu_os_fence_sema_wait_gen_cmd(struct nvgpu_os_fence *s, static const struct nvgpu_os_fence_ops sema_ops = { .program_waits = nvgpu_os_fence_sema_wait_gen_cmd, .drop_ref = nvgpu_os_fence_android_drop_ref, + .install_fence = nvgpu_os_fence_android_install_fd, }; int nvgpu_os_fence_sema_create( diff --git a/drivers/gpu/nvgpu/common/linux/os_fence_android_syncpt.c b/drivers/gpu/nvgpu/common/linux/os_fence_android_syncpt.c index 76def831..b3712011 100644 --- a/drivers/gpu/nvgpu/common/linux/os_fence_android_syncpt.c +++ b/drivers/gpu/nvgpu/common/linux/os_fence_android_syncpt.c @@ -88,6 +88,7 @@ int nvgpu_os_fence_syncpt_wait_gen_cmd(struct nvgpu_os_fence *s, static const struct nvgpu_os_fence_ops syncpt_ops = { .program_waits = nvgpu_os_fence_syncpt_wait_gen_cmd, .drop_ref = nvgpu_os_fence_android_drop_ref, + .install_fence = nvgpu_os_fence_android_install_fd, }; int nvgpu_os_fence_syncpt_create( -- cgit v1.2.2