From 42dfcfb317e5d465331ec23ff0be4759942f7dc5 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Tue, 15 Jun 2021 12:20:50 -0700 Subject: [PATCH] gpu: nvgpu: fix DVR issues in ltc unit 1. Move ecc_init from public to private, since it is used only in init_ltc_support. Also, added description about initializing ltc-lts ecc counters in init_ltc_support function description. 2. Few documentation update to fix incorrect variable names and spellings. JIRA NVGPU-6599 Change-Id: I2be5952d6188cbe9270f60d334fe2f696bc14ed6 Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2543502 (cherry picked from commit 03357b9dea7478924fd7e59f4f88c809a5b9504c) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2551108 Reviewed-by: svcacv Reviewed-by: svc_kernel_abi Reviewed-by: Sagar Kamble Reviewed-by: Seema Khowala Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/include/nvgpu/gops/ltc.h | 27 +++++++++++----------- drivers/gpu/nvgpu/include/nvgpu/ltc.h | 8 +++---- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/gops/ltc.h b/drivers/gpu/nvgpu/include/nvgpu/gops/ltc.h index 52c4ceac8..e5a7bc884 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gops/ltc.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gops/ltc.h @@ -67,25 +67,14 @@ struct gops_ltc_intr { * @see gpu_ops */ struct gops_ltc { - /** - * @brief Initialize LTC unit ECC support. - * - * @param g [in] Pointer to GPU driver struct. - * - * This function allocates memory to track the ecc error counts - * for LTC unit. - * - * @return 0 in case of success, < 0 in case of failure. - */ - int (*ecc_init)(struct gk20a *g); - /** * @brief Initialize LTC support. * * @param g [in] Pointer to GPU driver struct. * * This function reads ltc unit info from GPU h/w and stores - * it in #nvgpu_ltc structure. + * it in #nvgpu_ltc structure. This function also initializes + * LTC unit ecc counters. * * @return 0 in case of success, < 0 in case of failure. * @retval -ENOMEM if memory allocation fails for #nvgpu_ltc. @@ -134,6 +123,18 @@ struct gops_ltc { struct gops_ltc_intr intr; /** @cond DOXYGEN_SHOULD_SKIP_THIS */ + /** + * @brief Initialize LTC unit ECC support. + * + * @param g [in] Pointer to GPU driver struct. + * + * This function allocates memory to track the ecc error counts + * for LTC unit. + * + * @return 0 in case of success, < 0 in case of failure. + */ + int (*ecc_init)(struct gk20a *g); + void (*init_fs_state)(struct gk20a *g); void (*set_enabled)(struct gk20a *g, bool enabled); #ifdef CONFIG_NVGPU_GRAPHICS diff --git a/drivers/gpu/nvgpu/include/nvgpu/ltc.h b/drivers/gpu/nvgpu/include/nvgpu/ltc.h index a21b36e6e..8c752aa5b 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/ltc.h +++ b/drivers/gpu/nvgpu/include/nvgpu/ltc.h @@ -57,7 +57,7 @@ struct nvgpu_ltc { * @brief Allocate and initialize a error counters for all ltc-lts instances. * * @param g [in] The GPU driver struct. - * @param stat [out] Pointer to array of tpc error counters. + * @param stat [out] Pointer to array of ltc-lts error counters. * @param name [in] Unique name for error counter. * * Calculates the total number of ltc-lts instances, allocates memory for each @@ -122,11 +122,11 @@ void nvgpu_ltc_remove_support(struct gk20a *g); * @param g [in] Pointer to GPU driver struct. * * This function will enable/disable caching feature of L2 based on - * #mm.ltc_enable_target. With #mm.ltc_enable_target set to true, - * gpu l2 caching feature will be enabled. Gpu L2 cahching is enabled with h/w + * #mm.ltc_enabled_target. With #mm.ltc_enabled_target set to true, + * gpu l2 caching feature will be enabled. Gpu L2 caching is enabled with h/w * power-on and can only be changed after h/w reset, before the first * transaction received by L2. - * With #mm.ltc_enable_target set to false, Gpu L2 caching will be disabled. + * With #mm.ltc_enabled_target set to false, Gpu L2 caching will be disabled. * With Gpu L2 cache disabled, all transactions will miss in L2 and data will * be always write-through to main memory. *