summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-06-13 12:01:50 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-06-14 07:50:40 -0400
commit768dc5ad42c927c0a272f7d14b9e3ac0378378a6 (patch)
treeeb19fc20a3645fe452756afab24a280c50184cc0 /drivers
parent7010afdfda346df5b6854dadf7d75d0e6ad3b27f (diff)
gpu: nvgpu: Do not register debug dump to nvhost
Do not register device for debug dump to nvhost. This can cause races if nvhost calls debug dump spew at the same time when GPU is being powered off. Bug 200198908 Bug 1770522 Change-Id: Ia7e57437d647041e82dd4c61ffd08fb1cbe1f32f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1163441 GVS: Gerrit_Virtual_Submit Tested-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/debug_gk20a.c19
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c9
2 files changed, 0 insertions, 28 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c
index a3fa2ea5..c02e9760 100644
--- a/drivers/gpu/nvgpu/gk20a/debug_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/debug_gk20a.c
@@ -326,25 +326,6 @@ void gk20a_debug_dump(struct device *dev)
326 g->ops.debug.show_dump(g, &o); 326 g->ops.debug.show_dump(g, &o);
327} 327}
328 328
329void gk20a_debug_dump_device(void *data)
330{
331 struct gk20a_debug_output o = {
332 .fn = gk20a_debug_write_printk
333 };
334 struct gk20a *g;
335 struct device *dev = data;
336
337 /* In pre-silicon we don't need full spew on stuck syncpoint */
338 if (!tegra_platform_is_silicon())
339 return;
340
341 g = gk20a_from_dev(dev);
342 /* HAL only initialized after 1st power-on */
343 if (g->ops.debug.show_dump)
344 g->ops.debug.show_dump(g, &o);
345}
346EXPORT_SYMBOL(gk20a_debug_dump_device);
347
348static int gk20a_debug_show(struct seq_file *s, void *unused) 329static int gk20a_debug_show(struct seq_file *s, void *unused)
349{ 330{
350 struct device *dev = s->private; 331 struct device *dev = s->private;
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
index 33937448..618b1716 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
@@ -746,10 +746,6 @@ static int gk20a_tegra_probe(struct device *dev)
746 746
747 platform->g->host1x_dev = host1x_pdev; 747 platform->g->host1x_dev = host1x_pdev;
748 748
749 if (platform->g->host1x_dev)
750 nvhost_register_dump_device(platform->g->host1x_dev,
751 gk20a_debug_dump_device,
752 platform->g->dev);
753#ifdef CONFIG_OF 749#ifdef CONFIG_OF
754 joint_xpu_rail = of_property_read_bool(of_chosen, 750 joint_xpu_rail = of_property_read_bool(of_chosen,
755 "nvidia,tegra-joint_xpu_rail"); 751 "nvidia,tegra-joint_xpu_rail");
@@ -794,11 +790,6 @@ static int gk20a_tegra_late_probe(struct device *dev)
794 790
795static int gk20a_tegra_remove(struct device *dev) 791static int gk20a_tegra_remove(struct device *dev)
796{ 792{
797 struct gk20a_platform *platform = dev_get_drvdata(dev);
798
799 if (platform->g->host1x_dev)
800 nvhost_unregister_dump_device(platform->g->host1x_dev);
801
802 /* remove gk20a power subdomain from host1x */ 793 /* remove gk20a power subdomain from host1x */
803 nvhost_unregister_client_domain(dev_to_genpd(dev)); 794 nvhost_unregister_client_domain(dev_to_genpd(dev));
804 795