diff mbox series

drm/i915: Update docs in intel_wakeref.h

Message ID 20230105203843.30663-1-nirmoy.das@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Update docs in intel_wakeref.h | expand

Commit Message

Nirmoy Das Jan. 5, 2023, 8:38 p.m. UTC
Fix docs for __intel_wakeref_put() and intel_wakeref_get() to
reflect current behaviour.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/i915/intel_wakeref.h | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

Comments

Dixit, Ashutosh Jan. 5, 2023, 8:46 p.m. UTC | #1
On Thu, 05 Jan 2023 12:38:43 -0800, Nirmoy Das wrote:
>
> Fix docs for __intel_wakeref_put() and intel_wakeref_get() to
> reflect current behaviour.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_wakeref.h | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> index 4f4c2e15e736..71b8a63f6f10 100644
> --- a/drivers/gpu/drm/i915/intel_wakeref.h
> +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> @@ -68,11 +68,12 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
>   * @wf: the wakeref
>   *
>   * Acquire a hold on the wakeref. The first user to do so, will acquire
> - * the runtime pm wakeref and then call the @fn underneath the wakeref
> - * mutex.
> + * the runtime pm wakeref and then call the intel_wakeref_ops->get()
> + * underneath the wakeref mutex.
>   *
> - * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
> - * will be released and the acquisition unwound, and an error reported.
> + * Note that intel_wakeref_ops->get() is allowed to fail, in which case
> + * the runtime-pm wakeref will be released and the acquisition unwound,
> + * and an error reported.
>   *
>   * Returns: 0 if the wakeref was acquired successfully, or a negative error
>   * code otherwise.
> @@ -130,19 +131,17 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
>  }
>
>  /**
> - * intel_wakeref_put_flags: Release the wakeref
> + * __intel_wakeref_put: Release the wakeref
>   * @wf: the wakeref
>   * @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
>
Rodrigo Vivi Jan. 6, 2023, 1:06 p.m. UTC | #2
On Thu, Jan 05, 2023 at 12:46:17PM -0800, Dixit, Ashutosh wrote:
11;rgb:0000/0000/0000> On Thu, 05 Jan 2023 12:38:43 -0800, Nirmoy Das wrote:
> >
> > Fix docs for __intel_wakeref_put() and intel_wakeref_get() to
> > reflect current behaviour.
> 
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

pushed, thanks for the patch and review

> 
> > Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_wakeref.h | 21 ++++++++++-----------
> >  1 file changed, 10 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> > index 4f4c2e15e736..71b8a63f6f10 100644
> > --- a/drivers/gpu/drm/i915/intel_wakeref.h
> > +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> > @@ -68,11 +68,12 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
> >   * @wf: the wakeref
> >   *
> >   * Acquire a hold on the wakeref. The first user to do so, will acquire
> > - * the runtime pm wakeref and then call the @fn underneath the wakeref
> > - * mutex.
> > + * the runtime pm wakeref and then call the intel_wakeref_ops->get()
> > + * underneath the wakeref mutex.
> >   *
> > - * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
> > - * will be released and the acquisition unwound, and an error reported.
> > + * Note that intel_wakeref_ops->get() is allowed to fail, in which case
> > + * the runtime-pm wakeref will be released and the acquisition unwound,
> > + * and an error reported.
> >   *
> >   * Returns: 0 if the wakeref was acquired successfully, or a negative error
> >   * code otherwise.
> > @@ -130,19 +131,17 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
> >  }
> >
> >  /**
> > - * intel_wakeref_put_flags: Release the wakeref
> > + * __intel_wakeref_put: Release the wakeref
> >   * @wf: the wakeref
> >   * @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
> >
Andi Shyti Jan. 9, 2023, 1:57 p.m. UTC | #3
Hi Nirmoy,

On Thu, Jan 05, 2023 at 09:38:43PM +0100, Nirmoy Das wrote:
> Fix docs for __intel_wakeref_put() and intel_wakeref_get() to
> reflect current behaviour.
> 
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>

Thanks for adding also the change suggested by Ashutosh!

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

Andi

> ---
>  drivers/gpu/drm/i915/intel_wakeref.h | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> index 4f4c2e15e736..71b8a63f6f10 100644
> --- a/drivers/gpu/drm/i915/intel_wakeref.h
> +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> @@ -68,11 +68,12 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
>   * @wf: the wakeref
>   *
>   * Acquire a hold on the wakeref. The first user to do so, will acquire
> - * the runtime pm wakeref and then call the @fn underneath the wakeref
> - * mutex.
> + * the runtime pm wakeref and then call the intel_wakeref_ops->get()
> + * underneath the wakeref mutex.
>   *
> - * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
> - * will be released and the acquisition unwound, and an error reported.
> + * Note that intel_wakeref_ops->get() is allowed to fail, in which case
> + * the runtime-pm wakeref will be released and the acquisition unwound,
> + * and an error reported.
>   *
>   * Returns: 0 if the wakeref was acquired successfully, or a negative error
>   * code otherwise.
> @@ -130,19 +131,17 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
>  }
>  
>  /**
> - * intel_wakeref_put_flags: Release the wakeref
> + * __intel_wakeref_put: Release the wakeref
>   * @wf: the wakeref
>   * @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
Nirmoy Das Jan. 10, 2023, 10:10 a.m. UTC | #4
On 1/9/2023 2:57 PM, Andi Shyti wrote:
> Hi Nirmoy,
>
> On Thu, Jan 05, 2023 at 09:38:43PM +0100, Nirmoy Das wrote:
>> Fix docs for __intel_wakeref_put() and intel_wakeref_get() to
>> reflect current behaviour.
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> Thanks for adding also the change suggested by Ashutosh!
>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>


Thanks for reviewing it, Andi!


Nirmoy

>
> Andi
>
>> ---
>>   drivers/gpu/drm/i915/intel_wakeref.h | 21 ++++++++++-----------
>>   1 file changed, 10 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
>> index 4f4c2e15e736..71b8a63f6f10 100644
>> --- a/drivers/gpu/drm/i915/intel_wakeref.h
>> +++ b/drivers/gpu/drm/i915/intel_wakeref.h
>> @@ -68,11 +68,12 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
>>    * @wf: the wakeref
>>    *
>>    * Acquire a hold on the wakeref. The first user to do so, will acquire
>> - * the runtime pm wakeref and then call the @fn underneath the wakeref
>> - * mutex.
>> + * the runtime pm wakeref and then call the intel_wakeref_ops->get()
>> + * underneath the wakeref mutex.
>>    *
>> - * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
>> - * will be released and the acquisition unwound, and an error reported.
>> + * Note that intel_wakeref_ops->get() is allowed to fail, in which case
>> + * the runtime-pm wakeref will be released and the acquisition unwound,
>> + * and an error reported.
>>    *
>>    * Returns: 0 if the wakeref was acquired successfully, or a negative error
>>    * code otherwise.
>> @@ -130,19 +131,17 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
>>   }
>>   
>>   /**
>> - * intel_wakeref_put_flags: Release the wakeref
>> + * __intel_wakeref_put: Release the wakeref
>>    * @wf: the wakeref
>>    * @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
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
index 4f4c2e15e736..71b8a63f6f10 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.h
+++ b/drivers/gpu/drm/i915/intel_wakeref.h
@@ -68,11 +68,12 @@  void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
  * @wf: the wakeref
  *
  * Acquire a hold on the wakeref. The first user to do so, will acquire
- * the runtime pm wakeref and then call the @fn underneath the wakeref
- * mutex.
+ * the runtime pm wakeref and then call the intel_wakeref_ops->get()
+ * underneath the wakeref mutex.
  *
- * Note that @fn is allowed to fail, in which case the runtime-pm wakeref
- * will be released and the acquisition unwound, and an error reported.
+ * Note that intel_wakeref_ops->get() is allowed to fail, in which case
+ * the runtime-pm wakeref will be released and the acquisition unwound,
+ * and an error reported.
  *
  * Returns: 0 if the wakeref was acquired successfully, or a negative error
  * code otherwise.
@@ -130,19 +131,17 @@  intel_wakeref_might_get(struct intel_wakeref *wf)
 }
 
 /**
- * intel_wakeref_put_flags: Release the wakeref
+ * __intel_wakeref_put: Release the wakeref
  * @wf: the wakeref
  * @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)