From f99e05006f9f60b6d0bb5c05a5cdddf5fea4cc81 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Fri, 8 Jul 2016 12:15:59 -0700 Subject: 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 Reviewed-on: http://git-master/r/1178689 Reviewed-by: Yu-Huan Hsu --- drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_allocator.c') 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) * Handle the common init stuff for a gk20a_allocator. */ int __gk20a_alloc_common_init(struct gk20a_allocator *a, - const char *name, void *priv, + const char *name, void *priv, bool dbg, const struct gk20a_allocator_ops *ops) { if (!ops) @@ -94,6 +94,7 @@ int __gk20a_alloc_common_init(struct gk20a_allocator *a, a->ops = ops; a->priv = priv; + a->debug = dbg; mutex_init(&a->lock); -- cgit v1.2.2