]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work
authorXiaogang Chen <xiaogang.chen@amd.com>
Thu, 25 Feb 2021 17:06:34 +0000 (12:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Mar 2021 19:16:55 +0000 (14:16 -0500)
commit885eaab25a3b52e2897e99b9780c14b3e2f97518
tree4518773f2c5b45fe6cf3827a7dc31c441fc2aa9b
parente0733dad0afb4cf2b97103edbc672e1bf79a5c73
drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work

amdgpu DM handles INTERRUPT_LOW_IRQ_CONTEXT interrupt(hpd, hpd_rx) by using work
queue and uses single work_struct. If new interrupt is recevied before the
previous handler finished, new interrupts(same type) will be discarded and
driver just sends "amdgpu_dm_irq_schedule_work FAILED" message out. If some
important hpd, hpd_rx related interrupts are missed by driver the hot (un)plug
devices may cause system hang or instability, such as issues with system
resume from S3 sleep with mst device connected.

This patch dynamically allocates new amdgpu_dm_irq_handler_data for new
interrupts if previous INTERRUPT_LOW_IRQ_CONTEXT interrupt work has not been
handled. So the new interrupt works can be queued to the same workqueue_struct,
instead of discard the new interrupts. All allocated amdgpu_dm_irq_handler_data
are put into a single linked list and will be reused after.

Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c