mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
When generating Doxygen XML, if an inner structure is anonymous, the generated XML will remove the inner structure and merge its members with the parent structure. This is not ideal for tooling, so this patch adds a name to a few anonymous structures. JIRA NVGPU-3510 Change-Id: I42556a6b2a2f9a156d9a74fa894197c845656adc Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2274706 Reviewed-by: Thomas Fleury <tfleury@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
109 lines
3.3 KiB
C
109 lines
3.3 KiB
C
/*
|
|
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
* to deal in the Software without restriction, including without limitation
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
#ifndef NVGPU_GOPS_SYNC_H
|
|
#define NVGPU_GOPS_SYNC_H
|
|
|
|
#include <nvgpu/types.h>
|
|
|
|
|
|
/**
|
|
* @file
|
|
*
|
|
* Sync HAL interface.
|
|
*/
|
|
struct gk20a;
|
|
struct nvgpu_channel;
|
|
struct nvgpu_mem;
|
|
struct vm_gk20a;
|
|
struct priv_cmd_entry;
|
|
struct nvgpu_semaphore;
|
|
|
|
/**
|
|
* Sync HAL operations.
|
|
*
|
|
* @see gpu_ops
|
|
*/
|
|
struct gops_sync {
|
|
|
|
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
|
struct gops_sync_syncpt {
|
|
/**
|
|
* @brief Map syncpoint aperture as read-only.
|
|
*
|
|
* @param vm [in] VM area for channel.
|
|
* @param base_gpu [out] Base GPU VA for mapped
|
|
* syncpoint aperture.
|
|
* @param sync_size [out] Size of syncpoint aperture
|
|
* in bytes.
|
|
*
|
|
* Map syncpoint aperture in GPU virtual memory as read-only:
|
|
* - Acquire syncpoint read-only map lock.
|
|
* - Map syncpoint aperture in sysmem to GPU virtual memory,
|
|
* if not already mapped. Map as read-only.
|
|
* - Release syncpoint read-only map lock.
|
|
*
|
|
* @return 0 in case of success, < 0 in case of failure.
|
|
* @retval -ENOMEM if syncpoint aperture could not be
|
|
* mapped to GPU virtual memory.
|
|
*/
|
|
int (*get_sync_ro_map)(struct vm_gk20a *vm,
|
|
u64 *base_gpuva, u32 *sync_size);
|
|
|
|
/** @cond DOXYGEN_SHOULD_SKIP_THIS */
|
|
int (*alloc_buf)(struct nvgpu_channel *c,
|
|
u32 syncpt_id,
|
|
struct nvgpu_mem *syncpt_buf);
|
|
void (*free_buf)(struct nvgpu_channel *c,
|
|
struct nvgpu_mem *syncpt_buf);
|
|
#ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT
|
|
void (*add_wait_cmd)(struct gk20a *g,
|
|
struct priv_cmd_entry *cmd, u32 off,
|
|
u32 id, u32 thresh, u64 gpu_va);
|
|
u32 (*get_wait_cmd_size)(void);
|
|
void (*add_incr_cmd)(struct gk20a *g,
|
|
bool wfi_cmd,
|
|
struct priv_cmd_entry *cmd,
|
|
u32 id, u64 gpu_va);
|
|
u32 (*get_incr_cmd_size)(bool wfi_cmd);
|
|
u32 (*get_incr_per_release)(void);
|
|
#endif
|
|
/** @endcond DOXYGEN_SHOULD_SKIP_THIS */
|
|
} syncpt;
|
|
|
|
#endif /* CONFIG_TEGRA_GK20A_NVHOST */
|
|
|
|
#ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT
|
|
/** @cond DOXYGEN_SHOULD_SKIP_THIS */
|
|
struct gops_sync_sema {
|
|
u32 (*get_wait_cmd_size)(void);
|
|
u32 (*get_incr_cmd_size)(void);
|
|
void (*add_cmd)(struct gk20a *g,
|
|
struct nvgpu_semaphore *s, u64 sema_va,
|
|
struct priv_cmd_entry *cmd,
|
|
u32 off, bool acquire, bool wfi);
|
|
} sema;
|
|
/** @endcond DOXYGEN_SHOULD_SKIP_THIS */
|
|
#endif
|
|
};
|
|
|
|
#endif
|