diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:49:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:49:45 +0000 |
commit | 2c3c1048746a4622d8c89a29670120dc8fab93c4 (patch) | |
tree | 848558de17fb3008cdf4d861b01ac7781903ce39 /drivers/gpu/drm/nouveau/nouveau_debugfs.h | |
parent | Initial commit. (diff) | |
download | linux-upstream.tar.xz linux-upstream.zip |
Adding upstream version 6.1.76.upstream/6.1.76upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_debugfs.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_debugfs.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.h b/drivers/gpu/drm/nouveau/nouveau_debugfs.h new file mode 100644 index 000000000..77f0323b3 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.h @@ -0,0 +1,42 @@ +/* SPDX-License-Identifier: MIT */ +#ifndef __NOUVEAU_DEBUGFS_H__ +#define __NOUVEAU_DEBUGFS_H__ + +#include <drm/drm_debugfs.h> + +#if defined(CONFIG_DEBUG_FS) + +#include "nouveau_drv.h" + +struct nouveau_debugfs { + struct nvif_object ctrl; +}; + +static inline struct nouveau_debugfs * +nouveau_debugfs(struct drm_device *dev) +{ + return nouveau_drm(dev)->debugfs; +} + +extern void nouveau_drm_debugfs_init(struct drm_minor *); +extern int nouveau_debugfs_init(struct nouveau_drm *); +extern void nouveau_debugfs_fini(struct nouveau_drm *); +#else +static inline void +nouveau_drm_debugfs_init(struct drm_minor *minor) +{} + +static inline int +nouveau_debugfs_init(struct nouveau_drm *drm) +{ + return 0; +} + +static inline void +nouveau_debugfs_fini(struct nouveau_drm *drm) +{ +} + +#endif + +#endif |