Re: [Intel-gfx] [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt

2015-09-02 Thread Egbert Eich
Daniel Vetter writes: > On Wed, Sep 02, 2015 at 04:19:00PM +0200, Egbert Eich wrote: > > Hm I missed that this same register is also accessed by the irq handler > code, and it's not just that touching these bits can cause interrupts. So > yeah we need your patch, but it needs to be clearer

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt

2015-09-02 Thread Daniel Vetter
On Tue, Sep 01, 2015 at 10:21:35PM +0200, Egbert Eich wrote: > A HPD interrupt may fire during intel_crt_detect_hotplug() - especially > when HPD interrupt storms occur. > Since the interrupt handler changes the enabled interrupt lines when it > detects a storm this races with

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt

2015-09-02 Thread Daniel Vetter
On Wed, Sep 02, 2015 at 04:19:00PM +0200, Egbert Eich wrote: > Daniel Vetter writes: > > On Tue, Sep 01, 2015 at 10:21:35PM +0200, Egbert Eich wrote: > > > A HPD interrupt may fire during intel_crt_detect_hotplug() - especially > > > when HPD interrupt storms occur. > > > Since the interrupt

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt

2015-09-02 Thread Egbert Eich
Jani Nikula writes: > On Wed, 02 Sep 2015, Egbert Eich wrote: > > This is exactly the scenatio I'm getting here. I get HPD interrupts at an > > order of 10^4 / sec. > > Makes you wonder if either you have faulty hardware or we are > configuring the hardware wrong (we

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt

2015-09-02 Thread Egbert Eich
Daniel Vetter writes: > On Tue, Sep 01, 2015 at 10:21:35PM +0200, Egbert Eich wrote: > > A HPD interrupt may fire during intel_crt_detect_hotplug() - especially > > when HPD interrupt storms occur. > > Since the interrupt handler changes the enabled interrupt lines when it > > detects a storm

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt

2015-09-02 Thread Jani Nikula
On Wed, 02 Sep 2015, Egbert Eich wrote: > This is exactly the scenatio I'm getting here. I get HPD interrupts at an > order of 10^4 / sec. Makes you wonder if either you have faulty hardware or we are configuring the hardware wrong (we overlook some configuration about some

[Intel-gfx] [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt

2015-09-01 Thread Egbert Eich
A HPD interrupt may fire during intel_crt_detect_hotplug() - especially when HPD interrupt storms occur. Since the interrupt handler changes the enabled interrupt lines when it detects a storm this races with intel_crt_detect_hotplug(). To avoid this, shiled the rmw cycles with IRQ save spinlocks.