summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-04-14 08:06:14 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:12 -0500
commitb268c9103760fd26706cb3a5b651b82fb82fb105 (patch)
treef3f5e690926d4a18fad32a9bf519bdd092b92a3c /drivers
parent545dd0e3707c317a8b47dc0660b74d81f74bd416 (diff)
gpu: nvgpu: register to nvhost for debug dump
Register debug dump callback gk20a_debug_dump_device() to nvhost using nvhost_register_dump_device() Unregister the callback in gp10b_tegra_remove() Bug 200188753 Change-Id: I9161cfdf969208bd8b6160742bf89e327aa2a6b4 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1126792 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
index 25673873..587e0a7a 100644
--- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
+++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c
@@ -135,6 +135,11 @@ static int gp10b_tegra_probe(struct device *dev)
135 } 135 }
136 136
137 platform->g->host1x_dev = host1x_pdev; 137 platform->g->host1x_dev = host1x_pdev;
138 if (platform->g->host1x_dev)
139 nvhost_register_dump_device(platform->g->host1x_dev,
140 gk20a_debug_dump_device,
141 platform->g->dev);
142
138 platform->bypass_smmu = !device_is_iommuable(dev); 143 platform->bypass_smmu = !device_is_iommuable(dev);
139 platform->disable_bigpage = platform->bypass_smmu; 144 platform->disable_bigpage = platform->bypass_smmu;
140 145
@@ -182,6 +187,11 @@ static int gp10b_tegra_late_probe(struct device *dev)
182 187
183static int gp10b_tegra_remove(struct device *dev) 188static int gp10b_tegra_remove(struct device *dev)
184{ 189{
190 struct gk20a_platform *platform = dev_get_drvdata(dev);
191
192 if (platform->g->host1x_dev)
193 nvhost_unregister_dump_device(platform->g->host1x_dev);
194
185 /* remove gk20a power subdomain from host1x */ 195 /* remove gk20a power subdomain from host1x */
186 nvhost_unregister_client_domain(dev_to_genpd(dev)); 196 nvhost_unregister_client_domain(dev_to_genpd(dev));
187 gr_gp10b_remove_sysfs(dev); 197 gr_gp10b_remove_sysfs(dev);