• Xiaogang Chen's avatar
    drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work · b6f91fc1
    Xiaogang Chen authored
    
    
    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: default avatarXiaogang Chen <xiaogang.chen@amd.com>
    Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    b6f91fc1
amdgpu_dm.h 13.9 KB