summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/debug.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/debug.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/debug.c b/drivers/gpu/nvgpu/common/linux/debug.c
index 2962a467..9fd09efe 100644
--- a/drivers/gpu/nvgpu/common/linux/debug.c
+++ b/drivers/gpu/nvgpu/common/linux/debug.c
@@ -101,13 +101,13 @@ static int gk20a_gr_debug_show(struct seq_file *s, void *unused)
101 101
102void gk20a_debug_dump(struct gk20a *g) 102void gk20a_debug_dump(struct gk20a *g)
103{ 103{
104 struct gk20a_platform *platform = gk20a_get_platform(g->dev); 104 struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g));
105 struct gk20a_debug_output o = { 105 struct gk20a_debug_output o = {
106 .fn = gk20a_debug_write_printk 106 .fn = gk20a_debug_write_printk
107 }; 107 };
108 108
109 if (platform->dump_platform_dependencies) 109 if (platform->dump_platform_dependencies)
110 platform->dump_platform_dependencies(g->dev); 110 platform->dump_platform_dependencies(dev_from_gk20a(g));
111 111
112 /* HAL only initialized after 1st power-on */ 112 /* HAL only initialized after 1st power-on */
113 if (g->ops.debug.show_dump) 113 if (g->ops.debug.show_dump)
@@ -180,12 +180,12 @@ void gk20a_init_debug_ops(struct gpu_ops *gops)
180static int railgate_residency_show(struct seq_file *s, void *data) 180static int railgate_residency_show(struct seq_file *s, void *data)
181{ 181{
182 struct gk20a *g = s->private; 182 struct gk20a *g = s->private;
183 struct gk20a_platform *platform = dev_get_drvdata(g->dev); 183 struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
184 unsigned long time_since_last_state_transition_ms; 184 unsigned long time_since_last_state_transition_ms;
185 unsigned long total_rail_gate_time_ms; 185 unsigned long total_rail_gate_time_ms;
186 unsigned long total_rail_ungate_time_ms; 186 unsigned long total_rail_ungate_time_ms;
187 187
188 if (platform->is_railgated(g->dev)) { 188 if (platform->is_railgated(dev_from_gk20a(g))) {
189 time_since_last_state_transition_ms = 189 time_since_last_state_transition_ms =
190 jiffies_to_msecs(jiffies - 190 jiffies_to_msecs(jiffies -
191 g->pstats.last_rail_gate_complete); 191 g->pstats.last_rail_gate_complete);
@@ -227,7 +227,7 @@ static const struct file_operations railgate_residency_fops = {
227 227
228static int gk20a_railgating_debugfs_init(struct gk20a *g) 228static int gk20a_railgating_debugfs_init(struct gk20a *g)
229{ 229{
230 struct gk20a_platform *platform = dev_get_drvdata(g->dev); 230 struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
231 struct dentry *d; 231 struct dentry *d;
232 232
233 if (!g->can_railgate) 233 if (!g->can_railgate)
@@ -244,7 +244,7 @@ static int gk20a_railgating_debugfs_init(struct gk20a *g)
244 244
245void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) 245void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink)
246{ 246{
247 struct device *dev = g->dev; 247 struct device *dev = dev_from_gk20a(g);
248 struct gk20a_platform *platform = dev_get_drvdata(dev); 248 struct gk20a_platform *platform = dev_get_drvdata(dev);
249 249
250 platform->debugfs = debugfs_create_dir(dev_name(dev), NULL); 250 platform->debugfs = debugfs_create_dir(dev_name(dev), NULL);
@@ -364,7 +364,7 @@ void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink)
364 364
365void gk20a_debug_deinit(struct gk20a *g) 365void gk20a_debug_deinit(struct gk20a *g)
366{ 366{
367 struct gk20a_platform *platform = dev_get_drvdata(g->dev); 367 struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
368 368
369 if (!platform->debugfs) 369 if (!platform->debugfs)
370 return; 370 return;