[PATCH 3/6] drm/modes: switch drm_mode_prune_invalid() to use struct drm_printer
Jani Nikula
jani.nikula at intel.com
Thu Mar 7 20:39:35 UTC 2024
Use device based debug logging for the mode via drm_printer.
This changes the output from the format:
[drm:drm_mode_debug_printmodeline] Modeline "6144x3456": 60 1378800 6144 6192 6224 6464 3456 3459 3464 3555 0x48 0x9
[drm:drm_mode_prune_invalid] Not using 6144x3456 mode: CLOCK_HIGH
to format:
i915 0000:00:02.0: [drm] Rejected mode: "6144x3456": 60 1378800 6144 6192 6224 6464 3456 3459 3464 3555 0x48 0x9
i915 0000:00:02.0: [drm] Rejected mode: "6144x3456": CLOCK_HIGH
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/drm_modes.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 711750ab57c7..0fff5a8d4d81 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1825,10 +1825,13 @@ 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_DEBUG_KMS("Not using %s mode: %s\n",
- mode->name,
- drm_get_mode_status_name(mode->status));
+ struct drm_printer p;
+
+ p = drm_dbg_printer(dev, DRM_UT_KMS, "Rejected mode:");
+
+ drm_mode_print(&p, mode);
+ drm_printf(&p, "\"%s\": %s\n", mode->name,
+ drm_get_mode_status_name(mode->status));
}
drm_mode_destroy(dev, mode);
}
--
2.39.2
More information about the Intel-gfx
mailing list