aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-23 09:46:52 -0400
committerDave Airlie <airlied@redhat.com>2014-09-23 21:43:35 -0400
commitc2611031b49e9ccd571a3737845af3fca2a2090f (patch)
treed24630e666291bb4a2d5c0b6968b0e54ac30a620
parente7f0a889841e14315062c268abea6d2e657d60d3 (diff)
drm: Move internal debugfs functions to drm_internal.h
In my header cleanup I've missed the debugfs functions completely. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_internal.h28
-rw-r--r--include/drm/drmP.h25
2 files changed, 28 insertions, 25 deletions
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index bc71be6f29e0..7cc0a3516871 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -102,3 +102,31 @@ int drm_setmaster_ioctl(struct drm_device *dev, void *data,
102int drm_dropmaster_ioctl(struct drm_device *dev, void *data, 102int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
103 struct drm_file *file_priv); 103 struct drm_file *file_priv);
104struct drm_master *drm_master_create(struct drm_minor *minor); 104struct drm_master *drm_master_create(struct drm_minor *minor);
105
106/* drm_debugfs.c */
107#if defined(CONFIG_DEBUG_FS)
108int drm_debugfs_init(struct drm_minor *minor, int minor_id,
109 struct dentry *root);
110int drm_debugfs_cleanup(struct drm_minor *minor);
111int drm_debugfs_connector_add(struct drm_connector *connector);
112void drm_debugfs_connector_remove(struct drm_connector *connector);
113#else
114static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
115 struct dentry *root)
116{
117 return 0;
118}
119
120static inline int drm_debugfs_cleanup(struct drm_minor *minor)
121{
122 return 0;
123}
124
125static inline int drm_debugfs_connector_add(struct drm_connector *connector)
126{
127 return 0;
128}
129static inline void drm_debugfs_connector_remove(struct drm_connector *connector)
130{
131}
132#endif
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 1ec2ca1d997b..6656fd7d64d4 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1037,23 +1037,12 @@ extern unsigned int drm_debug;
1037 1037
1038 /* Debugfs support */ 1038 /* Debugfs support */
1039#if defined(CONFIG_DEBUG_FS) 1039#if defined(CONFIG_DEBUG_FS)
1040extern int drm_debugfs_init(struct drm_minor *minor, int minor_id,
1041 struct dentry *root);
1042extern int drm_debugfs_create_files(const struct drm_info_list *files, 1040extern int drm_debugfs_create_files(const struct drm_info_list *files,
1043 int count, struct dentry *root, 1041 int count, struct dentry *root,
1044 struct drm_minor *minor); 1042 struct drm_minor *minor);
1045extern int drm_debugfs_remove_files(const struct drm_info_list *files, 1043extern int drm_debugfs_remove_files(const struct drm_info_list *files,
1046 int count, struct drm_minor *minor); 1044 int count, struct drm_minor *minor);
1047extern int drm_debugfs_cleanup(struct drm_minor *minor);
1048extern int drm_debugfs_connector_add(struct drm_connector *connector);
1049extern void drm_debugfs_connector_remove(struct drm_connector *connector);
1050#else 1045#else
1051static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
1052 struct dentry *root)
1053{
1054 return 0;
1055}
1056
1057static inline int drm_debugfs_create_files(const struct drm_info_list *files, 1046static inline int drm_debugfs_create_files(const struct drm_info_list *files,
1058 int count, struct dentry *root, 1047 int count, struct dentry *root,
1059 struct drm_minor *minor) 1048 struct drm_minor *minor)
@@ -1066,20 +1055,6 @@ static inline int drm_debugfs_remove_files(const struct drm_info_list *files,
1066{ 1055{
1067 return 0; 1056 return 0;
1068} 1057}
1069
1070static inline int drm_debugfs_cleanup(struct drm_minor *minor)
1071{
1072 return 0;
1073}
1074
1075static inline int drm_debugfs_connector_add(struct drm_connector *connector)
1076{
1077 return 0;
1078}
1079static inline void drm_debugfs_connector_remove(struct drm_connector *connector)
1080{
1081}
1082
1083#endif 1058#endif
1084 1059
1085extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev, 1060extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev,