From dd739fcb039d51606e9a5454ec0aab17bcb01965 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 18 Apr 2018 19:39:46 -0700 Subject: gpu: nvgpu: Remove gk20a_dbg* functions Switch all logging to nvgpu_log*(). gk20a_dbg* macros are intentionally left there because of use from other repositories. Because the new functions do not work without a pointer to struct gk20a, and piping it just for logging is excessive, some log messages are deleted. Change-Id: I00e22e75fe4596a330bb0282ab4774b3639ee31e Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1704148 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/module.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/module.c') diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 34850013..f00b3cce 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -218,7 +218,7 @@ int gk20a_pm_finalize_poweron(struct device *dev) struct gk20a_platform *platform = gk20a_get_platform(dev); int err; - gk20a_dbg_fn(""); + nvgpu_log_fn(g, " "); if (g->power_on) return 0; @@ -331,7 +331,7 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) struct gk20a_platform *platform = gk20a_get_platform(dev); bool irqs_enabled; - gk20a_dbg_fn(""); + nvgpu_log_fn(g, " "); nvgpu_mutex_acquire(&g->poweroff_lock); @@ -1013,7 +1013,7 @@ static int gk20a_pm_init(struct device *dev) struct gk20a *g = get_gk20a(dev); int err = 0; - gk20a_dbg_fn(""); + nvgpu_log_fn(g, " "); /* Initialise pm runtime */ if (g->railgate_delay) { @@ -1043,7 +1043,7 @@ void gk20a_driver_start_unload(struct gk20a *g) { struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); - gk20a_dbg(gpu_dbg_shutdown, "Driver is now going down!\n"); + nvgpu_log(g, gpu_dbg_shutdown, "Driver is now going down!\n"); down_write(&l->busy_lock); __nvgpu_set_enabled(g, NVGPU_DRIVER_IS_DYING, true); @@ -1134,8 +1134,6 @@ static int gk20a_probe(struct platform_device *dev) return -ENODATA; } - gk20a_dbg_fn(""); - platform_set_drvdata(dev, platform); if (gk20a_gpu_is_virtual(&dev->dev)) @@ -1148,6 +1146,9 @@ static int gk20a_probe(struct platform_device *dev) } gk20a = &l->g; + + nvgpu_log_fn(gk20a, " "); + nvgpu_init_gk20a(gk20a); set_gk20a(dev, gk20a); l->dev = &dev->dev; @@ -1248,7 +1249,7 @@ int nvgpu_remove(struct device *dev, struct class *class) struct gk20a_platform *platform = gk20a_get_platform(dev); int err; - gk20a_dbg_fn(""); + nvgpu_log_fn(g, " "); err = nvgpu_quiesce(g); WARN(err, "gpu failed to idle during driver removal"); @@ -1288,7 +1289,7 @@ int nvgpu_remove(struct device *dev, struct class *class) if (platform->remove) platform->remove(dev); - gk20a_dbg_fn("removed"); + nvgpu_log_fn(g, "removed"); return err; } -- cgit v1.2.2