]> git.ipfire.org Git - people/ms/linux.git/commit
drm/i915: set vblank enabled flag correctly across IRQ install/uninstall
authorJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 6 Jan 2009 18:21:24 +0000 (10:21 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 23 Mar 2009 21:55:30 +0000 (14:55 -0700)
commit01e27a293ece260b0a40a61195d2e2ce046c565b
treef050f7118a41c5e03a7e08aa33483860cb55a483
parentf16b678a669cdd1cfb7488144c4af924a24e244b
drm/i915: set vblank enabled flag correctly across IRQ install/uninstall

commit dc1336ff4fe08ae7cfe8301bfd7f0b2cfd31d20a upstream.

In the absence of kernel mode setting, many drivers disable IRQs across VT
switch.  The core DRM vblank code is missing a check for this case however;
even after IRQ disable, the vblank code will still have the vblank_enabled
flag set, so unless we track the fact that they're disabled at IRQ uninstall
time, when we VT switch back in we won't actually re-enable them, which means
any apps waiting on vblank before the switch will hang.

This patch does that and also adds a sanity check to the wait condition to
look for the irq_enabled flag in general, as well as adding a wakeup to the
IRQ uninstall path.

Fixes fdo bug #18879 with compiz hangs at VT switch.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/drm_irq.c