From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19313C46CD2 for ; Tue, 30 Jan 2024 10:32:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A0E4F11285B; Tue, 30 Jan 2024 10:32:34 +0000 (UTC) Received: from coelho.fi (paleale.coelho.fi [176.9.41.70]) by gabe.freedesktop.org (Postfix) with ESMTPS id EBAF610EB3F; Tue, 30 Jan 2024 10:32:32 +0000 (UTC) Received: from 91-155-255-116.elisa-laajakaista.fi ([91.155.255.116] helo=RAVPPB-CIM.amr.corp.intel.com) by coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97-RC1) (envelope-from ) id 1rUlPq-00000001Y1m-1cUr; Tue, 30 Jan 2024 12:32:30 +0200 Message-ID: From: Luca Coelho To: Jani Nikula , dri-devel@lists.freedesktop.org Date: Tue, 30 Jan 2024 12:32:29 +0200 In-Reply-To: <35929b030f7ba67cd32808d42e916aa9cfb5709d.1705410327.git.jani.nikula@intel.com> References: <35929b030f7ba67cd32808d42e916aa9cfb5709d.1705410327.git.jani.nikula@intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 Subject: Re: [PATCH 09/10] drm/xe: switch from drm_debug_printer() to device specific drm_dbg_printer() X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Tue, 2024-01-16 at 15:07 +0200, Jani Nikula wrote: > Prefer the device specific debug printer. >=20 > Signed-off-by: Jani Nikula > --- > 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(-) >=20 > 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]; > =20 > snprintf(prefix, sizeof(prefix), "[GT%u Error]", gt->info.id); > - p =3D drm_debug_printer(prefix); > + p =3D drm_dbg_printer(>_to_xe(gt)->drm, DRM_UT_DRIVER, prefix); > =20 > 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 =3D gt_to_xe(gt); > - struct drm_printer p =3D drm_debug_printer("GT topology"); > + struct drm_printer p; > int num_geometry_regs, num_compute_regs; > =20 > 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); > =20 > + p =3D 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); > } > =20 > diff --git a/drivers/gpu/drm/xe/xe_reg_sr.c b/drivers/gpu/drm/xe/xe_reg_s= r.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 *h= we) > if (err) > goto err_force_wake; > =20 > - p =3D drm_debug_printer(KBUILD_MODNAME); > + p =3D drm_dbg_printer(&xe->drm, DRM_UT_DRIVER, NULL); > xa_for_each(&sr->xa, reg, entry) { > if (slot =3D=3D RING_MAX_NONPRIV_SLOTS) { > xe_gt_err(gt, Reviewed-by: Luca Coelho -- Cheers, Luca.