summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-12-05 11:49:33 +0200
committerJani Nikula <jani.nikula@intel.com>2024-12-10 14:08:40 +0200
commit3050c1811387af53ed6c99ac2d602f4408d41f8d (patch)
tree3e451131f154268805a3492df32f246d05163dda /include/drm
parentb031ef5ea8b16525ba7ec47c0db36393b759615c (diff)
downloadlwn-3050c1811387af53ed6c99ac2d602f4408d41f8d.tar.gz
lwn-3050c1811387af53ed6c99ac2d602f4408d41f8d.zip
drm/print: add drm_print_hex_dump()
Add a helper to print a hex dump to a struct drm_printer. There's no fancy formatting stuff, just 16 space-separated bytes per line, with an optional prefix. Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/f650fe1ed3e3bb74760426fa7461c3b028d661fb.1733392101.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_print.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index b3906dc04388..f77fe1531cf8 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -199,6 +199,8 @@ void drm_puts(struct drm_printer *p, const char *str);
void drm_print_regset32(struct drm_printer *p, struct debugfs_regset32 *regset);
void drm_print_bits(struct drm_printer *p, unsigned long value,
const char * const bits[], unsigned int nbits);
+void drm_print_hex_dump(struct drm_printer *p, const char *prefix,
+ const u8 *buf, size_t len);
__printf(2, 0)
/**