1 1.2 riastrad /* $NetBSD: nouveau_debugfs.h,v 1.3 2021/12/18 23:45:32 riastradh Exp $ */ 2 1.2 riastrad 3 1.3 riastrad /* SPDX-License-Identifier: MIT */ 4 1.1 riastrad #ifndef __NOUVEAU_DEBUGFS_H__ 5 1.1 riastrad #define __NOUVEAU_DEBUGFS_H__ 6 1.1 riastrad 7 1.3 riastrad #include <drm/drm_debugfs.h> 8 1.1 riastrad 9 1.1 riastrad #if defined(CONFIG_DEBUG_FS) 10 1.3 riastrad 11 1.3 riastrad #include "nouveau_drv.h" 12 1.3 riastrad 13 1.3 riastrad struct nouveau_debugfs { 14 1.3 riastrad struct nvif_object ctrl; 15 1.3 riastrad }; 16 1.3 riastrad 17 1.3 riastrad static inline struct nouveau_debugfs * 18 1.3 riastrad nouveau_debugfs(struct drm_device *dev) 19 1.3 riastrad { 20 1.3 riastrad return nouveau_drm(dev)->debugfs; 21 1.3 riastrad } 22 1.3 riastrad 23 1.3 riastrad extern int nouveau_drm_debugfs_init(struct drm_minor *); 24 1.3 riastrad extern int nouveau_debugfs_init(struct nouveau_drm *); 25 1.3 riastrad extern void nouveau_debugfs_fini(struct nouveau_drm *); 26 1.1 riastrad #else 27 1.1 riastrad static inline int 28 1.3 riastrad nouveau_drm_debugfs_init(struct drm_minor *minor) 29 1.1 riastrad { 30 1.1 riastrad return 0; 31 1.1 riastrad } 32 1.1 riastrad 33 1.3 riastrad static inline int 34 1.3 riastrad nouveau_debugfs_init(struct nouveau_drm *drm) 35 1.3 riastrad { 36 1.3 riastrad return 0; 37 1.3 riastrad } 38 1.3 riastrad 39 1.3 riastrad static inline void 40 1.3 riastrad nouveau_debugfs_fini(struct nouveau_drm *drm) 41 1.1 riastrad { 42 1.1 riastrad } 43 1.1 riastrad 44 1.1 riastrad #endif 45 1.1 riastrad 46 1.1 riastrad #endif 47