From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Tejas Upadhyay <tejas.upadhyay@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Always check force_wake_get return code
Date: Tue, 4 Jun 2024 14:31:03 -0400 [thread overview]
Message-ID: <Zl9dZ6uMk5eVQPpd@intel.com> (raw)
In-Reply-To: <jk5k3x7kcxyu2zg6vcefmata7seyfg5zocr3jlk2c4d3v45ixw@pesc5prqes3t>
On Mon, Jun 03, 2024 at 02:39:41PM -0500, Lucas De Marchi wrote:
> On Mon, Jun 03, 2024 at 11:56:46AM GMT, Daniele Ceraolo Spurio wrote:
> > The commit title seems a bit too generic, given that you're only fixing
> > a single occurrence. maybe switch to something like "check
> > force_wake_get return code in show_run_ticks" ?
> >
> > On 6/3/2024 4:30 AM, Tejas Upadhyay wrote:
> > > A force_wake_get failure means that the HW might not be awake for the
> > > access we're doing; this can lead to an immediate error or it can be a
> > > more subtle problem.
> > >
> > > In this case, user has asked information and in case of forcewake
> > > failure, it might lead to wrong information, so return in case of
> > > error.
> > >
> > > Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
> > > ---
> > > drivers/gpu/drm/xe/xe_drm_client.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
> > > index 4a19b771e3a0..e050fc6d8dd7 100644
> > > --- a/drivers/gpu/drm/xe/xe_drm_client.c
> > > +++ b/drivers/gpu/drm/xe/xe_drm_client.c
> > > @@ -264,7 +264,8 @@ static void show_run_ticks(struct drm_printer *p, struct drm_file *file)
> > > if (!hwe)
> > > continue;
> > > - xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
> > > + if (xe_force_wake_get(gt_to_fw(gt), XE_FW_GT))
> > > + return;
> >
> > Since we're not returning any error code, there doesn't seem to be a
> > direct way to know that a forcewake error happened; we can probably
> > infer it by the lack of messages being printed, but there is another
> > (unlikely) exit point that causes no prints to occur. Should we print an
> > error to dmesg, just to be safe?
>
> see [PATCH v2] drm/xe/client: Check return value of xe_force_wake_get
and https://lore.kernel.org/intel-xe/20240604110225.29495-1-nirmoy.das@intel.com/
>
> Lucas De Marchi
>
> >
> > Daniele
> >
> > > gpu_timestamp = xe_hw_engine_read_timestamp(hwe);
> > > xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
> > > break;
> >
next prev parent reply other threads:[~2024-06-04 18:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-03 11:30 [PATCH] drm/xe: Always check force_wake_get return code Tejas Upadhyay
2024-06-03 18:56 ` Daniele Ceraolo Spurio
2024-06-03 19:39 ` Lucas De Marchi
2024-06-04 18:31 ` Rodrigo Vivi [this message]
2024-06-04 16:46 ` ✓ CI.Patch_applied: success for drm/xe: Always check force_wake_get return code (rev3) Patchwork
2024-06-04 16:46 ` ✓ CI.checkpatch: " Patchwork
2024-06-04 16:47 ` ✓ CI.KUnit: " Patchwork
2024-06-04 16:58 ` ✓ CI.Build: " Patchwork
2024-06-04 16:59 ` ✗ CI.Hooks: failure " Patchwork
2024-06-04 17:00 ` ✓ CI.checksparse: success " Patchwork
2024-06-04 17:24 ` ✓ CI.BAT: " Patchwork
2024-06-04 21:01 ` ✗ CI.FULL: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-03-12 19:42 [PATCH] drm/xe: Always check force_wake_get return code Daniele Ceraolo Spurio
2024-03-12 23:07 ` Matt Roper
2024-03-13 8:31 ` Jani Nikula
2024-03-13 14:24 ` Daniele Ceraolo Spurio
2024-03-13 14:56 ` Jani Nikula
2024-03-13 17:35 ` Daniele Ceraolo Spurio
2024-03-14 10:58 ` Upadhyay, Tejas
2024-03-14 13:53 ` Daniele Ceraolo Spurio
2024-03-14 14:12 ` Upadhyay, Tejas
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=Zl9dZ6uMk5eVQPpd@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=tejas.upadhyay@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