All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: John Harrison <john.c.harrison@intel.com>,
	Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Intel-GFX@Lists.FreeDesktop.Org
Cc: DRI-Devel@Lists.FreeDesktop.Org
Subject: Re: [Intel-gfx] [PATCH v2 4/5] drm/i915/guc: Add GuC CT specific debug print wrappers
Date: Mon, 5 Dec 2022 13:16:59 +0000	[thread overview]
Message-ID: <c5622088-e381-1df4-417d-9b033b0a6afe@linux.intel.com> (raw)
In-Reply-To: <dd787d9d-8559-1da4-7e99-2635ef1341a8@intel.com>


On 02/12/2022 20:14, John Harrison wrote:

>>> and while for dbg level messages it doesn't matter, I assume we should
>>> be consistent for err/warn/info messages (as those will eventually show
>>> up to the end user) so let maintainers decide here what is 
>>> expectation here
>>
>> Could we have some examples pasted here, of the end result of this 
>> series, for all message "categories" (origins, macros, whatever)?
> 
> GT initialisation:
> gt_err(gt, "Failed to allocate scratch page\n");
> i915 0000:00:02.0: [drm] GT0: Failed to allocate scratch page
> 
> G2H notification handler:
> guc_err(guc, "notification: Invalid length %u for deregister done\n", len);
> i915 0000:00:02.0: [drm] GT0: GuC notification: Invalid length 0 for 
> deregister done

I'm not liking the inconsistency between gt_err and guc_err where with latter callers either need to start the message with lower case because of the unstructured "GuC " prefix added. Which then reads bad if callers do guc_err(guc, "Error X happend").

Looks like Michal was pointing out the same thing, AFAIU at least when re-reading the thread now.

Why wouldn't this work:

guc_err(guc, "Invalid length %u for deregister done notification\n", len);
i915 0000:00:02.0: [drm] GT0: GuC: Invalid length 0 for deregister done notification

Or if the use case for adding custom prefixes is strong then maybe consider:

guc_err(guc, "notification", "Invalid length 0 for deregister done");
i915 0000:00:02.0: [drm] GT0: GuC notification: Invalid length 0 for deregister done

guc_err(guc, "", "Error X");
i915 0000:00:02.0: [drm] GT0: GuC: Error X

> CTB initialisation:
> ct_probe_error(ct, "Failed to control/%s CTB (%pe)\n", 
> str_enable_disable(enable), ERR_PTR(err));
> i915 0000:00:02.0: [drm] GT0: GuC CT Failed to control/enable CTB (EINVAL)

Okay same as above.

> Random meaningless (to me) message that is apparently a display thing:
> drm_dbg_kms(&dev_priv->drm, "disabling %s\n", pll->info->name);
> i915 0000:00:02.0: [drm:intel_disable_shared_dpll [i915]] disabling PORT 
> PLL B

Plan is to not touch outside gt/.

> I'm sure you can extrapolate to all other forms of dbg, notice, info, 
> etc. without me having to manually type each one out, given that they 
> are all identical.
> 
> Personally, I think the above should be just:
> gt_err(gt, "Failed to allocate scratch page\n");
> i915 0000:00:02.0: [drm] GT0: Failed to allocate scratch page
> 
> gt_err(guc_to_gt(guc), "G2H: Invalid length for deregister done: %u\n", 
> len);
> i915 0000:00:02.0: [drm] GT0: G2H: Invalid length for deregister done: 0
> 
> gt_probe_error(ct_to_gt(ct), "Failed to %s CT %d buffer (%pe)\n", 
> str_enable_disable(enable), send ? "SEND" : "RECV", ERR_PTR(err));
> i915 0000:00:02.0: [drm] GT0: Failed to enable CT SEND buffer (EINVAL)

We could but it seems we agreed some weeks ago to consolidate the existing CT_ERROR macros and such in this exercise. At least no objections were raised to that plan.

If now we want to go back on that, and if you want to have guc_to_gt(guc) in all gt/uc/ call sites that's fine by me, but please get some acks and consensus from people who work in that area. And under that option someone would also need to convert the CT code to new macros.

Regards,

Tvrtko

> drm_dbg_kms(&dev_priv->drm, "disabling %s\n", pll->info->name);
> i915 0000:00:02.0: [drm:intel_disable_shared_dpll [i915-KMS]] disabling 
> PORT PLL B
> But presumably that requires finishing the plan of splitting out the 
> display code into a separate driver. So for now, something like this 
> would still be a massive improvement:
> kms_dbg(dev_priv, "disabling %s\n", pll->info->name);
> i915 0000:00:02.0: [drm:intel_disable_shared_dpll [i915]] KMS: disabling 
> PORT PLL B
> 
> John.
> 
>>
>> Regards,
>>
>> Tvrtko
> 

  reply	other threads:[~2022-12-05 13:17 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  1:58 [PATCH v2 0/5] Add module oriented dmesg output John.C.Harrison
2022-11-18  1:58 ` [Intel-gfx] " John.C.Harrison
2022-11-18  1:58 ` [PATCH v2 1/5] drm/i915/gt: Start adding " John.C.Harrison
2022-11-18  1:58   ` [Intel-gfx] " John.C.Harrison
2022-11-22 16:47   ` Michal Wajdeczko
2022-11-22 16:47     ` [Intel-gfx] " Michal Wajdeczko
2022-11-18  1:58 ` [PATCH v2 2/5] drm/i915/huc: Add HuC specific debug print wrappers John.C.Harrison
2022-11-18  1:58   ` [Intel-gfx] " John.C.Harrison
2022-11-22 17:17   ` Michal Wajdeczko
2022-11-22 17:17     ` [Intel-gfx] " Michal Wajdeczko
2022-11-18  1:58 ` [PATCH v2 3/5] drm/i915/guc: Add GuC " John.C.Harrison
2022-11-18  1:58   ` [Intel-gfx] " John.C.Harrison
2022-11-22 17:42   ` Michal Wajdeczko
2022-11-22 17:42     ` [Intel-gfx] " Michal Wajdeczko
2022-11-23  0:56     ` John Harrison
2022-11-23  0:56       ` [Intel-gfx] " John Harrison
2022-11-18  1:58 ` [PATCH v2 4/5] drm/i915/guc: Add GuC CT " John.C.Harrison
2022-11-18  1:58   ` [Intel-gfx] " John.C.Harrison
2022-11-22 17:54   ` Michal Wajdeczko
2022-11-23  1:25     ` John Harrison
2022-11-23 20:45       ` Michal Wajdeczko
2022-12-01  0:41         ` John Harrison
2022-12-01 11:56           ` Michal Wajdeczko
2022-12-01 12:01             ` Tvrtko Ursulin
2022-12-02 20:14               ` John Harrison
2022-12-05 13:16                 ` Tvrtko Ursulin [this message]
2022-12-05 18:44                   ` Michal Wajdeczko
2022-12-06 11:06                     ` Tvrtko Ursulin
2023-01-06 18:57                       ` John Harrison
2023-01-06 18:57                         ` John Harrison
2023-01-09  9:38                         ` Jani Nikula
2023-01-09  9:38                           ` Jani Nikula
2023-01-09 20:33                           ` John Harrison
2023-01-09 20:33                             ` John Harrison
2023-01-09  9:39                         ` Tvrtko Ursulin
2023-01-09  9:39                           ` Tvrtko Ursulin
2023-01-09 20:36                           ` John Harrison
2023-01-09 20:36                             ` John Harrison
2022-11-18  1:58 ` [PATCH v2 5/5] drm/i915/uc: Update the gt/uc code to use gt_err and friends John.C.Harrison
2022-11-18  1:58   ` [Intel-gfx] " John.C.Harrison
2022-11-18  2:24 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add module oriented dmesg output Patchwork
2022-11-18  2:24 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-11-18  2:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-18 10:52 ` [Intel-gfx] [PATCH v2 0/5] " Jani Nikula
2022-11-18 10:52   ` Jani Nikula
2022-11-21 18:21   ` John Harrison
2022-11-21 18:21     ` John Harrison
2022-11-22  8:14     ` Tvrtko Ursulin
2022-11-22 16:35   ` Michal Wajdeczko
2022-11-22 18:21     ` Jani Nikula
2022-11-18 19:37 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

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=c5622088-e381-1df4-417d-9b033b0a6afe@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=DRI-Devel@Lists.FreeDesktop.Org \
    --cc=Intel-GFX@Lists.FreeDesktop.Org \
    --cc=john.c.harrison@intel.com \
    --cc=michal.wajdeczko@intel.com \
    /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.