From: Luca Coelho <luca@coelho.fi>
To: Jani Nikula <jani.nikula@intel.com>, dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 09/10] drm/xe: switch from drm_debug_printer() to device specific drm_dbg_printer()
Date: Tue, 30 Jan 2024 12:32:29 +0200 [thread overview]
Message-ID: <f44943cf03cc3c5ead1db44400a76322b835175e.camel@coelho.fi> (raw)
In-Reply-To: <35929b030f7ba67cd32808d42e916aa9cfb5709d.1705410327.git.jani.nikula@intel.com>
On Tue, 2024-01-16 at 15:07 +0200, Jani Nikula wrote:
> Prefer the device specific debug printer.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt.c | 2 +-
> drivers/gpu/drm/xe/xe_gt_topology.c | 4 +++-
> drivers/gpu/drm/xe/xe_reg_sr.c | 2 +-
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 0f2258dc4a00..16481f9b3125 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -327,7 +327,7 @@ static void dump_pat_on_error(struct xe_gt *gt)
> char prefix[32];
>
> snprintf(prefix, sizeof(prefix), "[GT%u Error]", gt->info.id);
> - p = drm_debug_printer(prefix);
> + p = drm_dbg_printer(>_to_xe(gt)->drm, DRM_UT_DRIVER, prefix);
>
> xe_pat_dump(gt, &p);
> }
> diff --git a/drivers/gpu/drm/xe/xe_gt_topology.c b/drivers/gpu/drm/xe/xe_gt_topology.c
> index a8d7f272c30a..5dc62fe1be49 100644
> --- a/drivers/gpu/drm/xe/xe_gt_topology.c
> +++ b/drivers/gpu/drm/xe/xe_gt_topology.c
> @@ -84,7 +84,7 @@ void
> xe_gt_topology_init(struct xe_gt *gt)
> {
> struct xe_device *xe = gt_to_xe(gt);
> - struct drm_printer p = drm_debug_printer("GT topology");
> + struct drm_printer p;
> int num_geometry_regs, num_compute_regs;
>
> get_num_dss_regs(xe, &num_geometry_regs, &num_compute_regs);
> @@ -107,6 +107,8 @@ xe_gt_topology_init(struct xe_gt *gt)
> XE2_GT_COMPUTE_DSS_2);
> load_eu_mask(gt, gt->fuse_topo.eu_mask_per_dss);
>
> + p = drm_dbg_printer(>_to_xe(gt)->drm, DRM_UT_DRIVER, "GT topology");
> +
I'm not sure there was a specific reason to move the initialization out
of the declaration, but it's probably a bit cleaner and more aligned
with other places...
> xe_gt_topology_dump(gt, &p);
> }
>
> diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_sr.c
> index 87adefb56024..440ac572f6e5 100644
> --- a/drivers/gpu/drm/xe/xe_reg_sr.c
> +++ b/drivers/gpu/drm/xe/xe_reg_sr.c
> @@ -231,7 +231,7 @@ void xe_reg_sr_apply_whitelist(struct xe_hw_engine *hwe)
> if (err)
> goto err_force_wake;
>
> - p = drm_debug_printer(KBUILD_MODNAME);
> + p = drm_dbg_printer(&xe->drm, DRM_UT_DRIVER, NULL);
> xa_for_each(&sr->xa, reg, entry) {
> if (slot == RING_MAX_NONPRIV_SLOTS) {
> xe_gt_err(gt,
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
--
Cheers,
Luca.
next prev parent reply other threads:[~2024-01-30 10:32 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 13:07 [PATCH 00/10] drm: drm debug and error logging improvements Jani Nikula
2024-01-16 13:07 ` [PATCH 01/10] drm/print: make drm_err_printer() device specific by using drm_err() Jani Nikula
2024-01-30 10:08 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 02/10] drm/print: move enum drm_debug_category etc. earlier in drm_print.h Jani Nikula
2024-01-30 10:11 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 03/10] drm/print: add drm_dbg_printer() for drm device specific printer Jani Nikula
2024-01-30 10:19 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 04/10] drm/dp_mst: switch from drm_debug_printer() to device specific drm_dbg_printer() Jani Nikula
2024-01-30 10:20 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 05/10] drm/mode: " Jani Nikula
2024-01-30 10:23 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 06/10] drm/dp: switch drm_dp_vsc_sdp_log() to struct drm_printer Jani Nikula
2024-01-30 10:26 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 07/10] drm/i915: switch from drm_debug_printer() to device specific drm_dbg_printer() Jani Nikula
2024-01-30 10:27 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 08/10] drm/i915: use drm_printf() with the drm_err_printer intead of pr_err() Jani Nikula
2024-01-30 10:28 ` Luca Coelho
2024-01-16 13:07 ` [PATCH 09/10] drm/xe: switch from drm_debug_printer() to device specific drm_dbg_printer() Jani Nikula
2024-01-30 10:32 ` Luca Coelho [this message]
2024-02-01 12:52 ` Jani Nikula
2024-02-01 16:16 ` Lucas De Marchi
2024-02-09 12:07 ` Jani Nikula
2024-01-16 13:07 ` [PATCH 10/10] drm: remove drm_debug_printer in favor of drm_dbg_printer Jani Nikula
2024-01-30 10:35 ` Luca Coelho
2024-01-16 14:15 ` ✓ CI.Patch_applied: success for drm: drm debug and error logging improvements Patchwork
2024-01-16 14:16 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-16 14:16 ` ✓ CI.KUnit: success " Patchwork
2024-01-16 14:19 ` ✗ CI.Build: failure " Patchwork
2024-02-01 12:51 ` [PATCH 00/10] " Jani Nikula
2024-02-01 14:43 ` Maxime Ripard
2024-02-09 11:40 ` Jani Nikula
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=f44943cf03cc3c5ead1db44400a76322b835175e.camel@coelho.fi \
--to=luca@coelho.fi \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox