diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-05-17 18:34:05 +0200 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2024-06-06 14:46:15 -0400 |
commit | c2ef66e9ad882ab4b055a86657c20c61d203f003 (patch) | |
tree | 341b2b13242c4aa6ff8de808a86b6d5cb839558d /include/drm/drm_print.h | |
parent | 178c0a33c421d9716e734645a5d0da271bf4695f (diff) | |
download | lwn-c2ef66e9ad882ab4b055a86657c20c61d203f003.tar.gz lwn-c2ef66e9ad882ab4b055a86657c20c61d203f003.zip |
drm/print: Improve drm_dbg_printer
With recent introduction of a generic drm dev printk function, we
can now store and use location where drm_dbg_printer was invoked
and output it's symbolic name like we do for all drm debug prints.
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517163406.2348-3-michal.wajdeczko@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'include/drm/drm_print.h')
-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 679a2086fbea..5d9dff5149c9 100644 --- a/include/drm/drm_print.h +++ b/include/drm/drm_print.h @@ -175,6 +175,7 @@ struct drm_printer { void (*printfn)(struct drm_printer *p, struct va_format *vaf); void (*puts)(struct drm_printer *p, const char *str); void *arg; + const void *origin; const char *prefix; enum drm_debug_category category; }; @@ -332,6 +333,7 @@ static inline struct drm_printer drm_dbg_printer(struct drm_device *drm, struct drm_printer p = { .printfn = __drm_printfn_dbg, .arg = drm, + .origin = (const void *)_THIS_IP_, /* it's fine as we will be inlined */ .prefix = prefix, .category = category, }; |