diff options
author | Lyude Paul <lyude@redhat.com> | 2019-09-03 22:45:43 +0200 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2019-09-04 01:29:02 +0200 |
commit | 0de54fb2d02b1f1d604db57b12341c53f07cbaf4 (patch) | |
tree | 82691002045145fe5a52c1b5fd97176027677eea /drivers/gpu/drm/drm_print.c | |
parent | drm/dp_mst: Move test_calc_pbn_mode() into an actual selftest (diff) | |
download | linux-0de54fb2d02b1f1d604db57b12341c53f07cbaf4.tar.xz linux-0de54fb2d02b1f1d604db57b12341c53f07cbaf4.zip |
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/gpu/drm/drm_print.c')
-rw-r--r-- | drivers/gpu/drm/drm_print.c | 6 |
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 |