From b268c9103760fd26706cb3a5b651b82fb82fb105 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 14 Apr 2016 17:36:14 +0530 Subject: 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 Reviewed-on: http://git-master/r/1126792 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers') 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) } platform->g->host1x_dev = host1x_pdev; + if (platform->g->host1x_dev) + nvhost_register_dump_device(platform->g->host1x_dev, + gk20a_debug_dump_device, + platform->g->dev); + platform->bypass_smmu = !device_is_iommuable(dev); platform->disable_bigpage = platform->bypass_smmu; @@ -182,6 +187,11 @@ static int gp10b_tegra_late_probe(struct device *dev) static int gp10b_tegra_remove(struct device *dev) { + struct gk20a_platform *platform = dev_get_drvdata(dev); + + if (platform->g->host1x_dev) + nvhost_unregister_dump_device(platform->g->host1x_dev); + /* remove gk20a power subdomain from host1x */ nvhost_unregister_client_domain(dev_to_genpd(dev)); gr_gp10b_remove_sysfs(dev); -- cgit v1.2.2