[Freedreno] [PATCH 03/13] drm: Add drm_puts() to complement drm_printf()

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 24 18:10:55 UTC 2018


Hi Jordan,

I might be a bit late for the party, so consider the following jfyi.

On 24 July 2018 at 17:33, Jordan Crouse <jcrouse at codeaurora.org> wrote:

> +void drm_puts(struct drm_printer *p, const char *str)
One could easily use the compiler to detect if drm_printf or drm_puts
should be used. See the trace_printk define in include/linux/kernel.h.

> +{
> +       if (p->puts)
> +               p->puts(p, str);
> +       else
> +               drm_printf(p, "%s", str);

>From a quick look from the existing three printers (seq_file, info and
debug) only the first one is updated with this series.
I would imagine that updating the other two and dropping the
drm_printf() fallback is a good move.

Otherwise one could easily assume that they have a fast path when they do not.

HTH
Emil


More information about the Freedreno mailing list