Jesse Barnes 802c7eb646 drm/i915: sanity check IER at wait_request time
We might sleep here anyway so I hope an extra uncached read is ok to
add.

In #20896 we found that vbetool clobbers the IER.  In KMS mode this is
particularly bad since we don't set the interrupt regs late (in
EnterVT), so we'd fail to get *any* interrupts at all after X started
(since some distros have scripts that call vbetool at X startup
apparently).

So this patch checks IER at wait_request time, and re-enables
interrupts if it's been clobbered.  In a proper config this check
should never be triggered.

This is really a distro issue, but having a sanity check is nice, as
long as it doesn't have a real performance hit.

Tested-by: Mateusz Kaduk <mateusz.kaduk@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[anholt: Moved the check inside of the sleeping case to avoid perf cost]
Signed-off-by: Eric Anholt <eric@anholt.net>
2009-05-14 16:00:27 -07:00
..
2009-04-28 20:24:20 +02:00
2009-04-21 13:41:51 -07:00
2009-04-13 15:04:29 -07:00
2009-04-05 00:32:25 +02:00
2009-04-24 07:52:08 -07:00
2009-04-01 08:59:23 -07:00
2009-04-21 13:41:50 -07:00
2009-04-14 19:46:19 -07:00
2009-04-24 07:52:08 -07:00
2009-04-21 13:41:49 -07:00
2009-04-27 12:00:27 -07:00
2009-04-05 00:32:22 +02:00
2009-04-08 14:25:51 -07:00