Skip to content

Commit d82bb73

Browse files
committed
drm/i915/display: use drm_print_hex_dump() for buffer mismatch dumps
Use the drm_printer based printer to get the device specific printing of the hex dump, and avoid the manual loglevel hacking. Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/a536050b5f9dc2d7de32d29766c98477f58d746c.1733392101.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 15695f7 commit d82bb73

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5268,26 +5268,13 @@ pipe_config_buffer_mismatch(struct drm_printer *p, bool fastset,
52685268
const char *name,
52695269
const u8 *a, const u8 *b, size_t len)
52705270
{
5271-
const char *loglevel;
5272-
5273-
if (fastset) {
5274-
if (!drm_debug_enabled(DRM_UT_KMS))
5275-
return;
5276-
5277-
loglevel = KERN_DEBUG;
5278-
} else {
5279-
loglevel = KERN_ERR;
5280-
}
5281-
52825271
pipe_config_mismatch(p, fastset, crtc, name, "buffer");
52835272

52845273
/* only dump up to the last difference */
52855274
len = memcmp_diff_len(a, b, len);
52865275

5287-
print_hex_dump(loglevel, "expected: ", DUMP_PREFIX_NONE,
5288-
16, 0, a, len, false);
5289-
print_hex_dump(loglevel, "found: ", DUMP_PREFIX_NONE,
5290-
16, 0, b, len, false);
5276+
drm_print_hex_dump(p, "expected: ", a, len);
5277+
drm_print_hex_dump(p, "found: ", b, len);
52915278
}
52925279

52935280
static void

0 commit comments

Comments
 (0)