mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: move syncpt documentation to doxygen
Sync/syncpt documentation was not in doxygen format. Added doxygen syntax for proper parsing. Jira NVGPU-4291 Change-Id: I6ad6eae1b02d88d97e241798838fa75da727ade2 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2236898 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Philip Elcan <pelcan@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>
This commit is contained in:
committed by
Alex Waterman
parent
c72ed3782e
commit
eab49bf020
@@ -87,27 +87,53 @@ void nvgpu_channel_sync_get_ref(struct nvgpu_channel_sync *s);
|
||||
bool nvgpu_channel_sync_put_ref_and_check(struct nvgpu_channel_sync *s);
|
||||
#endif /* CONFIG_NVGPU_KERNEL_MODE_SUBMIT */
|
||||
|
||||
/*
|
||||
* Set the channel syncpoint/semaphore to safe state
|
||||
/**
|
||||
* @brief Set the channel syncpoint/semaphore to safe state
|
||||
*
|
||||
* @param sync [in] Pointer to syncpoint/semaphore.
|
||||
*
|
||||
* This should be used to reset User managed syncpoint since we don't
|
||||
* track threshold values for those syncpoints
|
||||
*/
|
||||
void nvgpu_channel_sync_set_safe_state(struct nvgpu_channel_sync *s);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief Free channel syncpoint/semaphore
|
||||
*
|
||||
* @param sync [in] Pointer to syncpoint/semaphore.
|
||||
*
|
||||
* Free the resources allocated by nvgpu_channel_sync_create.
|
||||
*/
|
||||
void nvgpu_channel_sync_destroy(struct nvgpu_channel_sync *sync,
|
||||
bool set_safe_state);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief Create channel syncpoint/semaphore
|
||||
*
|
||||
* @param c [in] Pointer to Channel.
|
||||
* @param user_managed [in] True is syncpoint is user managed.
|
||||
*
|
||||
* Construct a channel_sync backed by either a syncpoint or a semaphore.
|
||||
* A channel_sync is by default constructed as backed by a syncpoint
|
||||
* if CONFIG_TEGRA_GK20A_NVHOST is defined, otherwise the channel_sync
|
||||
* is constructed as backed by a semaphore.
|
||||
*
|
||||
* @return Pointer to nvgpu_channel_sync in case of success, or NULL
|
||||
* in case of failure.
|
||||
*/
|
||||
struct nvgpu_channel_sync *nvgpu_channel_sync_create(struct nvgpu_channel *c,
|
||||
bool user_managed);
|
||||
|
||||
/**
|
||||
* @brief Check if OS fence framwework is needed
|
||||
*
|
||||
* @param g [in] Pointer to GPU
|
||||
*
|
||||
* Sync framework requires deferred job cleanup, wrapping syncs in FDs,
|
||||
* and other heavy stuff, which prevents deterministic submits.
|
||||
*
|
||||
* @return True is OS fence framework is needed.
|
||||
*/
|
||||
bool nvgpu_channel_sync_needs_os_fence_framework(struct gk20a *g);
|
||||
|
||||
#endif /* NVGPU_CHANNEL_SYNC_H */
|
||||
|
||||
@@ -39,13 +39,24 @@ struct priv_cmd_entry;
|
||||
|
||||
#ifdef CONFIG_TEGRA_GK20A_NVHOST
|
||||
|
||||
/*
|
||||
* Returns the sync point id or negative number if no syncpt
|
||||
/**
|
||||
* @brief Get syncpoint id
|
||||
*
|
||||
* @param s [in] Syncpoint pointer.
|
||||
*
|
||||
* @return Syncpoint id of \a s.
|
||||
*/
|
||||
u32 nvgpu_channel_sync_get_syncpt_id(struct nvgpu_channel_sync_syncpt *s);
|
||||
|
||||
/*
|
||||
* Returns the sync point address of sync point or 0 if not supported
|
||||
/**
|
||||
* @brief Get syncpoint address
|
||||
*
|
||||
* @param s [in] Syncpoint pointer.
|
||||
*
|
||||
* Get syncpoint GPU VA. This address can be used in push buffer entries
|
||||
* for acquire/release operations.
|
||||
*
|
||||
* @return Syncpoint address (GPU VA) of syncpoint or 0 if not supported
|
||||
*/
|
||||
u64 nvgpu_channel_sync_get_syncpt_address(struct nvgpu_channel_sync_syncpt *s);
|
||||
|
||||
@@ -58,16 +69,29 @@ int nvgpu_channel_sync_wait_syncpt(struct nvgpu_channel_sync_syncpt *s,
|
||||
u32 id, u32 thresh, struct priv_cmd_entry *entry);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Converts a valid struct nvgpu_channel_sync ptr to
|
||||
* struct nvgpu_channel_sync_syncpt ptr else return NULL.
|
||||
/**
|
||||
* @brief Get syncpoint from sync operations
|
||||
*
|
||||
* @param sync [in] Pointer to sync operations.
|
||||
*
|
||||
* Converts a valid struct nvgpu_channel_sync pointer \a sync to
|
||||
* struct nvgpu_channel_sync_syncpt pointer else return NULL
|
||||
*
|
||||
* @return Pointer to syncpoint, if sync is backed by a syncpoint.
|
||||
* @retval NULL if sync is backed by a sempahore.
|
||||
*/
|
||||
struct nvgpu_channel_sync_syncpt *
|
||||
nvgpu_channel_sync_to_syncpt(struct nvgpu_channel_sync *sync);
|
||||
|
||||
/*
|
||||
* Constructs a struct nvgpu_channel_sync_syncpt and returns a
|
||||
* pointer to the struct nvgpu_channel_sync associated with it.
|
||||
/**
|
||||
* @brief Create syncpoint.
|
||||
*
|
||||
* @param c [in] Pointer to channel.
|
||||
* @param user_managed [in] True is syncpoint is managed by client.
|
||||
*
|
||||
* Constructs a struct nvgpu_channel_sync_syncpt.
|
||||
*
|
||||
* @return Pointer to nvgpu_channel_sync associated with created syncpoint.
|
||||
*/
|
||||
struct nvgpu_channel_sync *
|
||||
nvgpu_channel_sync_syncpt_create(struct nvgpu_channel *c,
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
* Sync
|
||||
* ----
|
||||
*
|
||||
* + include/nvgpu/channel_sync.h
|
||||
* + include/nvgpu/channel_sync_syncpt.h
|
||||
* + include/nvgpu/gops_sync.h
|
||||
*
|
||||
* Usermode
|
||||
|
||||
Reference in New Issue
Block a user