2019-06-19 20:13:43 -04:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2013-02-08 21:42:13 +01:00
|
|
|
#ifndef __NOUVEAU_DEBUGFS_H__
|
|
|
|
#define __NOUVEAU_DEBUGFS_H__
|
|
|
|
|
2019-05-19 16:00:43 +02:00
|
|
|
#include <drm/drm_debugfs.h>
|
2013-02-08 21:42:13 +01:00
|
|
|
|
|
|
|
#if defined(CONFIG_DEBUG_FS)
|
2015-07-30 11:52:23 +02:00
|
|
|
|
2016-05-20 09:22:55 +10:00
|
|
|
#include "nouveau_drv.h"
|
2015-07-30 11:52:23 +02:00
|
|
|
|
|
|
|
struct nouveau_debugfs {
|
|
|
|
struct nvif_object ctrl;
|
|
|
|
};
|
|
|
|
|
|
|
|
static inline struct nouveau_debugfs *
|
|
|
|
nouveau_debugfs(struct drm_device *dev)
|
|
|
|
{
|
|
|
|
return nouveau_drm(dev)->debugfs;
|
|
|
|
}
|
|
|
|
|
2020-03-10 16:31:21 +03:00
|
|
|
extern void nouveau_drm_debugfs_init(struct drm_minor *);
|
2015-07-30 11:52:23 +02:00
|
|
|
extern int nouveau_debugfs_init(struct nouveau_drm *);
|
|
|
|
extern void nouveau_debugfs_fini(struct nouveau_drm *);
|
2013-02-08 21:42:13 +01:00
|
|
|
#else
|
2020-03-10 16:31:21 +03:00
|
|
|
static inline void
|
2015-07-31 00:35:42 +02:00
|
|
|
nouveau_drm_debugfs_init(struct drm_minor *minor)
|
2020-03-10 16:31:21 +03:00
|
|
|
{}
|
2013-02-08 21:42:13 +01:00
|
|
|
|
2015-07-30 11:52:23 +02:00
|
|
|
static inline int
|
2016-01-13 14:48:13 +01:00
|
|
|
nouveau_debugfs_init(struct nouveau_drm *drm)
|
2015-07-30 11:52:23 +02:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
2016-01-13 14:48:13 +01:00
|
|
|
nouveau_debugfs_fini(struct nouveau_drm *drm)
|
2015-07-30 11:52:23 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-02-08 21:42:13 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|