Commit dc73ce5f authored by Jani Nikula's avatar Jani Nikula

drm/crtc: switch to drm device based logging

Prefer drm device based drm_dbg_kms() over DRM_DEBUG_KMS().
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/187a7e8e350569a78ebe02ff83ac3b933c8a5355.1712568037.git.jani.nikula@intel.comSigned-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 14b7897d
...@@ -716,10 +716,10 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -716,10 +716,10 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
crtc = drm_crtc_find(dev, file_priv, crtc_req->crtc_id); crtc = drm_crtc_find(dev, file_priv, crtc_req->crtc_id);
if (!crtc) { if (!crtc) {
DRM_DEBUG_KMS("Unknown CRTC ID %d\n", crtc_req->crtc_id); drm_dbg_kms(dev, "Unknown CRTC ID %d\n", crtc_req->crtc_id);
return -ENOENT; return -ENOENT;
} }
DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name); drm_dbg_kms(dev, "[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
plane = crtc->primary; plane = crtc->primary;
...@@ -742,7 +742,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -742,7 +742,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
old_fb = plane->fb; old_fb = plane->fb;
if (!old_fb) { if (!old_fb) {
DRM_DEBUG_KMS("CRTC doesn't have current FB\n"); drm_dbg_kms(dev, "CRTC doesn't have current FB\n");
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -753,7 +753,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -753,7 +753,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
} else { } else {
fb = drm_framebuffer_lookup(dev, file_priv, crtc_req->fb_id); fb = drm_framebuffer_lookup(dev, file_priv, crtc_req->fb_id);
if (!fb) { if (!fb) {
DRM_DEBUG_KMS("Unknown FB ID%d\n", drm_dbg_kms(dev, "Unknown FB ID%d\n",
crtc_req->fb_id); crtc_req->fb_id);
ret = -ENOENT; ret = -ENOENT;
goto out; goto out;
...@@ -767,7 +767,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -767,7 +767,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
} }
if (!file_priv->aspect_ratio_allowed && if (!file_priv->aspect_ratio_allowed &&
(crtc_req->mode.flags & DRM_MODE_FLAG_PIC_AR_MASK) != DRM_MODE_FLAG_PIC_AR_NONE) { (crtc_req->mode.flags & DRM_MODE_FLAG_PIC_AR_MASK) != DRM_MODE_FLAG_PIC_AR_NONE) {
DRM_DEBUG_KMS("Unexpected aspect-ratio flag bits\n"); drm_dbg_kms(dev, "Unexpected aspect-ratio flag bits\n");
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -775,7 +775,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -775,7 +775,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
ret = drm_mode_convert_umode(dev, mode, &crtc_req->mode); ret = drm_mode_convert_umode(dev, mode, &crtc_req->mode);
if (ret) { if (ret) {
DRM_DEBUG_KMS("Invalid mode (ret=%d, status=%s)\n", drm_dbg_kms(dev, "Invalid mode (ret=%d, status=%s)\n",
ret, drm_get_mode_status_name(mode->status)); ret, drm_get_mode_status_name(mode->status));
drm_mode_debug_printmodeline(mode); drm_mode_debug_printmodeline(mode);
goto out; goto out;
...@@ -793,9 +793,8 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -793,9 +793,8 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
fb->format->format, fb->format->format,
fb->modifier); fb->modifier);
if (ret) { if (ret) {
DRM_DEBUG_KMS("Invalid pixel format %p4cc, modifier 0x%llx\n", drm_dbg_kms(dev, "Invalid pixel format %p4cc, modifier 0x%llx\n",
&fb->format->format, &fb->format->format, fb->modifier);
fb->modifier);
goto out; goto out;
} }
} }
...@@ -808,13 +807,13 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -808,13 +807,13 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
} }
if (crtc_req->count_connectors == 0 && mode) { if (crtc_req->count_connectors == 0 && mode) {
DRM_DEBUG_KMS("Count connectors is 0 but mode set\n"); drm_dbg_kms(dev, "Count connectors is 0 but mode set\n");
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
if (crtc_req->count_connectors > 0 && (!mode || !fb)) { if (crtc_req->count_connectors > 0 && (!mode || !fb)) {
DRM_DEBUG_KMS("Count connectors is %d but no mode or fb set\n", drm_dbg_kms(dev, "Count connectors is %d but no mode or fb set\n",
crtc_req->count_connectors); crtc_req->count_connectors);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
...@@ -847,14 +846,13 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ...@@ -847,14 +846,13 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
connector = drm_connector_lookup(dev, file_priv, out_id); connector = drm_connector_lookup(dev, file_priv, out_id);
if (!connector) { if (!connector) {
DRM_DEBUG_KMS("Connector id %d unknown\n", drm_dbg_kms(dev, "Connector id %d unknown\n",
out_id); out_id);
ret = -ENOENT; ret = -ENOENT;
goto out; goto out;
} }
DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", drm_dbg_kms(dev, "[CONNECTOR:%d:%s]\n",
connector->base.id, connector->base.id, connector->name);
connector->name);
connector_set[i] = connector; connector_set[i] = connector;
num_connectors++; num_connectors++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment