mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Add doxygen documentation in pbdma.h
Add doxygen documentations in pbdma.h and also take care of setting pbdma_id to invalid value in case of failure in nvgpu_pbdma_find_for_runlist. Jira NVGPU-3591 Change-Id: I7aa7d55442cc7585c08fd6a54411cb22bc06ba30 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2131913 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: Seema Khowala <seemaj@nvidia.com> Reviewed-by: Alex Waterman <alexw@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
mobile promotions
parent
1deb1fa176
commit
fcc66f9b90
@@ -29,10 +29,10 @@ bool nvgpu_pbdma_find_for_runlist(struct gk20a *g,
|
||||
struct nvgpu_fifo *f = &g->fifo;
|
||||
bool found_pbdma_for_runlist = false;
|
||||
u32 runlist_bit;
|
||||
u32 id;
|
||||
u32 id = U32_MAX;
|
||||
|
||||
runlist_bit = BIT32(runlist_id);
|
||||
for (id = 0; id < f->num_pbdma; id++) {
|
||||
for (id = 0U; id < f->num_pbdma; id++) {
|
||||
if ((f->pbdma_map[id] & runlist_bit) != 0U) {
|
||||
nvgpu_log_info(g, "gr info: pbdma_map[%d]=%d",
|
||||
id, f->pbdma_map[id]);
|
||||
|
||||
@@ -23,10 +23,47 @@
|
||||
#ifndef NVGPU_PBDMA_COMMON_H
|
||||
#define NVGPU_PBDMA_COMMON_H
|
||||
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Push-Buffer DMA
|
||||
*
|
||||
* PBDMA unit fetches pushbuffer data from memory, generates
|
||||
* commands, called "methods", from the fetched data, executes some of the
|
||||
* generated methods itself, and sends the remainder of the methods to engines.
|
||||
*/
|
||||
struct gk20a;
|
||||
|
||||
/**
|
||||
* nvgpu_pbdma_setup_sw - initialize PBDMA software context
|
||||
*
|
||||
* @param g Current GPU
|
||||
*
|
||||
* Gets number of PBDMAs and builds a map of runlists that will be serviced
|
||||
* by those PBDMAs. Returns non-zero value in case of failure.
|
||||
*/
|
||||
int nvgpu_pbdma_setup_sw(struct gk20a *g);
|
||||
|
||||
/**
|
||||
* nvgpu_pbdma_cleanup_sw - clean up PBDMA software context
|
||||
*
|
||||
* @param g Current GPU
|
||||
*
|
||||
* Cleans up PBDMA software context and related resources.
|
||||
*/
|
||||
void nvgpu_pbdma_cleanup_sw(struct gk20a *g);
|
||||
|
||||
/**
|
||||
* nvgpu_pbdma_find_for_runlist - find PBDMA servicing the runlist
|
||||
*
|
||||
* @param g Current GPU
|
||||
* @param runlist_id Runlist identifier
|
||||
* @param pbdma_id Pointer to PBDMA identifier
|
||||
*
|
||||
* Finds the PBDMA which is servicing #runlist_id.
|
||||
* Sets #pbdma_id to valid value and returns true in case PBDMA could be found.
|
||||
* Sets #pbdma_id to U32_MAX and returns false in case PBDMA could not be found.
|
||||
*/
|
||||
bool nvgpu_pbdma_find_for_runlist(struct gk20a *g,
|
||||
u32 runlist_id, u32 *pbdma_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user