[PATCH] drm/amdgpu: update documentation for amdgpu_irq.c v2
Michel Dänzer
michel at daenzer.net
Wed Jun 13 08:26:59 UTC 2018
On 2018-06-13 12:30 AM, Slava Abramov wrote:
> 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
>
> Signed-off-by: Slava Abramov <slava.abramov at amd.com>
> Acked-by: Christian König <christian.koenig at amd.com>
>
> [...]
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index 3a5ca462abf0..07545fcd2e65 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -25,6 +25,23 @@
> * Alex Deucher
> * Jerome Glisse
> */
> +
> +/**
> + * 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,
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
> + * 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*.
> + * Returns:
> + * result of handling the IRQ, as defined by *irqreturn_t*
Similarly, &irqreturn_t
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the amd-gfx
mailing list