From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>,
Nirmoy Das <nirmoy.das@intel.com>,
intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH] drm/xe/client: Check return value of xe_force_wake_get
Date: Thu, 30 May 2024 23:30:44 +0200 [thread overview]
Message-ID: <15f0b8c1-4dc5-4584-9c39-0822017509e2@linux.intel.com> (raw)
In-Reply-To: <f5171a4f-5722-45a9-884a-45f006d507c2@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]
Hi Himal,
On 5/30/2024 10:47 AM, Ghimiray, Himal Prasad wrote:
>
>
> On 28-05-2024 15:41, Nirmoy Das wrote:
>> xe_force_wake_get() can return error so check it's return value
>> before reading gpu_timestamp value.
>>
>> Fixes: 188ced1e0ff8 ("drm/xe/client: Print runtime to fdinfo")
>> Cc: Lucas De Marchi<lucas.demarchi@intel.com>
>> Signed-off-by: Nirmoy Das<nirmoy.das@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_drm_client.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
>> index 4a19b771e3a0..0c13395ffd34 100644
>> --- a/drivers/gpu/drm/xe/xe_drm_client.c
>> +++ b/drivers/gpu/drm/xe/xe_drm_client.c
>> @@ -245,7 +245,7 @@ static void show_run_ticks(struct drm_printer *p, struct drm_file *file)
>> struct xe_gt *gt;
>> struct xe_hw_engine *hwe;
>> struct xe_exec_queue *q;
>> - u64 gpu_timestamp;
>> + u64 gpu_timestamp = 0;
>>
>> xe_pm_runtime_get(xe);
>>
>> @@ -264,7 +264,9 @@ 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);
>
> This is becoming continuous efforts. How about introducing
> __must_check to xe_force_wake_get ?
>
Yes, this is a good idea.
>
>
>> + if (xe_force_wake_get(gt_to_fw(gt), XE_FW_GT))
>> + break;
>> +
>> gpu_timestamp = xe_hw_engine_read_timestamp(hwe);
>> xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
>
> Handle any errors that may occur if xe_force_wake_put fails, possibly
> XE_WARN_ON.
>
Will add that.
Regards,
Nirmoy
>
>> break;
[-- Attachment #2: Type: text/html, Size: 3151 bytes --]
prev parent reply other threads:[~2024-05-30 21:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 10:11 [PATCH] drm/xe/client: Check return value of xe_force_wake_get Nirmoy Das
2024-05-28 10:32 ` ✓ CI.Patch_applied: success for " Patchwork
2024-05-28 10:32 ` ✓ CI.checkpatch: " Patchwork
2024-05-28 10:33 ` ✗ CI.KUnit: failure " Patchwork
2024-05-28 17:22 ` [PATCH] " Rodrigo Vivi
2024-05-29 8:50 ` Nirmoy Das
2024-05-29 13:37 ` Rodrigo Vivi
2024-05-29 16:24 ` Lucas De Marchi
2024-05-30 21:22 ` Nirmoy Das
2024-05-29 9:20 ` ✓ CI.Patch_applied: success for drm/xe/client: Check return value of xe_force_wake_get (rev2) Patchwork
2024-05-29 9:20 ` ✓ CI.checkpatch: " Patchwork
2024-05-29 9:21 ` ✗ CI.KUnit: failure " Patchwork
2024-05-29 10:29 ` ✓ CI.Patch_applied: success for drm/xe/client: Check return value of xe_force_wake_get (rev3) Patchwork
2024-05-29 10:29 ` ✓ CI.checkpatch: " Patchwork
2024-05-29 10:30 ` ✓ CI.KUnit: " Patchwork
2024-05-29 10:42 ` ✓ CI.Build: " Patchwork
2024-05-29 10:42 ` ✗ CI.Hooks: failure " Patchwork
2024-05-29 10:43 ` ✓ CI.checksparse: success " Patchwork
2024-05-29 11:08 ` ✓ CI.BAT: " Patchwork
2024-05-29 12:25 ` ✗ CI.FULL: failure " Patchwork
2024-05-30 8:47 ` [PATCH] drm/xe/client: Check return value of xe_force_wake_get Ghimiray, Himal Prasad
2024-05-30 21:30 ` Nirmoy Das [this message]
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=15f0b8c1-4dc5-4584-9c39-0822017509e2@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=nirmoy.das@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