]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Replace in_task() in gfx_v8_0_parse_sq_irq()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 9 Feb 2021 12:44:39 +0000 (13:44 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 03:28:08 +0000 (23:28 -0400)
commita344b4d8c2e7a4a490a5a9199cf3876981a76dde
tree7a45d19e8037a7cb447c67804930729ca40cffde
parenteae8ba2f2b60f4ca9f4bf253fd25ec8496320789
drm/amdgpu: Replace in_task() in gfx_v8_0_parse_sq_irq()

gfx_v8_0_parse_sq_irq() is using in_task() to distinguish if it is
invoked from a workqueue worker or directly from the interrupt handler.

The usage of in_interrupt() in drivers is phased out and Linus clearly
requested that code which changes behaviour depending on context should
either be separated or the context be conveyed in an argument passed by the
caller, which usually knows the context.

gfx_v8_0_parse_sq_irq() is invoked directly either from a worker or from
the interrupt service routine. The worker is only bypassed if the worker
is already busy.

Add an argument `from_wq' to gfx_v8_0_parse_sq_irq() which is true if
invoked from the worker.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c