From b426d710a270a6038de2ee7af7f1be35f80ed69b Mon Sep 17 00:00:00 2001 From: vivekku Date: Mon, 31 Jul 2023 09:57:58 +0000 Subject: [PATCH] gpu: nvgpu: gsp: move msg info logs to debug logs Changes - moved the message logs from info to gsp debug which can be enabled on requirement. Bug 4227016 Bug 4197632 Bug 4199856 Change-Id: I6067a9b37664d325d971ccc8e1a6c13c2d1b3bb7 Signed-off-by: vivekku Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2967169 GVS: Gerrit_Virtual_Submit Reviewed-by: Mahantesh Kumbar --- drivers/gpu/nvgpu/common/gsp/gsp_bootstrap.c | 2 +- drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c | 4 ++-- drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c | 8 ++++---- drivers/gpu/nvgpu/hal/gsp/gsp_ga10b.c | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/nvgpu/common/gsp/gsp_bootstrap.c b/drivers/gpu/nvgpu/common/gsp/gsp_bootstrap.c index 5d3599229..dfdae2ff7 100644 --- a/drivers/gpu/nvgpu/common/gsp/gsp_bootstrap.c +++ b/drivers/gpu/nvgpu/common/gsp/gsp_bootstrap.c @@ -162,7 +162,7 @@ int nvgpu_gsp_wait_for_mailbox_update(struct nvgpu_gsp *gsp, mail_box_data = flcn->g->ops.falcon.mailbox_read( flcn, mailbox_index); if (mail_box_data == exp_value) { - nvgpu_info(flcn->g, + nvgpu_gsp_dbg(flcn->g, "gsp mailbox-0 updated successful with 0x%x", mail_box_data); break; diff --git a/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c b/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c index dcec4ddc9..3b29c9841 100644 --- a/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c +++ b/drivers/gpu/nvgpu/common/gsp_scheduler/gsp_scheduler.c @@ -54,7 +54,7 @@ void nvgpu_gsp_sched_suspend(struct gk20a *g, struct nvgpu_gsp_sched *gsp_sched) nvgpu_gsp_dbg(g, " "); if (gsp == NULL) { - nvgpu_info(g, "GSP not initialized"); + nvgpu_err(g, "GSP not initialized"); return; } @@ -222,7 +222,7 @@ int nvgpu_gsp_sched_bootstrap_hs(struct gk20a *g) goto de_init; } - nvgpu_info(g, "gsp scheduler bootstrapped.\n"); + nvgpu_gsp_dbg(g, "gsp scheduler bootstrapped.\n"); return status; de_init: nvgpu_gsp_sched_sw_deinit(g); diff --git a/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c b/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c index d7fd6e341..e3517edd5 100644 --- a/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c +++ b/drivers/gpu/nvgpu/common/gsp_scheduler/ipc/gsp_msg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2021-2023, 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"), @@ -174,10 +174,10 @@ int nvgpu_gsp_process_message(struct gk20a *g) break; } - nvgpu_info(g, "read msg hdr: "); - nvgpu_info(g, "unit_id = 0x%08x, size = 0x%08x", + nvgpu_gsp_dbg(g, "read msg hdr: "); + nvgpu_gsp_dbg(g, "unit_id = 0x%08x, size = 0x%08x", msg.hdr.unit_id, msg.hdr.size); - nvgpu_info(g, "ctrl_flags = 0x%08x, seq_id = 0x%08x", + nvgpu_gsp_dbg(g, "ctrl_flags = 0x%08x, seq_id = 0x%08x", msg.hdr.ctrl_flags, msg.hdr.seq_id); status = gsp_response_handle(gsp_sched, &msg); diff --git a/drivers/gpu/nvgpu/hal/gsp/gsp_ga10b.c b/drivers/gpu/nvgpu/hal/gsp/gsp_ga10b.c index 9abfb25fb..201b2b982 100644 --- a/drivers/gpu/nvgpu/hal/gsp/gsp_ga10b.c +++ b/drivers/gpu/nvgpu/hal/gsp/gsp_ga10b.c @@ -28,6 +28,7 @@ #include #include #include +#include #ifdef CONFIG_NVGPU_GSP_SCHEDULER #include #include @@ -127,10 +128,10 @@ bool ga10b_gsp_is_debug_mode_en(struct gk20a *g) if (pgsp_falcon_hwcfg2_dbgmode_v(ctl_stat) == pgsp_falcon_hwcfg2_dbgmode_enable_v()) { - nvgpu_info(g, "DEBUG MODE"); + nvgpu_gsp_dbg(g, "DEBUG MODE"); return true; } else { - nvgpu_info(g, "PROD MODE"); + nvgpu_gsp_dbg(g, "PROD MODE"); return false; } }