diff options
author | Jerome Glisse <jglisse@redhat.com> | 2010-07-15 15:43:25 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-07-15 21:25:02 -0400 |
commit | 9440106b460ddfb7c0ff98beb6a6741f1f67b92b (patch) | |
tree | f5d203d28ae2cf157ce9a0d268146b37672ccf4f /drivers/gpu/drm/drm_crtc.c | |
parent | 86a1b9d1f175e9e9d022c7674d6ba1ede48ee15f (diff) |
drm: unify crtc,connector,encoder,fb debug printing
Unify debug printing so it easier to track what's happening
while debugging.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 57cea01c4ffb..b5802cf6664e 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -1126,7 +1126,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data, | |||
1126 | if (file_priv->master->minor->type == DRM_MINOR_CONTROL) { | 1126 | if (file_priv->master->minor->type == DRM_MINOR_CONTROL) { |
1127 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, | 1127 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, |
1128 | head) { | 1128 | head) { |
1129 | DRM_DEBUG_KMS("CRTC ID is %d\n", crtc->base.id); | 1129 | DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id); |
1130 | if (put_user(crtc->base.id, crtc_id + copied)) { | 1130 | if (put_user(crtc->base.id, crtc_id + copied)) { |
1131 | ret = -EFAULT; | 1131 | ret = -EFAULT; |
1132 | goto out; | 1132 | goto out; |
@@ -1154,8 +1154,8 @@ int drm_mode_getresources(struct drm_device *dev, void *data, | |||
1154 | list_for_each_entry(encoder, | 1154 | list_for_each_entry(encoder, |
1155 | &dev->mode_config.encoder_list, | 1155 | &dev->mode_config.encoder_list, |
1156 | head) { | 1156 | head) { |
1157 | DRM_DEBUG_KMS("ENCODER ID is %d\n", | 1157 | DRM_DEBUG_KMS("[ENCODER:%d:%s]\n", encoder->base.id, |
1158 | encoder->base.id); | 1158 | drm_get_encoder_name(encoder)); |
1159 | if (put_user(encoder->base.id, encoder_id + | 1159 | if (put_user(encoder->base.id, encoder_id + |
1160 | copied)) { | 1160 | copied)) { |
1161 | ret = -EFAULT; | 1161 | ret = -EFAULT; |
@@ -1185,8 +1185,9 @@ int drm_mode_getresources(struct drm_device *dev, void *data, | |||
1185 | list_for_each_entry(connector, | 1185 | list_for_each_entry(connector, |
1186 | &dev->mode_config.connector_list, | 1186 | &dev->mode_config.connector_list, |
1187 | head) { | 1187 | head) { |
1188 | DRM_DEBUG_KMS("CONNECTOR ID is %d\n", | 1188 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", |
1189 | connector->base.id); | 1189 | connector->base.id, |
1190 | drm_get_connector_name(connector)); | ||
1190 | if (put_user(connector->base.id, | 1191 | if (put_user(connector->base.id, |
1191 | connector_id + copied)) { | 1192 | connector_id + copied)) { |
1192 | ret = -EFAULT; | 1193 | ret = -EFAULT; |
@@ -1209,7 +1210,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data, | |||
1209 | } | 1210 | } |
1210 | card_res->count_connectors = connector_count; | 1211 | card_res->count_connectors = connector_count; |
1211 | 1212 | ||
1212 | DRM_DEBUG_KMS("Counted %d %d %d\n", card_res->count_crtcs, | 1213 | DRM_DEBUG_KMS("CRTC[%d] CONNECTORS[%d] ENCODERS[%d]\n", card_res->count_crtcs, |
1213 | card_res->count_connectors, card_res->count_encoders); | 1214 | card_res->count_connectors, card_res->count_encoders); |
1214 | 1215 | ||
1215 | out: | 1216 | out: |
@@ -1312,7 +1313,7 @@ int drm_mode_getconnector(struct drm_device *dev, void *data, | |||
1312 | 1313 | ||
1313 | memset(&u_mode, 0, sizeof(struct drm_mode_modeinfo)); | 1314 | memset(&u_mode, 0, sizeof(struct drm_mode_modeinfo)); |
1314 | 1315 | ||
1315 | DRM_DEBUG_KMS("connector id %d:\n", out_resp->connector_id); | 1316 | DRM_DEBUG_KMS("[CONNECTOR:%d:?]\n", out_resp->connector_id); |
1316 | 1317 | ||
1317 | mutex_lock(&dev->mode_config.mutex); | 1318 | mutex_lock(&dev->mode_config.mutex); |
1318 | 1319 | ||
@@ -1493,6 +1494,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, | |||
1493 | goto out; | 1494 | goto out; |
1494 | } | 1495 | } |
1495 | crtc = obj_to_crtc(obj); | 1496 | crtc = obj_to_crtc(obj); |
1497 | DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id); | ||
1496 | 1498 | ||
1497 | if (crtc_req->mode_valid) { | 1499 | if (crtc_req->mode_valid) { |
1498 | /* If we have a mode we need a framebuffer. */ | 1500 | /* If we have a mode we need a framebuffer. */ |
@@ -1569,6 +1571,9 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, | |||
1569 | goto out; | 1571 | goto out; |
1570 | } | 1572 | } |
1571 | connector = obj_to_connector(obj); | 1573 | connector = obj_to_connector(obj); |
1574 | DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", | ||
1575 | connector->base.id, | ||
1576 | drm_get_connector_name(connector)); | ||
1572 | 1577 | ||
1573 | connector_set[i] = connector; | 1578 | connector_set[i] = connector; |
1574 | } | 1579 | } |
@@ -1684,6 +1689,7 @@ int drm_mode_addfb(struct drm_device *dev, | |||
1684 | 1689 | ||
1685 | r->fb_id = fb->base.id; | 1690 | r->fb_id = fb->base.id; |
1686 | list_add(&fb->filp_head, &file_priv->fbs); | 1691 | list_add(&fb->filp_head, &file_priv->fbs); |
1692 | DRM_DEBUG_KMS("[FB:%d]\n", fb->base.id); | ||
1687 | 1693 | ||
1688 | out: | 1694 | out: |
1689 | mutex_unlock(&dev->mode_config.mutex); | 1695 | mutex_unlock(&dev->mode_config.mutex); |