summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2019-09-03 23:45:43 +0300
committerLyude Paul <lyude@redhat.com>2019-09-04 02:29:02 +0300
commit0de54fb2d02b1f1d604db57b12341c53f07cbaf4 (patch)
tree82691002045145fe5a52c1b5fd97176027677eea /drivers
parent7cbce45d6243225914b5c967b4ee927a2327842a (diff)
downloadlinux-0de54fb2d02b1f1d604db57b12341c53f07cbaf4.tar.xz
drm/print: Add drm_err_printer()
A simple convienence function that returns a drm_printer which prints using pr_err() Changes since v1: * Make __drm_printfn_err() more consistent with DRM_ERROR() - danvet Cc: Juston Li <juston.li@intel.com> Cc: Imre Deak <imre.deak@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Harry Wentland <hwentlan@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190903204645.25487-6-lyude@redhat.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_print.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index a17c8a14dba4..ad302d71eeee 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -147,6 +147,12 @@ void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf)
}
EXPORT_SYMBOL(__drm_printfn_debug);
+void __drm_printfn_err(struct drm_printer *p, struct va_format *vaf)
+{
+ pr_err("*ERROR* %s %pV", p->prefix, vaf);
+}
+EXPORT_SYMBOL(__drm_printfn_err);
+
/**
* drm_puts - print a const string to a &drm_printer stream
* @p: the &drm printer