Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915: Update doc for __intel_wakeref_put()
@ 2023-01-05 15:38 Nirmoy Das
  2023-01-05 16:29 ` Dixit, Ashutosh
  0 siblings, 1 reply; 4+ messages in thread
From: Nirmoy Das @ 2023-01-05 15:38 UTC (permalink / raw)
  To: intel-gfx; +Cc: --cc=andi.shyti, andrzej.hajda, chris.p.wilson, Nirmoy Das

Fix the __intel_wakeref_put() doc to reflect current behaviour.

Fixes: c7302f204490 ("drm/i915: Defer final intel_wakeref_put to process context")
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/intel_wakeref.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
index 4f4c2e15e736..b5e1c61b5003 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.h
+++ b/drivers/gpu/drm/i915/intel_wakeref.h
@@ -135,14 +135,12 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
  * @flags: control flags
  *
  * Release our hold on the wakeref. When there are no more users,
- * the runtime pm wakeref will be released after the @fn callback is called
- * underneath the wakeref mutex.
+ * the runtime pm wakeref will be released after the intel_wakeref_ops->put()
+ * callback is called underneath the wakeref mutex.
  *
- * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
- * is retained and an error reported.
+ * Note that intel_wakeref_ops->put() is allowed to fail, in which case the
+ * runtime-pm wakeref is retained.
  *
- * Returns: 0 if the wakeref was released successfully, or a negative error
- * code otherwise.
  */
 static inline void
 __intel_wakeref_put(struct intel_wakeref *wf, unsigned long flags)
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Update doc for __intel_wakeref_put()
  2023-01-05 15:38 [Intel-gfx] [PATCH] drm/i915: Update doc for __intel_wakeref_put() Nirmoy Das
@ 2023-01-05 16:29 ` Dixit, Ashutosh
  2023-01-05 17:47   ` Andi Shyti
  0 siblings, 1 reply; 4+ messages in thread
From: Dixit, Ashutosh @ 2023-01-05 16:29 UTC (permalink / raw)
  To: Nirmoy Das; +Cc: intel-gfx, chris.p.wilson, andrzej.hajda

On Thu, 05 Jan 2023 07:38:31 -0800, Nirmoy Das wrote:
>

Hi Nirmoy,

> Fix the __intel_wakeref_put() doc to reflect current behaviour.
>
> Fixes: c7302f204490 ("drm/i915: Defer final intel_wakeref_put to process context")

Seems to be d91e657876a9?

> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_wakeref.h | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> index 4f4c2e15e736..b5e1c61b5003 100644
> --- a/drivers/gpu/drm/i915/intel_wakeref.h
> +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> @@ -135,14 +135,12 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
>   * @flags: control flags
>   *
>   * Release our hold on the wakeref. When there are no more users,
> - * the runtime pm wakeref will be released after the @fn callback is called
> - * underneath the wakeref mutex.
> + * the runtime pm wakeref will be released after the intel_wakeref_ops->put()
> + * callback is called underneath the wakeref mutex.
>   *
> - * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
> - * is retained and an error reported.
> + * Note that intel_wakeref_ops->put() is allowed to fail, in which case the
> + * runtime-pm wakeref is retained.

@fn is used in multiple places in this file (including some 'get' usages)
so maybe needs to be fixed there too. Maybe better to just say somewhere
@fn refers to ops->get()/put() where applicable?

>   *
> - * Returns: 0 if the wakeref was released successfully, or a negative error
> - * code otherwise.

So this seems to be the reason for the patch...

>   */
>  static inline void
>  __intel_wakeref_put(struct intel_wakeref *wf, unsigned long flags)
> --
> 2.38.0
>

Thanks.
--
Ashutosh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Update doc for __intel_wakeref_put()
  2023-01-05 16:29 ` Dixit, Ashutosh
@ 2023-01-05 17:47   ` Andi Shyti
  2023-01-05 19:48     ` Das, Nirmoy
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Shyti @ 2023-01-05 17:47 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: intel-gfx, chris.p.wilson, andrzej.hajda, Nirmoy Das

Hi,

On Thu, Jan 05, 2023 at 08:29:26AM -0800, Dixit, Ashutosh wrote:
> On Thu, 05 Jan 2023 07:38:31 -0800, Nirmoy Das wrote:
> >
> 
> Hi Nirmoy,
> 
> > Fix the __intel_wakeref_put() doc to reflect current behaviour.
> >
> > Fixes: c7302f204490 ("drm/i915: Defer final intel_wakeref_put to process context")
> 
> Seems to be d91e657876a9?

or maybe this: ee33baa831096

> > Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_wakeref.h | 10 ++++------
> >  1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> > index 4f4c2e15e736..b5e1c61b5003 100644
> > --- a/drivers/gpu/drm/i915/intel_wakeref.h
> > +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> > @@ -135,14 +135,12 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
> >   * @flags: control flags
> >   *
> >   * Release our hold on the wakeref. When there are no more users,
> > - * the runtime pm wakeref will be released after the @fn callback is called
> > - * underneath the wakeref mutex.
> > + * the runtime pm wakeref will be released after the intel_wakeref_ops->put()
> > + * callback is called underneath the wakeref mutex.
> >   *
> > - * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
> > - * is retained and an error reported.
> > + * Note that intel_wakeref_ops->put() is allowed to fail, in which case the
> > + * runtime-pm wakeref is retained.
> 
> @fn is used in multiple places in this file (including some 'get' usages)
> so maybe needs to be fixed there too. Maybe better to just say somewhere
> @fn refers to ops->get()/put() where applicable?

yeah... as Nirmoy is at it, I think he can take care of the rest,
would you, Nirmoy?

> >   *
> > - * Returns: 0 if the wakeref was released successfully, or a negative error
> > - * code otherwise.
> 
> So this seems to be the reason for the patch...

yeah and as for this patch, with the correct "Fixes:" above:

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Andi

> >   */
> >  static inline void
> >  __intel_wakeref_put(struct intel_wakeref *wf, unsigned long flags)
> > --
> > 2.38.0
> >
> 
> Thanks.
> --
> Ashutosh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Update doc for __intel_wakeref_put()
  2023-01-05 17:47   ` Andi Shyti
@ 2023-01-05 19:48     ` Das, Nirmoy
  0 siblings, 0 replies; 4+ messages in thread
From: Das, Nirmoy @ 2023-01-05 19:48 UTC (permalink / raw)
  To: Andi Shyti, Dixit, Ashutosh
  Cc: intel-gfx, andrzej.hajda, chris.p.wilson, Nirmoy Das

Hi Andi and Ashutosh,

On 1/5/2023 6:47 PM, Andi Shyti wrote:
<snip>
>>>    *
>>> - * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
>>> - * is retained and an error reported.
>>> + * Note that intel_wakeref_ops->put() is allowed to fail, in which case the
>>> + * runtime-pm wakeref is retained.
>> @fn is used in multiple places in this file (including some 'get' usages)
>> so maybe needs to be fixed there too. Maybe better to just say somewhere
>> @fn refers to ops->get()/put() where applicable?
> yeah... as Nirmoy is at it, I think he can take care of the rest,
> would you, Nirmoy?


Sorry I missed that. I will squash everything into one patch.


Thanks,

Nirmoy


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-05 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-05 15:38 [Intel-gfx] [PATCH] drm/i915: Update doc for __intel_wakeref_put() Nirmoy Das
2023-01-05 16:29 ` Dixit, Ashutosh
2023-01-05 17:47   ` Andi Shyti
2023-01-05 19:48     ` Das, Nirmoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox