mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
The differences between sync_fence ("android sync") and dma_fence are
abstracted away by nvhost in the nvhost_fence interface. There is no
need to have separate android and dma os fences for syncpoints; unify
the general implementation so that it's always used when requested for
the build.
Jira NVGPU-5386
Change-Id: Ia829e93e18d03064ff46ab1271547de2d1fb1cae
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2356158
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef NVGPU_OS_FENCE_PRIV_H
|
|
#define NVGPU_OS_FENCE_PRIV_H
|
|
|
|
#include <nvgpu/os_fence.h>
|
|
|
|
static inline void nvgpu_os_fence_clear(struct nvgpu_os_fence *fence_out)
|
|
{
|
|
fence_out->priv = NULL;
|
|
fence_out->g = NULL;
|
|
fence_out->ops = NULL;
|
|
}
|
|
|
|
static inline void nvgpu_os_fence_init(struct nvgpu_os_fence *fence_out,
|
|
struct gk20a *g, const struct nvgpu_os_fence_ops *fops,
|
|
void *fence)
|
|
{
|
|
fence_out->g = g;
|
|
fence_out->ops = fops;
|
|
fence_out->priv = fence;
|
|
}
|
|
|
|
#endif /* NVGPU_OS_FENCE_PRIV_H */
|