From 1bc1ff2e92c0638935b911057ef60fa57af76948 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 19 Jun 2018 12:57:36 +0530 Subject: gpu: nvgpu: remove use of struct fence type. struct fence and fence* APIs have changed to struct dma_fence and dma_fence* respectively. This patch makes the required changes that avoids using the struct fence type to prevent making API changes in nvgpu. Bug 200417423 Change-Id: I566de58a3659cbc2495670136dc2fc65862b46e7 Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1754164 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta Reviewed-by: Bitan Biswas Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c | 4 ++-- drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c | 4 ++-- drivers/gpu/nvgpu/os/linux/sync_sema_android.c | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c b/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c index 25832417..e7070612 100644 --- a/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c +++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c @@ -58,8 +58,8 @@ int nvgpu_os_fence_sema_wait_gen_cmd(struct nvgpu_os_fence *s, } for (i = 0; i < num_wait_cmds; i++) { - struct fence *f = sync_fence->cbs[i].sync_pt; - struct sync_pt *pt = sync_pt_from_fence(f); + struct sync_pt *pt = sync_pt_from_fence( + sync_fence->cbs[i].sync_pt); sema = gk20a_sync_pt_sema(pt); gk20a_channel_gen_sema_wait_cmd(c, sema, wait_cmd, diff --git a/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c b/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c index d7a72fcd..dc340f1a 100644 --- a/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c +++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c @@ -70,8 +70,8 @@ int nvgpu_os_fence_syncpt_wait_gen_cmd(struct nvgpu_os_fence *s, } for (i = 0; i < sync_fence->num_fences; i++) { - struct fence *f = sync_fence->cbs[i].sync_pt; - struct sync_pt *pt = sync_pt_from_fence(f); + struct sync_pt *pt = sync_pt_from_fence( + sync_fence->cbs[i].sync_pt); u32 wait_id = nvgpu_nvhost_sync_pt_id(pt); u32 wait_value = nvgpu_nvhost_sync_pt_thresh(pt); diff --git a/drivers/gpu/nvgpu/os/linux/sync_sema_android.c b/drivers/gpu/nvgpu/os/linux/sync_sema_android.c index 4dd10e6e..9598f2df 100644 --- a/drivers/gpu/nvgpu/os/linux/sync_sema_android.c +++ b/drivers/gpu/nvgpu/os/linux/sync_sema_android.c @@ -15,7 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - #include #include #include @@ -324,8 +323,7 @@ struct sync_fence *gk20a_sync_fence_fdget(int fd) return NULL; for (i = 0; i < fence->num_fences; i++) { - struct fence *pt = fence->cbs[i].sync_pt; - struct sync_pt *spt = sync_pt_from_fence(pt); + struct sync_pt *spt = sync_pt_from_fence(fence->cbs[i].sync_pt); struct sync_timeline *t; if (spt == NULL) { -- cgit v1.2.2