[PATCH] drm: Always show the probed connector status
Chris Wilson
chris at chris-wilson.co.uk
Thu Dec 30 05:37:41 PST 2010
Otherwise if the connector is left in an unknown status, we leave the
function without any trace leaving me quite confused as to where the
output went.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/drm_crtc_helper.c | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 8de333a..b5458fd 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -37,6 +37,20 @@
static bool drm_kms_helper_poll = true;
module_param_named(poll, drm_kms_helper_poll, bool, 0600);
+static const char *drm_status_to_string(int status)
+{
+ switch (status) {
+ case connector_status_disconnected:
+ return "disconnected";
+ case connector_status_connected:
+ return "connected";
+ case connector_status_unknown:
+ return "unknown";
+ default:
+ return "invalid";
+ }
+}
+
static void drm_mode_validate_flag(struct drm_connector *connector,
int flags)
{
@@ -107,9 +121,12 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
drm_kms_helper_poll_enable(dev);
}
+ DRM_DEBUG_KMS("[CONNECTOR:%d:%s], status=%s\n",
+ connector->base.id,
+ drm_get_connector_name(connector),
+ drm_status_to_string(connector->status));
+
if (connector->status == connector_status_disconnected) {
- DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
- connector->base.id, drm_get_connector_name(connector));
drm_mode_connector_update_edid_property(connector, NULL);
goto prune;
}
@@ -885,10 +902,13 @@ static void output_poll_execute(struct work_struct *work)
continue;
connector->status = connector->funcs->detect(connector, false);
- DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n",
+ DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s [%d] to %s [%d]\n",
connector->base.id,
drm_get_connector_name(connector),
- old_status, connector->status);
+ drm_status_to_string(old_status),
+ old_status,
+ drm_status_to_string(connector->status),
+ connector->status);
if (old_status != connector->status)
changed = true;
}
--
1.7.2.3
More information about the dri-devel
mailing list