• Daniel Vetter's avatar
    drm/i915: unload: fix hotplug_work races · 6c0d9350
    Daniel Vetter authored
    hotplug_work is queued by the hotplug interrupt and only either emits
    a hotplug uevent or queues a crt poll slow-work. No other locking.  So
    it's safe to cancel this work _after_ irq's have been turned off.  But
    before the modesetting objects are destroyed because the hotplug
    function accesses them (without locking).
    
    The current code (for kms) only switches irqs off after modesetting
    teardown, hence move the irq teardown into the modeset cleanup right
    before the crtc cleanup.
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    6c0d9350
i915_dma.c 62.1 KB