diff options
author | Alex Waterman <alexw@nvidia.com> | 2016-07-08 15:15:59 -0400 |
---|---|---|
committer | Alex Waterman <alexw@nvidia.com> | 2016-07-19 14:32:30 -0400 |
commit | f99e05006f9f60b6d0bb5c05a5cdddf5fea4cc81 (patch) | |
tree | d91e0c31a2c347044f051e60f32cde6f37bebc8b /drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | |
parent | 0793de62b28bf8dcc655628129fd664862ac9909 (diff) |
gpu: nvgpu: smarter debugging for allocators
Allow individual allocacators to be debugged without enabling debugging
on all allocators. The ALLOCATOR_DEBUG define will still work as
expected and enable debugging for all allocators that see this define.
Change-Id: I0d59fa29affeaac15381e65d4128e7bef2f15bd5
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1178689
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_allocator.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c index b7e9a5e4..25d15d0f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | |||
@@ -86,7 +86,7 @@ void gk20a_alloc_destroy(struct gk20a_allocator *a) | |||
86 | * Handle the common init stuff for a gk20a_allocator. | 86 | * Handle the common init stuff for a gk20a_allocator. |
87 | */ | 87 | */ |
88 | int __gk20a_alloc_common_init(struct gk20a_allocator *a, | 88 | int __gk20a_alloc_common_init(struct gk20a_allocator *a, |
89 | const char *name, void *priv, | 89 | const char *name, void *priv, bool dbg, |
90 | const struct gk20a_allocator_ops *ops) | 90 | const struct gk20a_allocator_ops *ops) |
91 | { | 91 | { |
92 | if (!ops) | 92 | if (!ops) |
@@ -94,6 +94,7 @@ int __gk20a_alloc_common_init(struct gk20a_allocator *a, | |||
94 | 94 | ||
95 | a->ops = ops; | 95 | a->ops = ops; |
96 | a->priv = priv; | 96 | a->priv = priv; |
97 | a->debug = dbg; | ||
97 | 98 | ||
98 | mutex_init(&a->lock); | 99 | mutex_init(&a->lock); |
99 | 100 | ||