From: Raag Jadav <raag.jadav@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
intel-xe@lists.freedesktop.org, anshuman.gupta@intel.com
Subject: Re: [PATCH v1] drm/xe/throttle: Log throttle reasons
Date: Fri, 15 Nov 2024 16:40:49 +0200 [thread overview]
Message-ID: <ZzddcQoXLFGNwfOZ@black.fi.intel.com> (raw)
In-Reply-To: <85a5e0y5dq.wl-ashutosh.dixit@intel.com>
On Fri, Nov 15, 2024 at 05:48:49AM -0800, Dixit, Ashutosh wrote:
> On Fri, 15 Nov 2024 05:12:08 -0800, Michal Wajdeczko wrote:
> > On 15.11.2024 13:56, Raag Jadav wrote:
> > > Log throttle register MMIO reads which will be useful for debugging.
> > >
> > > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > > ---
> > > drivers/gpu/drm/xe/xe_gt_throttle.c | 9 ++++++---
> > > 1 file changed, 6 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/xe/xe_gt_throttle.c b/drivers/gpu/drm/xe/xe_gt_throttle.c
> > > index 03b225364101..0ce21ffc08dc 100644
> > > --- a/drivers/gpu/drm/xe/xe_gt_throttle.c
> > > +++ b/drivers/gpu/drm/xe/xe_gt_throttle.c
> > > @@ -37,15 +37,18 @@ dev_to_gt(struct device *dev)
> > >
> > > u32 xe_gt_throttle_get_limit_reasons(struct xe_gt *gt)
> > > {
> > > + struct xe_device *xe = gt_to_xe(gt);
> > > + bool media = xe_gt_is_media_type(gt);
>
> Also not sure what the point of these new variables is, previous code is
> fine. I actually prefer it to the new code.
>
> So this patch should be just a single line of xe_gt_dbg, IMO.
We normally have temp variables for repeated uses. Makes the rest a bit
easier on the eyes.
Raag
> > > u32 reg;
> > >
> > > - xe_pm_runtime_get(gt_to_xe(gt));
> > > - if (xe_gt_is_media_type(gt))
> > > + xe_pm_runtime_get(xe);
> > > + if (media)
> > > reg = xe_mmio_read32(>->mmio, MTL_MEDIA_PERF_LIMIT_REASONS);
> > > else
> > > reg = xe_mmio_read32(>->mmio, GT0_PERF_LIMIT_REASONS);
> > > - xe_pm_runtime_put(gt_to_xe(gt));
> > > + xe_pm_runtime_put(xe);
> > >
> > > + drm_dbg(&xe->drm, "%s reg: 0x%x\n", media ? "media" : "gt", reg);
> >
> > we prefer GT oriented logs, so this should be:
> >
> > xe_gt_dbg(gt, "....
> >
> > > return reg;
> > > }
> > >
> >
next prev parent reply other threads:[~2024-11-15 14:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 12:56 [PATCH v1] drm/xe/throttle: Log throttle reasons Raag Jadav
2024-11-15 13:02 ` ✓ CI.Patch_applied: success for " Patchwork
2024-11-15 13:02 ` ✓ CI.checkpatch: " Patchwork
2024-11-15 13:04 ` ✓ CI.KUnit: " Patchwork
2024-11-15 13:12 ` [PATCH v1] " Michal Wajdeczko
2024-11-15 13:48 ` Dixit, Ashutosh
2024-11-15 14:40 ` Raag Jadav [this message]
2024-11-15 14:56 ` Dixit, Ashutosh
2024-11-15 18:56 ` Rodrigo Vivi
2024-11-15 13:13 ` ✗ CI.Build: failure for " Patchwork
2024-11-15 19:54 ` [PATCH v1] " Matthew Brost
2024-11-15 20:03 ` Dixit, Ashutosh
2024-11-19 18:51 ` Raag Jadav
2024-11-16 5:16 ` Raag Jadav
2024-11-16 5:34 ` Dixit, Ashutosh
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=ZzddcQoXLFGNwfOZ@black.fi.intel.com \
--to=raag.jadav@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox