diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2018-04-18 01:33:02 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-10 11:40:02 -0400 |
commit | 4dfd6e43cfe303c8b23421ef32738db2ee52e291 (patch) | |
tree | 510ce3c59745ea98e44b355d9c4c4cf101bab9c2 /drivers/gpu/nvgpu/Makefile | |
parent | 90b2f780d414d993571dceccafbc01b371068782 (diff) |
gpu: nvgpu: create a wrapper over sync_fences
This patch constructs an abstraction to hide the sync_fence
functionality from the common code. struct nvgpu_os_fence acts as an
abstraction for struct sync_fence.
struct nvgpu_os_fence consists of an ops structure named nvgpu_os_fence_ops
which contains an API to do pushbuffer programming to generate wait
commands for the fence.
The current implementation of nvgpu only allows for wait method on a
sync_fence which was generated using a similar backend(i.e. either
Nvhost Syncpoints or Semaphores). In this patch, a
generic API is introduced which will decide the type of the underlying
implementation of the struct nvgpu_os_fence at runtime and run the
corresponding wait implementation on it.
This patch changes the channel_sync_gk20a's semaphore specific
implementation to use the abstract API. A subsequent patch will make
the changes for the nvhost_syncpoint based implementations as well.
JIRA NVGPU-66
Change-Id: If6675bfde5885c3d15d2ca380bb6c7c0e240e734
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1667218
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/Makefile')
-rw-r--r-- | drivers/gpu/nvgpu/Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index 32166f31..9a46f12c 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile | |||
@@ -160,7 +160,9 @@ nvgpu-$(CONFIG_TEGRA_GK20A) += \ | |||
160 | common/linux/platform_gp10b_tegra.o \ | 160 | common/linux/platform_gp10b_tegra.o \ |
161 | common/linux/platform_gv11b_tegra.o | 161 | common/linux/platform_gv11b_tegra.o |
162 | 162 | ||
163 | nvgpu-$(CONFIG_SYNC) += gk20a/sync_gk20a.o | 163 | nvgpu-$(CONFIG_SYNC) += gk20a/sync_gk20a.o \ |
164 | common/linux/os_fence_android.o \ | ||
165 | common/linux/os_fence_android_sema.o | ||
164 | 166 | ||
165 | nvgpu-$(CONFIG_GK20A_PCI) += common/linux/pci.o \ | 167 | nvgpu-$(CONFIG_GK20A_PCI) += common/linux/pci.o \ |
166 | common/linux/pci_usermode.o \ | 168 | common/linux/pci_usermode.o \ |