summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2018-07-05 07:22:19 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-06 00:49:16 -0400
commit26b50d77f746e4e9a1556be7e679e45fc0aab8b9 (patch)
tree6ee18967a9e8f93ae8121454031f86497ad5b88f /drivers/gpu/nvgpu/os
parentd7c78df466c487140af902b98f79ced367198e2d (diff)
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 <nkumbhar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1771511 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os')
-rw-r--r--drivers/gpu/nvgpu/os/linux/dma.c9
1 files changed, 5 insertions, 4 deletions
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)
97 * Please use dma_dbg_alloc() and dma_dbg_free() instead of this function. 97 * Please use dma_dbg_alloc() and dma_dbg_free() instead of this function.
98 */ 98 */
99static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags, 99static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags,
100 const char *type, const char *what) 100 const char *type, const char *what,
101 const char *func, int line)
101{ 102{
102 char *flags_str = NULL; 103 char *flags_str = NULL;
103 104
@@ -111,7 +112,7 @@ static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags,
111 flags_str = nvgpu_dma_flags_to_str(g, flags); 112 flags_str = nvgpu_dma_flags_to_str(g, flags);
112 113
113 __nvgpu_log_dbg(g, gpu_dbg_dma, 114 __nvgpu_log_dbg(g, gpu_dbg_dma,
114 __func__, __LINE__, 115 func, line,
115 "DMA %s: [%s] size=%-7zu " 116 "DMA %s: [%s] size=%-7zu "
116 "aligned=%-7zu total=%-10llukB %s", 117 "aligned=%-7zu total=%-10llukB %s",
117 what, type, 118 what, type,
@@ -124,9 +125,9 @@ static void __dma_dbg(struct gk20a *g, size_t size, unsigned long flags,
124} 125}
125 126
126#define dma_dbg_alloc(g, size, flags, type) \ 127#define dma_dbg_alloc(g, size, flags, type) \
127 __dma_dbg(g, size, flags, type, "alloc") 128 __dma_dbg(g, size, flags, type, "alloc", __func__, __LINE__)
128#define dma_dbg_free(g, size, flags, type) \ 129#define dma_dbg_free(g, size, flags, type) \
129 __dma_dbg(g, size, flags, type, "free") 130 __dma_dbg(g, size, flags, type, "free", __func__, __LINE__)
130 131
131/* 132/*
132 * For after the DMA alloc is done. 133 * For after the DMA alloc is done.