All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping
Date: Fri, 06 Jun 2025 09:05:17 -0700	[thread overview]
Message-ID: <87y0u4ua82.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <aEDbdycz-I9vVzje@unerlige-desk.amr.corp.intel.com>

On Wed, 04 Jun 2025 16:49:11 -0700, Umesh Nerlige Ramappa wrote:
>
> On Tue, Jun 03, 2025 at 01:21:30PM -0700, Ashutosh Dixit wrote:
> > Print hwe to OA unit mapping to dmesg, to help debug for current and new
> > platforms.
> >
> > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_oa.c | 27 +++++++++++++++++++++++++++
> > 1 file changed, 27 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
> > index 0de0d5a18df74..94faa4ed2012f 100644
> > --- a/drivers/gpu/drm/xe/xe_oa.c
> > +++ b/drivers/gpu/drm/xe/xe_oa.c
> > @@ -2603,6 +2603,31 @@ static int xe_oa_init_gt(struct xe_gt *gt)
> >	return 0;
> > }
> >
> > +static void xe_oa_print_oa_units(struct xe_oa *oa)
> > +{
> > +	enum xe_hw_engine_id hwe_id;
> > +	struct xe_hw_engine *hwe;
> > +	struct xe_oa_unit *u;
> > +	struct xe_gt *gt;
> > +	int gt_id, i, n;
> > +	char buf[256];
> > +
> > +	for_each_gt(gt, oa->xe, gt_id) {
> > +		for (i = 0; i < gt->oa.num_oa_units; i++) {
> > +			u = &gt->oa.oa_unit[i];
> > +			buf[0] = '\0';
> > +			n = 0;
> > +
> > +			for_each_hw_engine(hwe, gt, hwe_id)
> > +				if (xe_oa_unit_id(hwe) == u->oa_unit_id)
> > +					n += scnprintf(buf + n, sizeof(buf) - n, "%s ", hwe->name);
> > +
> > +			xe_gt_dbg(gt, "oa_unit %d, type %d, Engines: %s\n",
> > +				  u->oa_unit_id, u->type, buf);
> > +		}
> > +	}
> > +}
> > +
>
> nit: I would at least move one of the inner for loops outside to a separate
> helper.

Separated out the first inner loop into xe_oa_print_gt_oa_units().

>
> otherwise, LGTM
>
> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

Thanks.
--
Ashutosh


>
> > static int xe_oa_init_oa_units(struct xe_oa *oa)
> > {
> >	struct xe_gt *gt;
> > @@ -2619,6 +2644,8 @@ static int xe_oa_init_oa_units(struct xe_oa *oa)
> >			return ret;
> >	}
> >
> > +	xe_oa_print_oa_units(oa);
> > +
> >	return 0;
> > }
> >
> > --
> > 2.48.1
> >

  reply	other threads:[~2025-06-06 16:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 20:21 [PATCH v3 0/5] Enable media OA Ashutosh Dixit
2025-06-03 20:21 ` [PATCH 1/5] drm/xe/oa/uapi: Expose media OA units Ashutosh Dixit
2025-06-04 23:42   ` Umesh Nerlige Ramappa
2025-06-05 18:28     ` Dixit, Ashutosh
2025-06-06 16:42       ` Dixit, Ashutosh
2025-06-03 20:21 ` [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping Ashutosh Dixit
2025-06-04 23:49   ` Umesh Nerlige Ramappa
2025-06-06 16:05     ` Dixit, Ashutosh [this message]
2025-06-03 20:21 ` [PATCH 3/5] drm/xe/oa: Introduce stream->oa_unit Ashutosh Dixit
2025-06-04 23:54   ` Umesh Nerlige Ramappa
2025-06-03 20:21 ` [PATCH 4/5] drm/xe/oa: Assign hwe for OAM_SAG Ashutosh Dixit
2025-06-05  0:14   ` Umesh Nerlige Ramappa
2025-06-06 16:07     ` Dixit, Ashutosh
2025-06-03 20:21 ` [PATCH 5/5] drm/xe/oa: Enable OAM latency measurement Ashutosh Dixit
2025-06-05 16:25   ` Umesh Nerlige Ramappa
2025-06-03 20:26 ` ✓ CI.Patch_applied: success for Enable media OA Patchwork
2025-06-03 20:26 ` ✓ CI.checkpatch: " Patchwork
2025-06-03 20:27 ` ✗ CI.KUnit: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-06-06 19:26 [PATCH 0/5] " Ashutosh Dixit
2025-06-06 19:26 ` [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping Ashutosh Dixit
2025-06-06 16:02 [PATCH v4 0/5] Enable media OA Ashutosh Dixit
2025-06-06 16:02 ` [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping Ashutosh Dixit
2025-05-31  0:12 [PATCH v2 0/5] Enable media OA Ashutosh Dixit
2025-05-31  0:12 ` [PATCH 2/5] drm/xe/oa: Print hwe to OA unit mapping Ashutosh Dixit

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=87y0u4ua82.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=umesh.nerlige.ramappa@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.