diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-04-08 12:24:02 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-04-15 16:22:50 +0300 |
commit | 96a91515465491290497dd6c862323fd94dfd20d (patch) | |
tree | 91e9cdd8b6ebd803d75462887f235e58ab2db5f0 /drivers/gpu/drm/drm_crtc.c | |
parent | fad8e25192c0b01d436aae38df6e664ab78da688 (diff) | |
download | lwn-96a91515465491290497dd6c862323fd94dfd20d.tar.gz lwn-96a91515465491290497dd6c862323fd94dfd20d.zip |
drm: prefer DRM_MODE_FMT/ARG over drm_mode_debug_printmodeline()
We have DRM_MODE_FMT and DRM_MODE_ARG() macros to allow unified debug
printing of modes in any printk-formatted logging. Prefer them over
drm_mode_debug_printmodeline().
This allows drm device specific logging of modes, in the right drm debug
category, and inline with the rest of the logging instead of split to
multiple lines.
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/6df18588dfa17c5d0a1501f5af9ff21f25a1981b.1712568037.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index b0a0e27e83eb..483969b84a30 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -775,9 +775,9 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data, ret = drm_mode_convert_umode(dev, mode, &crtc_req->mode); if (ret) { - drm_dbg_kms(dev, "Invalid mode (ret=%d, status=%s)\n", - ret, drm_get_mode_status_name(mode->status)); - drm_mode_debug_printmodeline(mode); + drm_dbg_kms(dev, "Invalid mode (%s, %pe): " DRM_MODE_FMT "\n", + drm_get_mode_status_name(mode->status), + ERR_PTR(ret), DRM_MODE_ARG(mode)); goto out; } |