drm/nouveau/debugfs: we need a ctrl object for debugfs
[sfrench/cifs-2.6.git] / drivers / gpu / drm / nouveau / nouveau_debugfs.h
index 42d65c9d1db7ebd53f66e91553746a123bed5bfd..52c7161297d798ff6305db56816a4690f825f3aa 100644 (file)
@@ -4,8 +4,23 @@
 #include <drm/drmP.h>
 
 #if defined(CONFIG_DEBUG_FS)
+
+#include "nouveau_drm.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 int  nouveau_drm_debugfs_init(struct drm_minor *);
 extern void nouveau_drm_debugfs_cleanup(struct drm_minor *);
+extern int  nouveau_debugfs_init(struct nouveau_drm *);
+extern void nouveau_debugfs_fini(struct nouveau_drm *);
 #else
 static inline int
 nouveau_drm_debugfs_init(struct drm_minor *minor)
@@ -18,6 +33,17 @@ nouveau_drm_debugfs_cleanup(struct drm_minor *minor)
 {
 }
 
+static inline int
+nouveau_debugfs_init(struct nouveau_drm *)
+{
+       return 0;
+}
+
+static inline void
+nouveau_debugfs_fini(struct nouveau_drm *)
+{
+}
+
 #endif
 
 #endif