diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-10-09 20:45:02 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-20 22:03:59 -0400 |
commit | 8aacfb1da4ef0a7286f598575f7d556269a0bce3 (patch) | |
tree | c26d8f7ed26002f521d3afdb964cd3c12639fcf9 /drivers/gpu/nvgpu/include | |
parent | e26ce10cc6b59314ccf5931a8c5b46a9e57b085a (diff) |
gpu: nvgpu: Add VIDMEM debugging
Add some VIDMEM debugging to help track the background free
thread and allocs/frees.
JIRA NVGPU-30
JIRA NVGPU-138
Change-Id: I88471b29d2a42c104666b111d0d3014110c9d56c
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1576330
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/log.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vidmem.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/log.h b/drivers/gpu/nvgpu/include/nvgpu/log.h index 2afddacb..65f86198 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/log.h +++ b/drivers/gpu/nvgpu/include/nvgpu/log.h | |||
@@ -78,6 +78,7 @@ enum nvgpu_log_categories { | |||
78 | gpu_dbg_alloc = BIT(21), /* Allocator debugging. */ | 78 | gpu_dbg_alloc = BIT(21), /* Allocator debugging. */ |
79 | gpu_dbg_dma = BIT(22), /* DMA allocation prints. */ | 79 | gpu_dbg_dma = BIT(22), /* DMA allocation prints. */ |
80 | gpu_dbg_sgl = BIT(23), /* SGL related traces. */ | 80 | gpu_dbg_sgl = BIT(23), /* SGL related traces. */ |
81 | gpu_dbg_vidmem = BIT(24), /* VIDMEM tracing. */ | ||
81 | gpu_dbg_mem = BIT(31), /* memory accesses; very verbose. */ | 82 | gpu_dbg_mem = BIT(31), /* memory accesses; very verbose. */ |
82 | }; | 83 | }; |
83 | 84 | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h index 690f8164..62c970d3 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h | |||
@@ -142,4 +142,10 @@ static inline void nvgpu_vidmem_thread_unpause(struct mm_gk20a *mm) | |||
142 | 142 | ||
143 | #endif /* !defined(CONFIG_GK20A_VIDMEM) */ | 143 | #endif /* !defined(CONFIG_GK20A_VIDMEM) */ |
144 | 144 | ||
145 | /* | ||
146 | * Simple macro for VIDMEM debugging. | ||
147 | */ | ||
148 | #define vidmem_dbg(g, fmt, args...) \ | ||
149 | nvgpu_log(g, gpu_dbg_vidmem, fmt, ##args); \ | ||
150 | |||
145 | #endif /* __NVGPU_VIDMEM_H__ */ | 151 | #endif /* __NVGPU_VIDMEM_H__ */ |