Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: Badal Nilawar <badal.nilawar@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v6 02/25] drm/xe/forcewake: Add a helper xe_force_wake_ref_has_domain()
Date: Tue, 1 Oct 2024 10:36:33 +0530	[thread overview]
Message-ID: <a165e8a1-76d7-413a-87bf-d74a52c314a2@intel.com> (raw)
In-Reply-To: <f6e6ebd2-de76-4466-9374-9bba7e5d2ae0@intel.com>



On 01-10-2024 01:34, Michal Wajdeczko wrote:
> 
> 
> On 30.09.2024 07:31, Himal Prasad Ghimiray wrote:
>> The helper xe_force_wake_ref_has_domain() checks if the input domain
>> has been successfully reference-counted and awakened in the reference
>> returned by the xe_force_wake_get() call.
> 
> hmm
> but at this point of the series, xe_force_wake_get() still returns errno

Yup, will remove  returned by the xe_force_wake_get() call.

> 
>>
>> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Badal Nilawar <badal.nilawar@intel.com>
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_force_wake.h | 19 +++++++++++++++++++
>>   1 file changed, 19 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_force_wake.h b/drivers/gpu/drm/xe/xe_force_wake.h
>> index a2577672f4e3..de720881a300 100644
>> --- a/drivers/gpu/drm/xe/xe_force_wake.h
>> +++ b/drivers/gpu/drm/xe/xe_force_wake.h
>> @@ -46,4 +46,23 @@ xe_force_wake_assert_held(struct xe_force_wake *fw,
>>   	xe_gt_assert(fw->gt, fw->awake_domains & domain);
>>   }
>>   
>> +/**
>> + * xe_force_wake_ref_has_domain - verifies if the domains are in fw_ref
>> + * @fw_ref : Return of xe_force_wake_get()
> 
> for now you may only refer to this only as: "the force_wake reference"
> and once you update xe_force_wake_get() you may say there that it
> returns "a force_wake reference" that could be checked by this helper

Ok

> 
>> + * @domain : forcewake domains to verify
> 
> domain or domains ?
> 
>> + *
>> + * xe_force_wake_ref_has_domain() confirms whether xe_force_wake_get()
>> + * is success or not for @domain.
> 
> This function confirms whether the @fw_ref includes a reference to the
> specified @domain.

OK

> 
>> + * In the event of a failure, if the caller chooses to abort or return,
>> + * they must call xe_force_wake_put(fw, @fw_ref) if the @domain
>> + * parameter is XE_FORCE_WAKE_ALL
> 
> hmm, this last sentence is IMO not applicable here, it should be rather
> placed in xe_force_wake_get() doc that may refer to this function

Sure

> 
>> + *
>> + * Return: true on domain is refcounted.
> 
> s/on/if

ok

> 
>> + */
>> +static inline bool
>> +xe_force_wake_ref_has_domain(unsigned int fw_ref, enum xe_force_wake_domains domain)
>> +{
>> +	return (fw_ref & domain);
> 
> you don't need these ( )

ok

> 
>> +}
>> +
>>   #endif
> 


  reply	other threads:[~2024-10-01  5:06 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30  5:31 [PATCH v6 00/25] Fix xe_force_wake_get() failure handling Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 01/25] drm/xe: Add member initialized_domains to xe_force_wake() Himal Prasad Ghimiray
2024-09-30 19:51   ` Michal Wajdeczko
2024-10-01  5:03     ` Ghimiray, Himal Prasad
2024-09-30  5:31 ` [PATCH v6 02/25] drm/xe/forcewake: Add a helper xe_force_wake_ref_has_domain() Himal Prasad Ghimiray
2024-09-30 20:04   ` Michal Wajdeczko
2024-10-01  5:06     ` Ghimiray, Himal Prasad [this message]
2024-09-30  5:31 ` [PATCH v6 03/25] drm/xe: Error handling in xe_force_wake_get() Himal Prasad Ghimiray
2024-10-03 12:23   ` Nilawar, Badal
2024-10-03 16:10     ` Ghimiray, Himal Prasad
2024-10-04  7:40       ` Nilawar, Badal
2024-10-07  3:14         ` Ghimiray, Himal Prasad
2024-09-30  5:31 ` [PATCH v6 04/25] drm/xe: Modify xe_force_wake_put to handle _get returned mask Himal Prasad Ghimiray
2024-09-30 20:13   ` Michal Wajdeczko
2024-09-30 20:15     ` Michal Wajdeczko
2024-10-01  5:11       ` Ghimiray, Himal Prasad
2024-10-04  3:21         ` Nilawar, Badal
2024-09-30 22:13   ` Matt Roper
2024-10-01  5:31     ` Ghimiray, Himal Prasad
2024-09-30  5:31 ` [PATCH v6 05/25] drm/xe/device: Update handling of xe_force_wake_get return Himal Prasad Ghimiray
2024-10-04  7:18   ` Nilawar, Badal
2024-10-07  3:40     ` Ghimiray, Himal Prasad
2024-09-30  5:31 ` [PATCH v6 06/25] drm/xe/hdcp: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 07/25] drm/xe/gsc: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 08/25] drm/xe/gt: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 09/25] drm/xe/xe_gt_idle: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 10/25] drm/xe/devcoredump: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 11/25] drm/xe/tests/mocs: Update xe_force_wake_get() return handling Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 12/25] drm/xe/mocs: Update handling of xe_force_wake_get return Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 13/25] drm/xe/xe_drm_client: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 14/25] drm/xe/xe_gt_debugfs: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 15/25] drm/xe/guc: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 16/25] drm/xe/huc: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 17/25] drm/xe/oa: Handle force_wake_get failure in xe_oa_stream_init() Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 18/25] drm/xe/pat: Update handling of xe_force_wake_get return Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 19/25] drm/xe/gt_tlb_invalidation_ggtt: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 20/25] drm/xe/xe_reg_sr: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 21/25] drm/xe/query: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 22/25] drm/xe/vram: " Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 23/25] drm/xe: forcewake debugfs open fails on xe_forcewake_get failure Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 24/25] drm/xe: Ensure __must_check for xe_force_wake_get() return Himal Prasad Ghimiray
2024-09-30  5:31 ` [PATCH v6 25/25] drm/xe: Change return type to void for xe_force_wake_put Himal Prasad Ghimiray
2024-09-30  6:02 ` ✓ CI.Patch_applied: success for Fix xe_force_wake_get() failure handling (rev6) Patchwork
2024-09-30  6:03 ` ✓ CI.checkpatch: " Patchwork
2024-09-30  6:03 ` ✗ CI.KUnit: failure " Patchwork
2024-09-30  7:35   ` Ghimiray, Himal Prasad
2024-09-30 20:55 ` ✓ CI.Patch_applied: success for Fix xe_force_wake_get() failure handling (rev7) Patchwork
2024-09-30 20:55 ` ✓ CI.checkpatch: " Patchwork
2024-09-30 20:57 ` ✓ CI.KUnit: " Patchwork
2024-09-30 21:08 ` ✓ CI.Build: " Patchwork
2024-09-30 21:10 ` ✗ CI.Hooks: failure " Patchwork
2024-09-30 21:12 ` ✓ CI.checksparse: success " Patchwork
2024-09-30 21:39 ` ✗ CI.BAT: failure " Patchwork
2024-10-01  6:20 ` ✗ CI.FULL: " Patchwork

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=a165e8a1-76d7-413a-87bf-d74a52c314a2@intel.com \
    --to=himal.prasad.ghimiray@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    --cc=rodrigo.vivi@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