gpu: nvgpu: add sequence support for gsp cmd/msg

implemented sequence support which is needed for cmd/msg for sequencing
all the commands sent from NVGPU to gsp and also to handle cmd responses
with respect to correspondind assigned sequences.

NVGPU-6784

Signed-off-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com>
Change-Id: I7d0bb015227c11512ec3c7a5ef7117e149704206
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2590607
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Ramesh Mylavarapu
2021-09-07 19:04:56 +05:30
committed by mobile promotions
parent 3880443b53
commit 8c455dff18
7 changed files with 279 additions and 3 deletions

View File

@@ -29,6 +29,7 @@
#include <nvgpu/dma.h>
#endif
#include "ipc/gsp_seq.h"
#include "gsp_priv.h"
#include "gsp_bootstrap.h"
@@ -58,6 +59,8 @@ void nvgpu_gsp_sw_deinit(struct gk20a *g)
#ifdef CONFIG_NVGPU_GSP_STRESS_TEST
nvgpu_dma_free(g, &g->gsp->gsp_test.gsp_test_sysmem_block);
#endif
nvgpu_gsp_sequences_free(g, g->gsp->sequences);
nvgpu_kfree(g, g->gsp);
g->gsp = NULL;
}
@@ -99,6 +102,14 @@ int nvgpu_gsp_sw_init(struct gk20a *g)
/* Init isr mutex */
nvgpu_mutex_init(&gsp->isr_mutex);
err = nvgpu_gsp_sequences_init(g, g->gsp);
if (err != 0) {
nvgpu_err(g, "GSP sequences init failed");
nvgpu_mutex_destroy(&gsp->isr_mutex);
nvgpu_kfree(g, g->gsp);
g->gsp = NULL;
}
exit:
return err;
}