All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Jani Nikula <jani.nikula@intel.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	David Airlie <airlied@linux.ie>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sean Paul <seanpaul@chromium.org>,
	Thierry Reding <treding@nvidia.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v1 02/11] drm: drop uapi dependency from drm_print.h
Date: Fri, 2 Aug 2019 17:28:55 +0200	[thread overview]
Message-ID: <20190802152855.GA5626@ravnborg.org> (raw)
In-Reply-To: <87o917lluk.fsf@intel.com>

Hi Jani.

> >> I mean is it useful to have this extra printing subsystem in DRM while 
> >> the standard Linux one actually does a better job?
> > The added functionality of drm_xxx_err would be to keep the current
> > drm.debug=0x1f filtering on the command-line.
> > I do not think we can do this with the standard logging.
> 
> Correct. I'd love the benefits of dynamic debug, but there's no support
> for the kind of message categories that we do with drm.debug.
> 
> I've contemplated switching i915 over to using the variants where you
> pass the device, but I really really don't like the idea of:
> 
> - 	DRM_DEBUG_KMS("hello\n");
> + 	DRM_DEV_DEBUG_KMS(i915->drm.dev, "hello\n");
> 
> Where i915 is our private wrapper for drm_device. I think it's just too
> much ugly uppercase boilerplate, and a large portion of the debugs would
> have to span at least an extra line after that.
> 
> I'd also very much prefer passing just struct *drm_device instead of
> struct *device. In that, I think the needs of the few have prevailed
> over the needs of the many. I'd definitely prefer drm_err(const struct
> drm_device *drm, ...) and friends over the current ones.

This is from my notes:

"
drm_err(const struct drm_device *drm, ...)
drm_info(const struct drm_device *drm, ...)

drm_kms_err(const struct drm_device *drm, ...)
drm_kms_info(const struct drm_device *drm, ...))

etc.

Then we could fish out relevant info from the drm device and present
this nicely.

For the cases where no drm_device is available the fallback is:
drm_dev_err(const struct drm_device *drm, ...)
drm_dev_info(const struct drm_device *drm, ...))

We could modify the existing UPPERCASE macros to be placeholders for
the more reader friendly lower cases variants.
"

So we seems to be aligned here.
In other words - if you throw time after this then try to add
the new logging variants to drm_print.h for the benefit of all.
The we can maybe later do some mass conversion if we want to get rid
of some of the older logging systems.

I have not yet found time/energy to throw after this myself.

	Sam
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Jani Nikula <jani.nikula@intel.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	Maxime Ripard <maxime.ripard@bootlin.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	David Airlie <airlied@linux.ie>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sean Paul <seanpaul@chromium.org>,
	Thierry Reding <treding@nvidia.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [Intel-gfx] [PATCH v1 02/11] drm: drop uapi dependency from drm_print.h
Date: Fri, 2 Aug 2019 17:28:55 +0200	[thread overview]
Message-ID: <20190802152855.GA5626@ravnborg.org> (raw)
In-Reply-To: <87o917lluk.fsf@intel.com>

Hi Jani.

> >> I mean is it useful to have this extra printing subsystem in DRM while 
> >> the standard Linux one actually does a better job?
> > The added functionality of drm_xxx_err would be to keep the current
> > drm.debug=0x1f filtering on the command-line.
> > I do not think we can do this with the standard logging.
> 
> Correct. I'd love the benefits of dynamic debug, but there's no support
> for the kind of message categories that we do with drm.debug.
> 
> I've contemplated switching i915 over to using the variants where you
> pass the device, but I really really don't like the idea of:
> 
> - 	DRM_DEBUG_KMS("hello\n");
> + 	DRM_DEV_DEBUG_KMS(i915->drm.dev, "hello\n");
> 
> Where i915 is our private wrapper for drm_device. I think it's just too
> much ugly uppercase boilerplate, and a large portion of the debugs would
> have to span at least an extra line after that.
> 
> I'd also very much prefer passing just struct *drm_device instead of
> struct *device. In that, I think the needs of the few have prevailed
> over the needs of the many. I'd definitely prefer drm_err(const struct
> drm_device *drm, ...) and friends over the current ones.

This is from my notes:

"
drm_err(const struct drm_device *drm, ...)
drm_info(const struct drm_device *drm, ...)

drm_kms_err(const struct drm_device *drm, ...)
drm_kms_info(const struct drm_device *drm, ...))

etc.

Then we could fish out relevant info from the drm device and present
this nicely.

For the cases where no drm_device is available the fallback is:
drm_dev_err(const struct drm_device *drm, ...)
drm_dev_info(const struct drm_device *drm, ...))

We could modify the existing UPPERCASE macros to be placeholders for
the more reader friendly lower cases variants.
"

So we seems to be aligned here.
In other words - if you throw time after this then try to add
the new logging variants to drm_print.h for the benefit of all.
The we can maybe later do some mass conversion if we want to get rid
of some of the older logging systems.

I have not yet found time/energy to throw after this myself.

	Sam

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-08-02 15:28 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18 16:14 [PATCH v1 0/11] drm: header maintenance Sam Ravnborg
2019-07-18 16:14 ` Sam Ravnborg
2019-07-18 16:14 ` [PATCH v1 01/11] drm/panel: make drm_panel.h self-contained Sam Ravnborg
2019-07-18 16:14   ` Sam Ravnborg
2019-07-18 17:36   ` Sean Paul
2019-07-18 17:36     ` Sean Paul
2019-07-18 16:14 ` [PATCH v1 02/11] drm: drop uapi dependency from drm_print.h Sam Ravnborg
2019-07-18 16:14   ` Sam Ravnborg
2019-07-18 16:46   ` Chris Wilson
2019-07-18 16:46     ` Chris Wilson
2019-07-19  6:54     ` Koenig, Christian
2019-07-19  6:54       ` Koenig, Christian
2019-07-29 12:45       ` Jani Nikula
2019-07-29 12:45         ` Jani Nikula
2019-07-29 14:35         ` Sam Ravnborg
2019-07-29 14:35           ` Sam Ravnborg
2019-07-29 15:28           ` Koenig, Christian
2019-07-29 15:28             ` Koenig, Christian
2019-07-29 17:50             ` Sam Ravnborg
2019-07-29 17:50               ` Sam Ravnborg
2019-08-02 13:48               ` Jani Nikula
2019-08-02 13:48                 ` [Intel-gfx] " Jani Nikula
2019-08-02 15:28                 ` Sam Ravnborg [this message]
2019-08-02 15:28                   ` Sam Ravnborg
2019-07-18 17:40   ` Sean Paul
2019-07-18 17:40     ` Sean Paul
2019-07-18 16:14 ` [PATCH v1 03/11] drm: drop uapi dependency from drm_vblank.h Sam Ravnborg
2019-07-18 16:14   ` Sam Ravnborg
2019-07-18 17:41   ` Sean Paul
2019-07-18 17:41     ` Sean Paul
2019-07-18 16:15 ` [PATCH v1 04/11] drm/ati_pcigart: drop dependency on drm_os_linux.h Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 17:49   ` Sean Paul
2019-07-18 17:49     ` Sean Paul
2019-07-18 18:11     ` Sam Ravnborg
2019-07-18 18:11       ` Sam Ravnborg
2019-07-18 18:30       ` Sean Paul
2019-07-18 18:30         ` Sean Paul
2019-07-18 16:15 ` [PATCH v1 05/11] drm/vblank: drop use of DRM_WAIT_ON() Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 17:50   ` Sean Paul
2019-07-18 17:50     ` Sean Paul
2019-07-18 16:15 ` [PATCH v1 06/11] drm: direct include of drm.h in drm_gem.c Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 17:51   ` Sean Paul
2019-07-18 17:51     ` Sean Paul
2019-07-18 16:15 ` [PATCH v1 07/11] drm: direct include of drm.h in drm_gem_shmem_helper.c Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 17:51   ` Sean Paul
2019-07-18 17:51     ` Sean Paul
2019-07-18 16:15 ` [PATCH v1 08/11] drm: direct include of drm.h in drm_prime.c Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 17:51   ` Sean Paul
2019-07-18 17:51     ` Sean Paul
2019-07-18 16:15 ` [PATCH v1 09/11] drm: direct include of drm.h in drm_syncobj.c Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 17:51   ` Sean Paul
2019-07-18 17:51     ` Sean Paul
2019-07-18 16:15 ` [PATCH v1 10/11] drm/mediatek: direct include of drm.h in mtk_drm_gem.c Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 17:52   ` Sean Paul
2019-07-18 17:52     ` Sean Paul
2019-07-19  1:30   ` CK Hu
2019-07-19  1:30     ` CK Hu
2019-07-19  1:34     ` CK Hu
2019-07-19  1:34       ` CK Hu
2019-07-18 16:15 ` [PATCH v1 11/11] drm: drop uapi dependency from drm_file.h Sam Ravnborg
2019-07-18 16:15   ` Sam Ravnborg
2019-07-18 18:40   ` Sean Paul
2019-07-18 18:40     ` Sean Paul
2019-07-19  6:56   ` Koenig, Christian
2019-07-19  6:56     ` Koenig, Christian
2019-07-19 11:08     ` Sam Ravnborg
2019-07-19 11:08       ` Sam Ravnborg
2019-07-18 16:37 ` ✗ Fi.CI.CHECKPATCH: warning for drm: header maintenance Patchwork
2019-07-18 16:57 ` ✓ Fi.CI.BAT: success " Patchwork
2019-07-18 19:11 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-07-19 21:26 ` [PATCH v1 0/11] " Sam Ravnborg
2019-07-19 21:26   ` Sam Ravnborg

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=20190802152855.GA5626@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=Christian.Koenig@amd.com \
    --cc=airlied@linux.ie \
    --cc=bbrezillon@kernel.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=seanpaul@chromium.org \
    --cc=treding@nvidia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.