From 26b50d77f746e4e9a1556be7e679e45fc0aab8b9 Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Thu, 5 Jul 2018 16:52:19 +0530 Subject: gpu: nvgpu: update dma dbg to report caller __dma_dbg() logs func and line details of itself. Update it to report caller details. Bug 1987855 Change-Id: I51913b0c57c12e11880699caed557da9491304cf Signed-off-by: Nitin Kumbhar Reviewed-on: https://git-master.nvidia.com/r/1771511 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/dma.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/os') diff --git a/drivers/gpu/nvgpu/os/linux/dma.c b/drivers/gpu/nvgpu/os/linux/dma.c index 86a17a7e..77669493 100644 --- a/drivers/gpu/nvgpu/os/linux/dma.c +++ b/drivers/gpu/nvgpu/os/linux/dma.c @@ -97,7 +97,8 @@ static char *nvgpu_dma_flags_to_str(struct gk20a *g, unsigned long flags) * Please use dma_dbg_alloc() and dma_dbg_free() instead of this function. */ static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags, - const char *type, const char *what) + const char *type, const char *what, + const char *func, int line) { char *flags_str = NULL; @@ -111,7 +112,7 @@ static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags, flags_str = nvgpu_dma_flags_to_str(g, flags); __nvgpu_log_dbg(g, gpu_dbg_dma, - __func__, __LINE__, + func, line, "DMA %s: [%s] size=%-7zu " "aligned=%-7zu total=%-10llukB %s", what, type, @@ -124,9 +125,9 @@ static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags, } #define dma_dbg_alloc(g, size, flags, type) \ - __dma_dbg(g, size, flags, type, "alloc") + __dma_dbg(g, size, flags, type, "alloc", __func__, __LINE__) #define dma_dbg_free(g, size, flags, type) \ - __dma_dbg(g, size, flags, type, "free") + __dma_dbg(g, size, flags, type, "free", __func__, __LINE__) /* * For after the DMA alloc is done. -- cgit v1.2.2