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