[PATCH 1/2] drm: Introduce DRM_DEV_* log messages
Chris Wilson
chris at chris-wilson.co.uk
Fri Aug 12 17:13:44 UTC 2016
On Fri, Aug 12, 2016 at 01:00:53PM -0400, Sean Paul wrote:
> This patch consolodates all the various log functions/macros into
> one uber function, drm_log. It also introduces some new DRM_DEV_*
> variants that print the device name to delineate multiple devices
> of the same type.
> +void drm_log(const struct device *dev, const char *level, unsigned int category,
> + const char *function_name, const char *prefix,
> + const char *format, ...)
> {
> + if (dev)
> + printk("%s%s [" DRM_NAME ":%s]%s %pV", level,
> + dev_name(dev), function_name, prefix, &vaf);
> + else
> + printk("%s[" DRM_NAME ":%s]%s %pV", level, function_name,
> + prefix, &vaf);
My hope was that we would migrate towards dev_printk so that our log
messages would have better conformity, especially between our messages
and those printed by subsystems on our behalf (using our struct device).
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the dri-devel
mailing list