• Daniel Vetter's avatar
    drm/i915: unload: fix idle_timer/idle_work races · 3dec0095
    Daniel Vetter authored
    idle_work wasn't cleaned up at all. It takes &dev->struct_mutex, but
    accesss the mode_config crtc list (without any other locking!). Hence
    this work needs to be canceled before calling drm_mode_config_cleanup.
    
    As evidenced by the kernel's object debuggin code, the current code
    also cleans up the timer to early (it gets rearmed). So move it right
    before the final cleanup (it seems to work).
    
    Also unconditionally set up the idle_timer in intel_increase_pllclock.
    If we're unlucky the timer might fire right away, rendering the call
    in the modesetting teardown pointless.
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    3dec0095
intel_display.c 178 KB