From 57089a1b34bcbf4e8b74c194ac716a56e251fe1a Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Mon, 10 May 2021 09:17:05 +0000 Subject: [PATCH] gpu: nvgpu: address comments from common.rc code inspection CR review - Move unnecessary headers under recovery flag. - Update doxygen documentation of one API to match the code. Jira NVGPU-6372 Change-Id: I9cf744c8014ea92f18cc10824e9fcaed9aa7d5de Signed-off-by: Shashank Singh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2527118 (cherry picked from commit cb4b03a3b00321a4c07b3d9cc2768f7183e99c45) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2531583 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Rajesh Devaraj Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/rc/rc.c | 11 ++++++----- drivers/gpu/nvgpu/include/nvgpu/rc.h | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/nvgpu/common/rc/rc.c b/drivers/gpu/nvgpu/common/rc/rc.c index 4e5a64715..9dd868e23 100644 --- a/drivers/gpu/nvgpu/common/rc/rc.c +++ b/drivers/gpu/nvgpu/common/rc/rc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,17 +23,18 @@ #include #include #include +#ifdef CONFIG_NVGPU_RECOVERY #include #include +#include +#include +#include +#endif #include #include #include -#include #include -#include #include -#include -#include void nvgpu_rc_fifo_recover(struct gk20a *g, u32 eng_bitmask, u32 hw_id, bool id_is_tsg, diff --git a/drivers/gpu/nvgpu/include/nvgpu/rc.h b/drivers/gpu/nvgpu/include/nvgpu/rc.h index c2d1feb61..466a341e1 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/rc.h +++ b/drivers/gpu/nvgpu/include/nvgpu/rc.h @@ -163,8 +163,8 @@ void nvgpu_rc_ctxsw_timeout(struct gk20a *g, u32 eng_bitmask, * @param error_notifier [in] Error notifier type to be set. * @param pbdma_status [in] Pointer to PBDMA status info. * - * Do PBDMA fault recovery. For safety, just set error notifier as per - * \a error_notifier and print warning if quiesce is not triggered already. + * Do PBDMA fault recovery. Set error notifier as per \a error_notifier and call + * \a nvgpu_rc_tsg_and_related_engines to do the recovery. */ void nvgpu_rc_pbdma_fault(struct gk20a *g, u32 pbdma_id, u32 error_notifier, struct nvgpu_pbdma_status_info *pbdma_status);