Skip to contentSkip to conversation

drm/i915: Update doc for __intel_wakeref_put()

PATCH In review Nirmoy Das 4 participants 4 messages Jan 5, 2023

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 drm/i915: Update doc for __intel_wakeref_put()

Fix the __intel_wakeref_put() doc to reflect current behaviour.

Fixes c7302f204490 ("drm/i915: Defer final intel_wakeref_put to process context")
---
 drivers/gpu/drm/i915/intel_wakeref.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_wakeref.h +4 -6
index 4f4c2e15e736..b5e1c61b5003 100644
@@ -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)
Signature · 1 line
2.38.0
#1 lore raw
Quoted 1 line · Nirmoy Das

Hi Nirmoy,

Quoted 3 lines

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?

Quoted 12 lines
---
 drivers/gpu/drm/i915/intel_wakeref.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_wakeref.h +0 -0
index 4f4c2e15e736..b5e1c61b5003 100644
@@ -135,14 +135,12 @@ intel_wakeref_might_get(struct intel_wakeref *wf)
  * @flags: control flags
  *

drivers/gpu/drm/i915/intel_wakeref.h intel_wakeref_might_get(struct intel_wakeref *wf) · line 142

Quoted 10 lines
drivers/gpu/drm/i915/intel_wakeref.h +4 -4
  * 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?

drivers/gpu/drm/i915/intel_wakeref.h intel_wakeref_might_get(struct intel_wakeref *wf) · line 145

Quoted 3 lines
drivers/gpu/drm/i915/intel_wakeref.h +0 -2
  *
- * Returns: 0 if the wakeref was released successfully, or a negative error
- * code otherwise.

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

Quoted 6 lines
drivers/gpu/drm/i915/intel_wakeref.h +0 -1
  */
 static inline void
 __intel_wakeref_put(struct intel_wakeref *wf, unsigned long flags)
--

2.38.0

Thanks.
--
Ashutosh

Reviewed-by
#2 lore raw

Hi,

Quoted 10 lines · Ashutosh
Quoted 1 line · Nirmoy Das

Hi Nirmoy,

Quoted 3 lines

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

Quoted 18 lines
Quoted 18 lines
---
 drivers/gpu/drm/i915/intel_wakeref.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_wakeref.h +2 -2
index 4f4c2e15e736..b5e1c61b5003 100644
@@ -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.
  *
Quoted 8 lines

drivers/gpu/drm/i915/intel_wakeref.h intel_wakeref_might_get(struct intel_wakeref *wf) · line 142

Quoted 4 lines
drivers/gpu/drm/i915/intel_wakeref.h +2 -2
- * 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?

Quoted 5 lines

drivers/gpu/drm/i915/intel_wakeref.h intel_wakeref_might_get(struct intel_wakeref *wf) · line 145

Quoted 3 lines
drivers/gpu/drm/i915/intel_wakeref.h +0 -2
  *
- * 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:

Andi

Quoted 10 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_wakeref.h +0 -1
  */
 static inline void
 __intel_wakeref_put(struct intel_wakeref *wf, unsigned long flags)
--

2.38.0

Thanks.
--
Ashutosh

#3 lore raw

Hi Andi and Ashutosh,

On 1/5/2023 6:47 PM, Andi Shyti wrote:
<snip>

Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
   *

- * 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