drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt, v2
authorEgbert Eich <eich@suse.de>
Wed, 23 Sep 2015 14:15:27 +0000 (16:15 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Sep 2015 14:56:30 +0000 (16:56 +0200)
commit0706f17c307b056ff6f1848320ba82d76945a6ff
tree8cbb6ee4a94746516faac04e1eb43363aa088cee
parent8204502a6aa2eab8cd5779020c2881fbc6361a96
drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt, v2

An HPD interrupt may fire while we are in a function that changes
the PORT_HOTPLUG_EN register - especially when an HPD interrupt
storm occurs.
Since the interrupt handler changes the enabled HPD lines when it
detects such a storm the read-modify-write cycles may interfere.
To avoid this, shiled the rmw cycles with IRQ save spinlocks.

Changes since v1:
- Implement a function which takes care of accessing PORT_HOTPLUG_EN.

Signed-off-by: Egbert Eich <eich@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_crt.c