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/include/nvgpu/linux/os_fence_android.h | 2 ++ drivers/gpu/nvgpu/include/nvgpu/os_fence.h | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h b/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h index 39d08339..201b5306 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h @@ -39,6 +39,8 @@ void nvgpu_os_fence_init(struct nvgpu_os_fence *fence_out, struct gk20a *g, const struct nvgpu_os_fence_ops *fops, struct sync_fence *fence); +void nvgpu_os_fence_android_install_fd(struct nvgpu_os_fence *s, int fd); + int nvgpu_os_fence_syncpt_fdget( struct nvgpu_os_fence *fence_out, struct channel_gk20a *c, int fd); diff --git a/drivers/gpu/nvgpu/include/nvgpu/os_fence.h b/drivers/gpu/nvgpu/include/nvgpu/os_fence.h index a22140da..4713ed3e 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/os_fence.h +++ b/drivers/gpu/nvgpu/include/nvgpu/os_fence.h @@ -60,6 +60,12 @@ struct nvgpu_os_fence_ops { * for the underlying sync_fence. */ void (*drop_ref)(struct nvgpu_os_fence *s); + + /* + * Used to install the fd in the corresponding OS. The underlying + * implementation varies from OS to OS. + */ + void (*install_fence)(struct nvgpu_os_fence *s, int fd); }; /* -- cgit v1.2.2