From 8b981f3c64897128fd2a94c03a819bbca5edd4da Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Thu, 4 May 2017 11:17:31 -0700 Subject: gpu: nvgpu: gp10b: create t18x debugfs nodes Modifed code to create debugfs nodes correctly by moving relevant code from gp10b_tegra_probe() to gk20a_debug_init(). Bug 200292090 Change-Id: Ib5d0a57d8b600cd30dc2a37794d8208b5c57ccfa Signed-off-by: seshendra Gadagottu Reviewed-on: http://git-master/r/1476484 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/debug_gk20a.c | 17 +++++++++++++++++ drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c index 885f0a83..029fefb8 100644 --- a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c @@ -388,6 +388,23 @@ void gk20a_debug_init(struct device *dev, const char *debugfs_symlink) S_IRUGO|S_IWUSR, platform->debugfs, &g->runlist_interleave); +#ifdef CONFIG_ARCH_TEGRA_18x_SOC + g->gr.t18x.ctx_vars.debugfs_force_preemption_gfxp = + debugfs_create_bool("force_preemption_gfxp", S_IRUGO|S_IWUSR, + platform->debugfs, + &g->gr.t18x.ctx_vars.force_preemption_gfxp); + + g->gr.t18x.ctx_vars.debugfs_force_preemption_cilp = + debugfs_create_bool("force_preemption_cilp", S_IRUGO|S_IWUSR, + platform->debugfs, + &g->gr.t18x.ctx_vars.force_preemption_cilp); + + g->gr.t18x.ctx_vars.debugfs_dump_ctxsw_stats = + debugfs_create_bool("dump_ctxsw_stats_on_channel_close", + S_IRUGO|S_IWUSR, platform->debugfs, + &g->gr.t18x. + ctx_vars.dump_ctxsw_stats_on_channel_close); +#endif gr_gk20a_debugfs_init(g); gk20a_pmu_debugfs_init(g->dev); diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c index 01defa00..77b4b536 100644 --- a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c @@ -159,23 +159,6 @@ static int gp10b_tegra_probe(struct device *dev) platform->g->gr.t18x.ctx_vars.force_preemption_gfxp = false; platform->g->gr.t18x.ctx_vars.force_preemption_cilp = false; - platform->g->gr.t18x.ctx_vars.debugfs_force_preemption_gfxp = - debugfs_create_bool("force_preemption_gfxp", S_IRUGO|S_IWUSR, - platform->debugfs, - &platform->g->gr.t18x.ctx_vars.force_preemption_gfxp); - - platform->g->gr.t18x.ctx_vars.debugfs_force_preemption_cilp = - debugfs_create_bool("force_preemption_cilp", S_IRUGO|S_IWUSR, - platform->debugfs, - &platform->g->gr.t18x.ctx_vars.force_preemption_cilp); - - platform->g->gr.t18x.ctx_vars.debugfs_dump_ctxsw_stats = - debugfs_create_bool("dump_ctxsw_stats_on_channel_close", - S_IRUGO|S_IWUSR, - platform->debugfs, - &platform->g->gr.t18x. - ctx_vars.dump_ctxsw_stats_on_channel_close); - platform->g->mm.vidmem_is_vidmem = platform->vidmem_is_vidmem; gp10b_tegra_get_clocks(dev); -- cgit v1.2.2