From 75ebe51113ab38d0434dda5224baa26dc5329530 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Fri, 24 Nov 2017 11:42:37 +0200 Subject: gpu: nvgpu: drop num_pts argument in nvgpu_nvhost_sync_create_fence For nvhost_sync_create_fence, num_pts corresponds to the number of syncpoints in the array given to it, and the wrapper nvgpu_nvhost_sync_create_fence only supports one syncpoint at a time. Use 1 explicitly and make it impossible for the caller of this wrapper to use something else by mistake. Change-Id: I2497c1dd4fed0906e3bb07e8f5ddd3a9346cb381 Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1604339 Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/nvhost.c | 5 ++--- drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 2 +- drivers/gpu/nvgpu/include/nvgpu/nvhost.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c index 611351ae..b8e51aac 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost.c @@ -199,14 +199,13 @@ int nvgpu_nvhost_sync_num_pts(struct sync_fence *fence) struct sync_fence *nvgpu_nvhost_sync_create_fence( struct nvgpu_nvhost_dev *nvhost_dev, - u32 id, u32 thresh, - u32 num_pts, const char *name) + u32 id, u32 thresh, const char *name) { struct nvhost_ctrl_sync_fence_info pt = { .id = id, .thresh = thresh, }; - return nvhost_sync_create_fence(nvhost_dev->host1x_pdev, &pt, num_pts, name); + return nvhost_sync_create_fence(nvhost_dev->host1x_pdev, &pt, 1, name); } #endif /* CONFIG_SYNC */ diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index d0df8857..60858424 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c @@ -317,7 +317,7 @@ int gk20a_fence_from_syncpt( #ifdef CONFIG_SYNC if (need_sync_fence) { sync_fence = nvgpu_nvhost_sync_create_fence(nvhost_dev, - id, value, 1, "fence"); + id, value, "fence"); if (IS_ERR(sync_fence)) return -1; } diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h index 536b248a..d852c77c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h @@ -75,7 +75,7 @@ int nvgpu_nvhost_sync_num_pts(struct sync_fence *fence); struct sync_fence *nvgpu_nvhost_sync_fdget(int fd); struct sync_fence *nvgpu_nvhost_sync_create_fence( struct nvgpu_nvhost_dev *nvhost_dev, - u32 id, u32 thresh, u32 num_pts, const char *name); + u32 id, u32 thresh, const char *name); #endif /* CONFIG_SYNC */ #endif /* CONFIG_TEGRA_GK20A_NVHOST */ #endif /* __NVGPU_NVHOST_H__ */ -- cgit v1.2.2