diff options
author | Eric Anholt <eric@anholt.net> | 2019-02-20 13:03:37 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2019-04-01 10:44:34 -0700 |
commit | 5f513cc89edfbb395b71ebf09d971666e23758db (patch) | |
tree | 7f786d84328ac4bd1dd11c30462d813c6c3a0661 /include/drm | |
parent | 3f0b646e1a54248bcd5304f1de71091dad4e7b1e (diff) | |
download | linux-5f513cc89edfbb395b71ebf09d971666e23758db.tar.bz2 |
drm: Add a helper function for printing a debugfs_regset32.
The debugfs_regset32 is nice to use for reducing boilerplate in
dumping a bunch of regs in debugfs, but we also want to be able to
print to dmesg them at runtime for driver debugging. drm_printer lets
us format debugfs and the printk the same way.
v2: Add some kerneldoc for the function (requested by danvet)
Signed-off-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190220210343.28157-1-eric@anholt.net
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> (v1)
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_print.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index afbc3beef089..3a4247319e63 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -30,6 +30,7 @@ #include <linux/printk.h> #include <linux/seq_file.h> #include <linux/device.h> +#include <linux/debugfs.h> /** * DOC: print @@ -84,6 +85,7 @@ void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf); __printf(2, 3) void drm_printf(struct drm_printer *p, const char *f, ...); void drm_puts(struct drm_printer *p, const char *str); +void drm_print_regset32(struct drm_printer *p, struct debugfs_regset32 *regset); __printf(2, 0) /** |