aboutsummaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorJordan Crouse2018-07-24 10:33:23 -0600
committerRob Clark2018-07-30 08:49:41 -0400
commit5dc634bdbfd6dd9bdf98bce0d6f64878e1d47b1f (patch)
treefe3b6b07dcc1c70ad53b27c10f53e0ea9d52732b /include/drm
parent4538d7324507fed892a18b79ad72c8501b6e7027 (diff)
drm: Add puts callback for the coredump printer
Add a puts function for the coredump printer to bypass printf() for constant strings for a speed boost. Reorganize the coredump printf callback to share as much code as possible. v2: Try to reuse code between print and puts as suggested by Chris Wilson Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.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 b1432969b627..f3e6eed3e79c 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -75,6 +75,7 @@ struct drm_printer {
};
void __drm_printfn_coredump(struct drm_printer *p, struct va_format *vaf);
+void __drm_puts_coredump(struct drm_printer *p, const char *str);
void __drm_printfn_seq_file(struct drm_printer *p, struct va_format *vaf);
void __drm_puts_seq_file(struct drm_printer *p, const char *str);
void __drm_printfn_info(struct drm_printer *p, struct va_format *vaf);
@@ -163,6 +164,7 @@ drm_coredump_printer(struct drm_print_iterator *iter)
{
struct drm_printer p = {
.printfn = __drm_printfn_coredump,
+ .puts = __drm_puts_coredump,
.arg = iter,
};