Hi Jani,

On 2026-09-25 at 13:47:39 +0300, Jani Nikula wrote:
> On Thu, 24 Sep 2026, Krzysztof Karas <[email protected]> wrote:
> > Add i915_* family of printer macros, following existing example
> > of gt_* and xe_* prints.
> 
> Frankly, I don't want *any* of this.
> 
> The drm_* macros are already a bunch of wrappers around dev_*
> macros. IMO this is just too much, just to avoid writing &i915->drm.
> 
> (And yes, I dislike what's been done in xe too.)
Then, we'll have to live with two different print families and
that is the end of that. I'll revert this series to its former
version (and include other comments that still apply too).

In any case, thanks for your input.

> 
> 
> BR,
> Jani.
> 
> >
> > Suggested-by: Andi Shyti <[email protected]>
> > Signed-off-by: Krzysztof Karas <[email protected]>
> > ---
> >  drivers/gpu/drm/i915/i915_printk.h | 53 ++++++++++++++++++++++++++++++
> >  1 file changed, 53 insertions(+)
> >  create mode 100644 drivers/gpu/drm/i915/i915_printk.h
> >
> > diff --git a/drivers/gpu/drm/i915/i915_printk.h 
> > b/drivers/gpu/drm/i915/i915_printk.h
> > new file mode 100644
> > index 000000000000..5bbbe604cae8
> > --- /dev/null
> > +++ b/drivers/gpu/drm/i915/i915_printk.h
> > @@ -0,0 +1,53 @@
> > +/* SPDX-License-Identifier: MIT */
> > +/*
> > + * Copyright © 2026 Intel Corporation
> > + */
> > +
> > +#ifndef _I915_PRINTK_H_
> > +#define _I915_PRINTK_H_
> > +
> > +#include <drm/drm_print.h>
> > +
> > +#define i915_printk(_i915, _level, _fmt, ...) \
> > +   drm_##_level(&(_i915)->drm, _fmt, ## __VA_ARGS__)
> > +
> > +#define i915_err(_i915, _fmt, ...) \
> > +   i915_printk((_i915), err, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_err_once(_i915, _fmt, ...) \
> > +   i915_printk((_i915), err_once, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_err_ratelimited(_i915, _fmt, ...) \
> > +   i915_printk((_i915), err_ratelimited, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_warn(_i915, _fmt, ...) \
> > +   i915_printk((_i915), warn, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_notice(_i915, _fmt, ...) \
> > +   i915_printk((_i915), notice, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_info(_i915, _fmt, ...) \
> > +   i915_printk((_i915), info, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_dbg(_i915, _fmt, ...) \
> > +   i915_printk((_i915), dbg, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_dbg_ratelimited(_i915, _fmt, ...) \
> > +   i915_printk((_i915), dbg_ratelimited, _fmt, ##__VA_ARGS__)
> > +
> > +#define i915_WARN_type(_i915, _type, _condition, _fmt, ...) \
> > +   drm_WARN##_type(&(_i915)->drm, _condition, _fmt, ## __VA_ARGS__)
> > +
> > +#define i915_WARN(_i915, _condition, _fmt, ...) \
> > +   i915_WARN_type((_i915), _condition, __I915_PRINTK_FMT((_i915), _fmt, ## 
> > __VA_ARGS__))
> > +
> > +#define i915_WARN_ONCE(_i915, _condition, _fmt, ...) \
> > +   i915_WARN_type((_i915), _ONCE, _condition, __I915_PRINTK_FMT((_i915), 
> > _fmt, ## __VA_ARGS__))
> > +
> > +#define i915_WARN_ON(_i915, _condition) \
> > +   i915_WARN((_i915), _condition, "%s(%s)", "WARN_ON", 
> > __stringify(_condition))
> > +
> > +#define i915_WARN_ON_ONCE(_i915, _condition) \
> > +   i915_WARN_ONCE((_i915), _condition, "%s(%s)", "WARN_ON_ONCE", 
> > __stringify(_condition))
> > +
> > +#endif
> 
> -- 
> Jani Nikula, Intel

-- 
Best Regards,
Krzysztof

Reply via email to