diff options
author | Lespiau, Damien <damien.lespiau@intel.com> | 2013-05-10 08:36:42 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-05-12 22:12:57 -0400 |
commit | ed7951dc13aad4a14695ec8122e9f0e2ef25d39e (patch) | |
tree | 13241f3bac22b1a7151d6be1c780f8ca23f930e4 | |
parent | b9434d0f162c351e02e0e8f66ca6b75a67595537 (diff) |
drm: Make the HPD status updates debug logs more readable
Instead of just printing "status updated from 1 to 2", make those enum
numbers immediately readable.
v2: Also patch output_poll_execute() (Daniel Vetter)
v3: Use drm_get_connector_status_name (Ville Syrjälä)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (for v1)
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index d7c449f0b110..e7e92429d10f 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -250,6 +250,7 @@ char *drm_get_connector_status_name(enum drm_connector_status status) | |||
250 | else | 250 | else |
251 | return "unknown"; | 251 | return "unknown"; |
252 | } | 252 | } |
253 | EXPORT_SYMBOL(drm_get_connector_status_name); | ||
253 | 254 | ||
254 | /** | 255 | /** |
255 | * drm_mode_object_get - allocate a new modeset identifier | 256 | * drm_mode_object_get - allocate a new modeset identifier |
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 62f45ad56dc7..9085db634092 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
@@ -1007,10 +1007,11 @@ static void output_poll_execute(struct work_struct *work) | |||
1007 | continue; | 1007 | continue; |
1008 | 1008 | ||
1009 | connector->status = connector->funcs->detect(connector, false); | 1009 | connector->status = connector->funcs->detect(connector, false); |
1010 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n", | 1010 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n", |
1011 | connector->base.id, | 1011 | connector->base.id, |
1012 | drm_get_connector_name(connector), | 1012 | drm_get_connector_name(connector), |
1013 | old_status, connector->status); | 1013 | drm_get_connector_status_name(old_status), |
1014 | drm_get_connector_status_name(connector->status)); | ||
1014 | if (old_status != connector->status) | 1015 | if (old_status != connector->status) |
1015 | changed = true; | 1016 | changed = true; |
1016 | } | 1017 | } |
@@ -1085,10 +1086,11 @@ void drm_helper_hpd_irq_event(struct drm_device *dev) | |||
1085 | old_status = connector->status; | 1086 | old_status = connector->status; |
1086 | 1087 | ||
1087 | connector->status = connector->funcs->detect(connector, false); | 1088 | connector->status = connector->funcs->detect(connector, false); |
1088 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n", | 1089 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n", |
1089 | connector->base.id, | 1090 | connector->base.id, |
1090 | drm_get_connector_name(connector), | 1091 | drm_get_connector_name(connector), |
1091 | old_status, connector->status); | 1092 | drm_get_connector_status_name(old_status), |
1093 | drm_get_connector_status_name(connector->status)); | ||
1092 | if (old_status != connector->status) | 1094 | if (old_status != connector->status) |
1093 | changed = true; | 1095 | changed = true; |
1094 | } | 1096 | } |