summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2014-06-18 17:52:32 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-19 08:56:01 +0200
commit30f6570798f6c897df4f1f2c676d803728bfec27 (patch)
tree2ff3e99b8286b75b0cac0a2c07cee9da9c6634bf /include
parent34ea3d386347cd6de4c2fa2491dd85c9e753e7e4 (diff)
drm/debugfs: add a "force" file per connector
Add a file to debugfs for each connector to enable modification of the "force" connector attribute. This allows connectors to be enabled or disabled for testing and debugging purposes. v2: Add stricter value checking and clean up debugfs_entry if file creation fails in drm_debugfs_connector_add. (David Herrmann) Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drmP.h11
-rw-r--r--include/drm/drm_crtc.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 8af71a8e2c00..57ecc421b19c 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1419,6 +1419,8 @@ extern int drm_debugfs_create_files(const struct drm_info_list *files,
extern int drm_debugfs_remove_files(const struct drm_info_list *files,
int count, struct drm_minor *minor);
extern int drm_debugfs_cleanup(struct drm_minor *minor);
+extern int drm_debugfs_connector_add(struct drm_connector *connector);
+extern void drm_debugfs_connector_remove(struct drm_connector *connector);
#else
static inline int drm_debugfs_init(struct drm_minor *minor, int minor_id,
struct dentry *root)
@@ -1443,6 +1445,15 @@ static inline int drm_debugfs_cleanup(struct drm_minor *minor)
{
return 0;
}
+
+static inline int drm_debugfs_connector_add(struct drm_connector *connector)
+{
+ return 0;
+}
+static inline void drm_debugfs_connector_remove(struct drm_connector *connector)
+{
+}
+
#endif
/* Info file support */
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 5512c9968d77..d4b0a6a4ad9b 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -545,6 +545,8 @@ struct drm_connector {
int audio_latency[2];
int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */
unsigned bad_edid_counter;
+
+ struct dentry *debugfs_entry;
};
/**