dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Sean Paul <sean@poorly.run>
Cc: linux-doc@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Sean Paul <seanpaul@chromium.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH v5 13/13] drm/print: Add tracefs support to the drm logging helpers
Date: Wed, 10 Jun 2020 17:09:40 +0300	[thread overview]
Message-ID: <20200610170940.4716a2ea@eldfell.localdomain> (raw)
In-Reply-To: <CAMavQKJ6LGK=bPcECdrsEv9LGsiE9EXokTKq36jwxY0ei2-amw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4292 bytes --]

On Wed, 10 Jun 2020 09:29:37 -0400
Sean Paul <sean@poorly.run> wrote:

> On Wed, Jun 10, 2020 at 3:57 AM Pekka Paalanen <ppaalanen@gmail.com> wrote:
> >
> > On Mon,  8 Jun 2020 17:05:03 -0400
> > Sean Paul <sean@poorly.run> wrote:
> >  
> > > From: Sean Paul <seanpaul@chromium.org>
> > >
> > > This patch adds a new module parameter called drm.trace which accepts
> > > the same mask as drm.debug. When a debug category is enabled, log
> > > messages will be put in a new tracefs instance called drm for
> > > consumption.
> > >
> > > Using the new tracefs instance will allow distros to enable drm logging
> > > in production without impacting performance or spamming the system
> > > logs.
> > >
> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > > Cc: David Airlie <airlied@gmail.com>
> > > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > > Cc: Pekka Paalanen <ppaalanen@gmail.com>
> > > Cc: Rob Clark <robdclark@gmail.com>
> > > Cc: Steven Rostedt <rostedt@goodmis.org>
> > > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Steven Rostedt <rostedt@goodmis.org>
> > > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> > > Link: https://patchwork.freedesktop.org/patch/msgid/20191010204823.195540-1-sean@poorly.run #v1
> > > Link: https://lists.freedesktop.org/archives/dri-devel/2019-November/243230.html #v2
> > > Link: https://patchwork.freedesktop.org/patch/msgid/20191212203301.142437-1-sean@poorly.run #v3
> > > Link: https://patchwork.freedesktop.org/patch/msgid/20200114172155.215463-1-sean@poorly.run #v4
> > >
> > > Changes in v5:
> > > -Re-write to use trace_array and the tracefs instance support
> > > ---
> > >  Documentation/gpu/drm-uapi.rst |   6 +
> > >  drivers/gpu/drm/drm_drv.c      |   3 +
> > >  drivers/gpu/drm/drm_print.c    | 209 ++++++++++++++++++++++++++++-----
> > >  include/drm/drm_print.h        |  63 ++++++++--
> > >  4 files changed, 241 insertions(+), 40 deletions(-)
> > >

...

> > >  #include <drm/drm.h>
> > >  #include <drm/drm_drv.h>
> > > @@ -43,17 +44,34 @@
> > >  unsigned int __drm_debug_syslog;
> > >  EXPORT_SYMBOL(__drm_debug_syslog);
> > >
> > > -MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n"
> > > -"\t\tBit 0 (0x01)  will enable CORE messages (drm core code)\n"
> > > -"\t\tBit 1 (0x02)  will enable DRIVER messages (drm controller code)\n"
> > > -"\t\tBit 2 (0x04)  will enable KMS messages (modesetting code)\n"
> > > -"\t\tBit 3 (0x08)  will enable PRIME messages (prime code)\n"
> > > -"\t\tBit 4 (0x10)  will enable ATOMIC messages (atomic code)\n"
> > > -"\t\tBit 5 (0x20)  will enable VBL messages (vblank code)\n"
> > > -"\t\tBit 7 (0x80)  will enable LEASE messages (leasing code)\n"
> > > -"\t\tBit 8 (0x100) will enable DP messages (displayport code)");
> > > +/*
> > > + * __drm_debug_trace: Enable debug output in drm tracing instance.
> > > + * Bitmask of DRM_UT_x. See include/drm/drm_print.h for details.
> > > + */
> > > +unsigned int __drm_debug_trace;
> > > +EXPORT_SYMBOL(__drm_debug_trace);  
> >
> > Hi!  
> 
> Hi Pekka,
> Thanks again for the feedback, I'm happy that we seem to be converging!
> 
> >
> > Might distributions perhaps want to set a default value for this via
> > Kconfig? Or could setting it via sysfs happen early enough to diagnose
> > e.g. Plymouth problems?
> >
> > Or maybe there is nothing to see from early boot?
> >
> > The general usefulness of this feature depends on whether people
> > actually run with it enabled.  
> 
> I had assumed that the cmdline argument would be sufficient for
> distros, is Kconfig preferable here? The module parameter has the
> advantage of being runtime configurable and is more in line with
> drm.debug. We can do either in CrOS, so I'm happy to go with crowd
> consensus.

Hi,

I don't know. I did mean only *default* value for the module parameter
via Kconfig. Right now your default value is implicit 0.

But that's just me thinking that making kernel command lines even
longer would be somehow bad. Maybe it's fine?


Thanks,
pq

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-06-10 14:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08 21:04 [PATCH v5 00/13] drm/trace: Mirror DRM debug logs to tracefs Sean Paul
2020-06-08 21:04 ` [PATCH v5 01/13] drm/mipi_dbi: Convert pr_debug calls to DRM_DEBUG_DRIVER Sean Paul
2020-06-09 18:28   ` Sam Ravnborg
2020-06-08 21:04 ` [PATCH v5 02/13] drm/sil164: Convert dev_printk to drm_dev_dbg Sean Paul
2020-06-08 21:04 ` [PATCH v5 03/13] drm/i915/utils: Replace dev_printk with drm helpers Sean Paul
2020-06-08 21:04 ` [PATCH v5 04/13] drm/msm/dpu: Replace definitions for dpu debug macros Sean Paul
2020-06-08 21:04 ` [PATCH v5 05/13] drm/print: rename drm_debug* to be more syslog-centric Sean Paul
2020-06-08 21:04 ` [PATCH v5 06/13] drm/amd: Gate i2c transaction logs on drm_debug_syslog Sean Paul
2020-06-09  7:10   ` Christian König
2020-06-08 21:04 ` [PATCH v5 07/13] drm/etnaviv: Change buffer dump checks to target syslog Sean Paul
2020-06-08 21:04 ` [PATCH v5 08/13] drm/nouveau: Change debug checks to specifically " Sean Paul
2020-06-08 21:04 ` [PATCH v5 09/13] drm/i915: Change infoframe debug checks to specify syslog Sean Paul
2020-06-08 21:05 ` [PATCH v5 10/13] drm/print: Add drm_debug_category_printer Sean Paul
2020-06-08 21:05 ` [PATCH v5 11/13] drm/mst: Convert debug printers to debug category printers Sean Paul
2020-06-08 21:05 ` [PATCH v5 12/13] drm/i915: Use debug category printer for welcome message Sean Paul
2020-06-08 21:05 ` [PATCH v5 13/13] drm/print: Add tracefs support to the drm logging helpers Sean Paul
2020-06-08 23:47   ` kernel test robot
2020-06-09  1:45   ` kernel test robot
2020-06-09 15:49     ` [PATCH v6 " Sean Paul
2020-06-10 15:01       ` Steven Rostedt
2020-06-10 15:29         ` Sean Paul
2020-06-09  1:45   ` [RFC PATCH] drm/print: trace_arr can be static kernel test robot
2020-06-10  7:57   ` [PATCH v5 13/13] drm/print: Add tracefs support to the drm logging helpers Pekka Paalanen
2020-06-10 13:29     ` Sean Paul
2020-06-10 14:09       ` Pekka Paalanen [this message]
2020-06-29 16:42 ` [PATCH v5 00/13] drm/trace: Mirror DRM debug logs to tracefs Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200610170940.4716a2ea@eldfell.localdomain \
    --to=ppaalanen@gmail.com \
    --cc=airlied@linux.ie \
    --cc=chris@chris-wilson.co.uk \
    --cc=corbet@lwn.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sean@poorly.run \
    --cc=seanpaul@chromium.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox