summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_modes.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-04-08 12:24:02 +0300
committerJani Nikula <jani.nikula@intel.com>2024-04-15 16:22:50 +0300
commit96a91515465491290497dd6c862323fd94dfd20d (patch)
tree91e9cdd8b6ebd803d75462887f235e58ab2db5f0 /drivers/gpu/drm/drm_modes.c
parentfad8e25192c0b01d436aae38df6e664ab78da688 (diff)
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_modes.c')
-rw-r--r--drivers/gpu/drm/drm_modes.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 408ee1b5e44d..2d8b0371619d 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1201,9 +1201,8 @@ int of_get_drm_display_mode(struct device_node *np,
if (bus_flags)
drm_bus_flags_from_videomode(&vm, bus_flags);
- pr_debug("%pOF: got %dx%d display mode\n",
- np, vm.hactive, vm.vactive);
- drm_mode_debug_printmodeline(dmode);
+ pr_debug("%pOF: got %dx%d display mode: " DRM_MODE_FMT "\n",
+ np, vm.hactive, vm.vactive, DRM_MODE_ARG(dmode));
return 0;
}
@@ -1251,7 +1250,7 @@ int of_get_drm_panel_display_mode(struct device_node *np,
dmode->width_mm = width_mm;
dmode->height_mm = height_mm;
- drm_mode_debug_printmodeline(dmode);
+ pr_debug(DRM_MODE_FMT "\n", DRM_MODE_ARG(dmode));
return 0;
}
@@ -1813,10 +1812,8 @@ void drm_mode_prune_invalid(struct drm_device *dev,
DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
}
if (verbose) {
- drm_mode_debug_printmodeline(mode);
- drm_dbg_kms(dev, "Not using %s mode: %s\n",
- mode->name,
- drm_get_mode_status_name(mode->status));
+ drm_dbg_kms(dev, "Rejected mode: " DRM_MODE_FMT " (%s)\n",
+ DRM_MODE_ARG(mode), drm_get_mode_status_name(mode->status));
}
drm_mode_destroy(dev, mode);
}