diff --git a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c index 5539d58fc..95d0cde6f 100644 --- a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gp10b.c @@ -287,7 +287,7 @@ static const struct gpu_ops vgpu_gp10b_ops = { .set_pmu_options_boost_clock_frequencies = NULL, #endif /* CONFIG_NVGPU_DEBUGGER */ #ifdef CONFIG_DEBUG_FS - .dump_ctxsw_stats = gp10b_ctxsw_prog_dump_ctxsw_stats, + .dump_ctxsw_stats = NULL, #endif #ifdef CONFIG_NVGPU_FECS_TRACE .hw_get_ts_tag_invalid_timestamp = diff --git a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c index 7ee7bdf6c..92bf53cdd 100644 --- a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_gv11b.c @@ -377,7 +377,7 @@ static const struct gpu_ops vgpu_gv11b_ops = { .set_type_per_veid_header = gv11b_ctxsw_prog_set_type_per_veid_header, #ifdef CONFIG_DEBUG_FS - .dump_ctxsw_stats = gp10b_ctxsw_prog_dump_ctxsw_stats, + .dump_ctxsw_stats = NULL, #endif }, .config = { diff --git a/drivers/gpu/nvgpu/os/linux/debug_gr.c b/drivers/gpu/nvgpu/os/linux/debug_gr.c index 5c9ac041f..750d16666 100644 --- a/drivers/gpu/nvgpu/os/linux/debug_gr.c +++ b/drivers/gpu/nvgpu/os/linux/debug_gr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2019 NVIDIA Corporation. All rights reserved. + * Copyright (C) 2017-2020 NVIDIA Corporation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -226,12 +226,14 @@ int gr_gk20a_debugfs_init(struct gk20a *g) if (!d) return -ENOMEM; - d = debugfs_create_file( - "dump_ctxsw_stats_on_channel_close", S_IRUGO|S_IWUSR, + if (!g->is_virtual) { + d = debugfs_create_file( + "dump_ctxsw_stats_on_channel_close", S_IRUGO|S_IWUSR, l->debugfs, g, &dump_ctxsw_stats_on_channel_close_fops); - if (!d) - return -ENOMEM; + if (!d) + return -ENOMEM; + } return 0; }