mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00

Typically DRM drivers use the DRM debugfs root entry. However, since Nouveau is heading towards a split into a core and a DRM driver, create a module specific debugfs root directory. Subsequent patches make use of this new debugfs root in order to store GSP-RM log bufferes (optionally beyond a device driver binding). Acked-by: Timur Tabi <ttabi@nvidia.com> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241125142639.9126-1-dakr@kernel.org
59 lines
1023 B
C
59 lines
1023 B
C
/* 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 *);
|
|
|
|
extern struct dentry *nouveau_debugfs_root;
|
|
|
|
int nouveau_module_debugfs_init(void);
|
|
void nouveau_module_debugfs_fini(void);
|
|
#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)
|
|
{
|
|
}
|
|
|
|
static inline int
|
|
nouveau_module_debugfs_init(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void
|
|
nouveau_module_debugfs_fini(void)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|