• Daniel Vetter's avatar
    drm/i915: unload: fix error_work races · bc0c7f14
    Daniel Vetter authored
    This is the first patch to clean up module unload races due to
    outstanding timers/work. Preparatory step: Thou shalt not destroy
    the workqueue when new work might still get enqued.
    
    Now error_work gets queued by the hangcheck timer and only (atomically)
    reads the chip wedged status. So cancel it right after the hangcheck
    timer is killed. But the hangcheck is armed by interrupts, so move
    everything after irqs are disabled.
    
    Also change a del_timer to a del_timer_sync in the ums gem code, the
    hangcheck timer is self-rearming.
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    bc0c7f14
i915_gem.c 132 KB