From 2c3c1048746a4622d8c89a29670120dc8fab93c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:45 +0200 Subject: Adding upstream version 6.1.76. Signed-off-by: Daniel Baumann --- drivers/gpu/drm/nouveau/nouveau_debugfs.h | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 drivers/gpu/drm/nouveau/nouveau_debugfs.h (limited to 'drivers/gpu/drm/nouveau/nouveau_debugfs.h') 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 + +#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 -- cgit v1.2.3