Skip to contentSkip to conversation

drm/amdgpu: update documentation for amdgpu_irq.c v2

PATCH In review Slava Abramov 2 participants 2 messages Jun 12, 2018 – Jun 13, 2018 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: update documentation for amdgpu_irq.c v2

Add/update function level documentation and add reference to amdgpu_irq.c in amdgpu.rst

v2:
Added DOC comment
Added more explanations for amdgpu_hotplug_work_func Properly formatted unused parameters Properly formatted return values
Fixed usage of acronyms
More consistent styling

---
 Documentation/gpu/amdgpu.rst            |   8 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 202 ++++++++++++++++++++++----------
 2 files changed, 147 insertions(+), 63 deletions(-)
Documentation/gpu/amdgpu.rst +8 -0
index 3ffb2a226fae..abf87360ab15 100644
@@ -52,4 +52,12 @@ AMDGPU Virtual Memory
    :doc: GPUVM
 
 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+
+Interrupt Handling
+------------------
+
+.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+   :doc: Interrupt Handling
+
+.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
    :internal:
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +139 -63

402 lines not on this page · raw message

Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180612223017.25980-1-slava.abramov-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 25 lines · Slava Abramov

Add/update function level documentation and add reference to amdgpu_irq.c in amdgpu.rst

v2:
Added DOC comment
Added more explanations for amdgpu_hotplug_work_func Properly formatted unused parameters Properly formatted return values
Fixed usage of acronyms
More consistent styling

[...]

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +1 -0
index 3a5ca462abf0..07545fcd2e65 100644
@@ -25,6 +25,23 @@
  *          Alex Deucher
  *          Jerome Glisse
  */
+

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c line 38

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +10 -0
+/**
+ * DOC: Interrupt Handling
+ *
+ * Interrupts generated within GPU hardware raise interrupt requests that are
+ * passed to amdgpu IRQ handler which is responsible for detecting source and
+ * type of the interrupt and dispatching matching handlers. If handling an
+ * interrupt requires calling kernel functions that may sleep processing is
+ * dispatched to work handlers.
+ *
+ * If MSI functionality is not not disabled by module parameter then MSI

Duplicate "not"

With that fixed,

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c line 77

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +4 -0
+ * This design approach is required in order to defer hotplug event handling
+ * from the IRQ handler to a work handler because hotplug handler has to use
+ * mutexes which cannot be locked in an IRQ handler (since *mutex_lock* may
+ * sleep).

Maybe use &mutex_lock (referencing the documentation of that function) instead of *mutex_lock*.

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c void amdgpu_irq_disable_all(struct amdgpu_device *adev) · line 158

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +2 -0
+ * Returns:
+ * result of handling the IRQ, as defined by *irqreturn_t*

Similarly, &irqreturn_t

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx