[PATCH 3/6] drm/modes: switch drm_mode_prune_invalid() to use struct drm_printer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux