From c0a7556cb32254ae038095d97518bfa1ec4e34f5 Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Wed, 23 Oct 2019 11:22:42 -0400 Subject: [PATCH] gpu: nvgpu: init: make quiesce clean function non-static Make nvgpu_sw_quiesce_remove_support() non-static so that it can be called from the init unit test and cleanup the running thread. Bug 2732985 Change-Id: I01afa9c21967b39f6f9f129590189882bbc963b4 Signed-off-by: Philip Elcan Reviewed-on: https://git-master.nvidia.com/r/2224306 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert GVS: Gerrit_Virtual_Submit Reviewed-by: Thomas Fleury Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/init/nvgpu_init.c | 2 +- drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/common/init/nvgpu_init.c b/drivers/gpu/nvgpu/common/init/nvgpu_init.c index 4832382ec..b26275eda 100644 --- a/drivers/gpu/nvgpu/common/init/nvgpu_init.c +++ b/drivers/gpu/nvgpu/common/init/nvgpu_init.c @@ -142,7 +142,7 @@ static int nvgpu_sw_quiesce_init_support(struct gk20a *g) return 0; } -static void nvgpu_sw_quiesce_remove_support(struct gk20a *g) +void nvgpu_sw_quiesce_remove_support(struct gk20a *g) { #ifndef CONFIG_NVGPU_RECOVERY if (g->sw_quiesce_init_done) { diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h index 25d2fd796..a8d3d3a12 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h @@ -128,6 +128,18 @@ int nvgpu_prepare_poweroff(struct gk20a *g); */ void nvgpu_sw_quiesce(struct gk20a *g); +/** + * @brief Cleanup SW Quiesce state + * + * @param g [in] The GPU + * + * If SW Quiesce was previously initialized: + * - Stop the quiesce thread. + * - Destroy cond object. + * - Mark Quiesce as uninitialized. + */ +void nvgpu_sw_quiesce_remove_support(struct gk20a *g); + /** * @brief Start GPU idle *