[PATCH 3/3] gpu: nova-core: trace vGPU state

Zhi Wang <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.kernel.vger.linux-kernel
Message-ID <4dbd55dab7529e58c5fa2d4c4be887d59a1d4b42.1785907106.git.zhiw@nvidia.com>
Record the vGPU state in an independently selectable vGPU trace stream.
Replace the vGPU state dev_dbg() call with the formatted vGPU trace
event.

Signed-off-by: Zhi Wang <[email protected]>
---
 drivers/gpu/nova-core/trace.rs | 2 --
 drivers/gpu/nova-core/vgpu.rs  | 5 +++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/nova-core/trace.rs b/drivers/gpu/nova-core/trace.rs
index db975804f855..17967a686fa2 100644
--- a/drivers/gpu/nova-core/trace.rs
+++ b/drivers/gpu/nova-core/trace.rs
@@ -139,7 +139,6 @@ macro_rules! nova_core_trace_gsp {
     };
 }
 
-#[expect(unused_macros)]
 macro_rules! nova_core_trace_vgpu {
     ($dev:expr, $($arg:tt)*) => {
         $crate::trace::nova_core_trace_impl!(nova_core_trace_vgpu, $dev, $($arg)*)
@@ -149,5 +148,4 @@ macro_rules! nova_core_trace_vgpu {
 pub(crate) use nova_core_trace_driver;
 pub(crate) use nova_core_trace_fsp;
 pub(crate) use nova_core_trace_gsp;
-#[expect(unused_imports)]
 pub(crate) use nova_core_trace_vgpu;
diff --git a/drivers/gpu/nova-core/vgpu.rs b/drivers/gpu/nova-core/vgpu.rs
index 6b7e045acea8..e4fc7e101c93 100644
--- a/drivers/gpu/nova-core/vgpu.rs
+++ b/drivers/gpu/nova-core/vgpu.rs
@@ -13,7 +13,8 @@
         Fsp,
         VgpuMode, //
     },
-    gpu::Chipset, //
+    gpu::Chipset,
+    trace::nova_core_trace_vgpu, //
 };
 
 mod hal;
@@ -50,7 +51,7 @@ pub(crate) fn new(
             );
             VgpuState::Disabled
         });
-        dev_dbg!(pdev, "vGPU state: {:?}\n", state);
+        nova_core_trace_vgpu!(pdev, "state: {:?}", state);
 
         Self { state }
     }
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.