mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: adapt gk20a_channel_syncpt to use os_fence
This patch adapts gk20a_channel_syncpt to use os_fence for post fence as well as pre-fence(wait) use cases. Jira NVGPU-66 Change-Id: I49627d1f88d52a53511a02f5de60fed6df8350de Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1676631 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
4dfd6e43cf
commit
70e69e2686
@@ -55,15 +55,15 @@ void nvgpu_os_fence_android_drop_ref(struct nvgpu_os_fence *s)
|
||||
int nvgpu_os_fence_fdget(struct nvgpu_os_fence *fence_out,
|
||||
struct channel_gk20a *c, int fd)
|
||||
{
|
||||
int err;
|
||||
int err = -ENOSYS;
|
||||
|
||||
err = nvgpu_os_fence_sema_fdget(fence_out, c, fd);
|
||||
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
||||
err = nvgpu_os_fence_syncpt_fdget(fence_out, c, fd);
|
||||
#endif
|
||||
|
||||
if (err)
|
||||
err = nvgpu_os_fence_sema_fdget(fence_out, c, fd);
|
||||
|
||||
/* TO-DO
|
||||
* check if fence is empty and if CONFIG_TEGRA_GK20A_NVHOST
|
||||
* is enabled, try to get a sync_fence using
|
||||
* corresponding nvhost method.
|
||||
*/
|
||||
if (err)
|
||||
nvgpu_err(c->g, "error obtaining fence from fd %d", fd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user