From 2517d59be282426eec7a97745b76d745ff36c388 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Tue, 4 Sep 2018 17:39:36 +0530 Subject: gpu: nvgpu: move channel_sync_gk20a.* to common directory 1) Move channel_sync_gk20a.* from gk20a/ to common/ directory as they donot program any hardware registers. Also as an add-on rename channel_sync_gk20a.* to channel_sync.* and update the headers in required files. 2) Rename the struct gk20a_channel_sync to struct nvgpu_channel_sync. Also, corresponding syncpt and semaphore versions of the struct alongwith related methods are renamed by removing "gk20a" from their names and adding "nvgpu". 3) Add misra-c cleanups Jira NVGPU-1086 Change-Id: I4e0e21803ca3858dd7a5fc4d2454dba1f1bfcecd Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/1812594 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_channel.c | 4 ++-- drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c | 4 ++-- drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/os') diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c index e9a24923..0f6843df 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c @@ -35,11 +35,11 @@ #include #include #include +#include #include "gk20a/gk20a.h" #include "gk20a/dbg_gpu_gk20a.h" #include "gk20a/fence_gk20a.h" -#include "gk20a/channel_sync_gk20a.h" #include "platform_gk20a.h" #include "ioctl_channel.h" @@ -1028,7 +1028,7 @@ static int nvgpu_ioctl_channel_get_user_syncpoint(struct channel_gk20a *ch, if (ch->user_sync) { nvgpu_mutex_release(&ch->sync_lock); } else { - ch->user_sync = gk20a_channel_sync_create(ch, true); + ch->user_sync = nvgpu_channel_sync_create(ch, true); if (!ch->user_sync) { nvgpu_mutex_release(&ch->sync_lock); return -ENOMEM; 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 ec3ccf0d..195da64a 100644 --- a/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c +++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c @@ -21,8 +21,8 @@ #include #include #include +#include -#include "gk20a/channel_sync_gk20a.h" #include "gk20a/mm_gk20a.h" #include "sync_sema_android.h" @@ -63,7 +63,7 @@ int nvgpu_os_fence_sema_wait_gen_cmd(struct nvgpu_os_fence *s, sync_fence->cbs[i].sync_pt); sema = gk20a_sync_pt_sema(pt); - gk20a_channel_gen_sema_wait_cmd(c, sema, wait_cmd, + channel_sync_semaphore_gen_wait_cmd(c, sema, wait_cmd, wait_cmd_size, i); } 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 b15dba19..fe09db8f 100644 --- a/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c +++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c @@ -23,9 +23,9 @@ #include #include #include +#include #include "gk20a/gk20a.h" -#include "gk20a/channel_sync_gk20a.h" #include "gk20a/mm_gk20a.h" #include "../drivers/staging/android/sync.h" @@ -76,7 +76,7 @@ int nvgpu_os_fence_syncpt_wait_gen_cmd(struct nvgpu_os_fence *s, u32 wait_id = nvgpu_nvhost_sync_pt_id(pt); u32 wait_value = nvgpu_nvhost_sync_pt_thresh(pt); - err = gk20a_channel_gen_syncpt_wait_cmd(c, wait_id, wait_value, + err = channel_sync_syncpt_gen_wait_cmd(c, wait_id, wait_value, wait_cmd, wait_cmd_size, i, true); } -- cgit v1.2.2