Files
linux-nv-oot/drivers/video/tegra/nvmap/nvmap_debug.h
Pritesh Raithatha 36d513f3cd video: tegra: nvmap: refactor nvmap debug unit
-Created nvmap_debug.c and nvmap_debug.h with moving debug related
code from nvmap_dev to nvmap_debug.
-Refactor code to have all debugfs creation in one function and
call it from nvmap_dev. Same for debugfs removal.
-Build nvmap_debug only when CONFIG_DEBUG_FS is enabled.

JIRA TMM-5721

Change-Id: Ib6482be63bdd56c7ff09804c7b1edaa6e4cf2f21
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226784
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2025-07-24 10:19:07 +00:00

27 lines
728 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* SPDX-FileCopyrightText: Copyright (c) 2011-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef __NVMAP_DEBUG_H
#define __NVMAP_DEBUG_H
#if defined(CONFIG_DEBUG_FS)
void nvmap_debug_init(struct dentry **nvmap_debug_root);
void nvmap_debug_free(struct dentry *nvmap_debug_root);
#else
static inline void nvmap_debug_init(struct dentry **nvmap_debug_root)
{
}
static inline void nvmap_debug_free(struct dentry *nvmap_debug_root)
{
}
#endif
struct dentry *nvmap_debug_create_debugfs_handles_by_pid(
const char *name,
struct dentry *parent,
void *data);
void nvmap_debug_remove_debugfs_handles_by_pid(struct dentry *d);
#endif /* __NVMAP_DEBUG_H */