From: Claudio Suarez <cssk@net-c.es>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>, Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: change logs to print connectors in the form CONNECTOR:id:name
Date: Mon, 15 Nov 2021 20:02:45 +0100 [thread overview]
Message-ID: <YZKu1Vs2GPvFvOmb@gineta.localdomain> (raw)
In-Reply-To: <87ilwt3ei7.fsf@intel.com>
On Mon, Nov 15, 2021 at 12:22:08PM +0200, Jani Nikula wrote:
> On Sat, 13 Nov 2021, Claudio Suarez <cssk@net-c.es> wrote:
> > The prefered way to log connectors is [CONNECTOR:id:name]. Change it in
> > drm core programs.
> >
> > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Claudio Suarez <cssk@net-c.es>
> > ---
> > drivers/gpu/drm/drm_client_modeset.c | 51 ++++++++++++++--------------
> > drivers/gpu/drm/drm_connector.c | 12 ++++---
> > drivers/gpu/drm/drm_edid.c | 36 ++++++++++----------
> > drivers/gpu/drm/drm_edid_load.c | 11 +++---
> > drivers/gpu/drm/drm_mode_config.c | 3 +-
> > 5 files changed, 59 insertions(+), 54 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
> > index ced09c7c06f9..4f35dc375bdd 100644
> > --- a/drivers/gpu/drm/drm_client_modeset.c
> > +++ b/drivers/gpu/drm/drm_client_modeset.c
> > @@ -240,7 +240,7 @@ static void drm_client_connectors_enabled(struct drm_connector **connectors,
> > for (i = 0; i < connector_count; i++) {
> > connector = connectors[i];
> > enabled[i] = drm_connector_enabled(connector, true);
> > - DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id,
> > + DRM_DEBUG_KMS("[CONNECTOR:%d;%s] enabled? %s\n", connector->base.id, connector->name,
> > connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no");
>
> You have a semicolon instead of a colon there.
Sorry my typo. I am going to do a new version.
>
> Not to block this patch, but I've wondered about bigger changes such as:
>
> - Adding "debug_name" member or similar in drm_connector, which would be
> an allocated string with "[CONNECTOR:id:name]" that you could use with
> just %s while debug logging.
>
> - Adding drm_dbg_connector() which would take drm_connector as context,
> and do drm_dbg_kms() with the above prefix.
>
> >
> > any_enabled |= enabled[i];
> > @@ -350,8 +350,8 @@ static int drm_client_get_tile_offsets(struct drm_connector **connectors,
> > continue;
> >
> > if (!modes[i] && (h_idx || v_idx)) {
> > - DRM_DEBUG_KMS("no modes for connector tiled %d %d\n", i,
> > - connector->base.id);
> > + DRM_DEBUG_KMS("no modes for [CONNECTOR:%d:%s] tiled %d\n",
> > + connector->base.id, connector->name, i);
>
> Personally I'd prefer adding [CONNECTOR:id:name] as a prefix in the
> beginning, throughout, not in the middle.
I'd prefer too. I am going to change it in the new version.
B.R.
Claudio Suarez.
prev parent reply other threads:[~2021-11-15 19:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-13 19:27 [PATCH] drm: change logs to print connectors in the form CONNECTOR:id:name Claudio Suarez
2021-11-13 20:39 ` Sam Ravnborg
2021-11-14 17:34 ` Claudio Suarez
2021-11-15 10:24 ` Jani Nikula
2021-11-15 19:40 ` Claudio Suarez
2021-11-15 20:17 ` Jani Nikula
2021-11-16 16:55 ` Claudio Suarez
2021-11-18 3:41 ` jim.cromie
2021-11-14 17:22 ` Claudio Suarez
2021-11-14 17:25 ` Claudio Suarez
2021-11-15 10:22 ` Jani Nikula
2021-11-15 10:24 ` Simon Ser
2021-11-15 10:38 ` Jani Nikula
2021-11-15 19:02 ` Claudio Suarez [this message]
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=YZKu1Vs2GPvFvOmb@gineta.localdomain \
--to=cssk@net-c.es \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=sam@ravnborg.org \
/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