From 5efefe169c799a779d0b4e239b21c8c9e1da15d8 Mon Sep 17 00:00:00 2001 From: Philip Elcan Date: Wed, 9 Oct 2019 17:15:22 -0400 Subject: [PATCH] gpu: nvgpu: init: move is_nvgpu_gpu_state_valid out of gk20a.h Move the declaration of is_nvgpu_gpu_state_valid() from gk20a.h to nvgpu_init.h and add doxygen for it. JIRA NVGPU-2532 Change-Id: I79dcb145c9a3ea70a8d5b7cd639f799b7320e04b Signed-off-by: Philip Elcan Reviewed-on: https://git-master.nvidia.com/r/2214420 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 2 -- drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 61da9ad76..68dd1018f 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h @@ -1376,8 +1376,6 @@ static inline u32 nvgpu_get_poll_timeout(struct gk20a *g) #define GK20A_NONSTALL_OPS_WAKEUP_SEMAPHORE BIT32(0) #define GK20A_NONSTALL_OPS_POST_EVENTS BIT32(1) -bool is_nvgpu_gpu_state_valid(struct gk20a *g); - /** IO Resource in the device tree for BAR0 */ #define GK20A_BAR0_IORESOURCE_MEM 0U /** IO Resource in the device tree for BAR1 */ diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h index 74dbbdb0d..25d2fd796 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_init.h @@ -313,4 +313,14 @@ int gk20a_busy(struct gk20a *g); */ void gk20a_idle(struct gk20a *g); +/** + * @brief Check if the GPU HW is in a valid state by making sure the boot_0 + * register returns a valid value. + * + * @param g [in] The GPU + * + * @return True if the HW state is determined to be valid. False, otherwise. + */ +bool is_nvgpu_gpu_state_valid(struct gk20a *g); + #endif /* NVGPU_INIT_H */