Revision 44498aea293b37af1d463acd9658cdce1ecdf427 authored by Paulo Zanoni on 22 February 2013, 20:05:28 UTC, committed by Daniel Vetter on 05 March 2013, 19:06:22 UTC
From the docs: "IIR can queue up to two interrupt events. When the IIR is cleared, it will set itself again after one clock if a second event was stored." "Only the rising edge of the PCH Display interrupt will cause the North Display IIR (DEIIR) PCH Display Interrupt even bit to be set, so all PCH Display Interrupts, including back to back interrupts, must be cleared before a new PCH Display interrupt can cause DEIIR to be set". The current code works fine because we don't get many interrupts, but if we enable the PCH FIFO underrun interrupts we'll start getting so many interrupts that at some point new PCH interrupts won't cause DEIIR to be set. The initial implementation I tried was to turn the code that checks SDEIIR into a loop, but we can still get interrupts even after the loop is done (and before the irq handler finishes), so we have to either disable the interrupts or mask them. In the end I concluded that just disabling the PCH interrupts is enough, you don't even need the loop, so this is what this patch implements. I've tested it and it passes the 2 "PCH FIFO underrun interrupt storms" I can reproduce: the "ironlake_crtc_disable" case and the "wrong watermarks" case. In other words, here's how to reproduce the problem fixed by this patch: 1 - Enable PCH FIFO underrun interrupts (SERR_INT on SNB+) 2 - Boot the machine 3 - While booting we'll get tons of PCH FIFO underrun interrupts 4 - Plug a new monitor 5 - Run xrandr, notice it won't detect the new monitor 6 - Read SDEIIR and notice it's not 0 while DEIIR is 0 Q: Can't we just clear DEIIR before SDEIIR? A: It doesn't work. SDEIIR has to be completely cleared (including the interrupts stored on its back queue) before it can flip DEIIR's bit to 1 again, and even while you're clearing it you'll be getting more and more interrupts. Q: Why does it work by just disabling+enabling the south interrupts? A: Because when we re-enable them, if there's something on the SDEIIR register (maybe an interrupt stored on the queue), the re-enabling will make DEIIR's bit flip to 1, and since we'll already have interrupts enabled we'll get another interrupt, then run our irq handler again to process the "back" interrupts. v2: Even bigger commit message, added code comments. Note that this fixes missed dp aux irqs which have been reported for 3.9-rc1. This regression has been introduced by switching to irq-driven dp aux transactions with commit 9ee32fea5fe810ec06af3a15e4c65478de56d4f5 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sat Dec 1 13:53:48 2012 +0100 drm/i915: irq-drive the dp aux communication References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg18588.html References: https://lkml.org/lkml/2013/2/26/769 Tested-by: Imre Deak <imre.deak@intel.com> Reported-by: Sedat Dilek <sedat.dilek@gmail.com> Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [danvet: Pimp commit message with references for the dp aux irq timeout regression this fixes.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 1523909
File | Mode | Size |
---|---|---|
ABI | ||
DocBook | ||
EDID | ||
PCI | ||
RCU | ||
accounting | ||
acpi | ||
aoe | ||
arm | ||
arm64 | ||
auxdisplay | ||
backlight | ||
blackfin | ||
block | ||
blockdev | ||
bus-devices | ||
cdrom | ||
cgroups | ||
connector | ||
console | ||
cpu-freq | ||
cpuidle | ||
cris | ||
crypto | ||
development-process | ||
device-mapper | ||
devicetree | ||
driver-model | ||
dvb | ||
early-userspace | ||
extcon | ||
fault-injection | ||
fb | ||
filesystems | ||
firmware_class | ||
frv | ||
hid | ||
hwmon | ||
i2c | ||
i2o | ||
ia64 | ||
ide | ||
infiniband | ||
input | ||
ioctl | ||
isdn | ||
ja_JP | ||
kbuild | ||
kdump | ||
ko_KR | ||
laptops | ||
leds | ||
m68k | ||
make | ||
memory-devices | ||
mips | ||
misc-devices | ||
mmc | ||
mn10300 | ||
mtd | ||
namespaces | ||
netlabel | ||
networking | ||
nfc | ||
parisc | ||
pcmcia | ||
power | ||
powerpc | ||
pps | ||
prctl | ||
pti | ||
ptp | ||
rapidio | ||
s390 | ||
scheduler | ||
scsi | ||
security | ||
serial | ||
sh | ||
sound | ||
spi | ||
sysctl | ||
target | ||
thermal | ||
timers | ||
trace | ||
usb | ||
vDSO | ||
video4linux | ||
virtual | ||
vm | ||
w1 | ||
watchdog | ||
wimax | ||
x86 | ||
xtensa | ||
zh_CN | ||
.gitignore | -rw-r--r-- | 107 bytes |
00-INDEX | -rw-r--r-- | 11.7 KB |
BUG-HUNTING | -rw-r--r-- | 8.1 KB |
Changes | -rw-r--r-- | 11.7 KB |
CodingStyle | -rw-r--r-- | 30.9 KB |
DMA-API-HOWTO.txt | -rw-r--r-- | 31.3 KB |
DMA-API.txt | -rw-r--r-- | 27.3 KB |
DMA-ISA-LPC.txt | -rw-r--r-- | 5.2 KB |
DMA-attributes.txt | -rw-r--r-- | 4.5 KB |
HOWTO | -rw-r--r-- | 27.2 KB |
IPMI.txt | -rw-r--r-- | 25.9 KB |
IRQ-affinity.txt | -rw-r--r-- | 2.5 KB |
IRQ-domain.txt | -rw-r--r-- | 6.9 KB |
IRQ.txt | -rw-r--r-- | 962 bytes |
Intel-IOMMU.txt | -rw-r--r-- | 3.8 KB |
Makefile | -rw-r--r-- | 174 bytes |
ManagementStyle | -rw-r--r-- | 12.9 KB |
SAK.txt | -rw-r--r-- | 2.8 KB |
SM501.txt | -rw-r--r-- | 2.8 KB |
SecurityBugs | -rw-r--r-- | 1.8 KB |
SubmitChecklist | -rw-r--r-- | 4.4 KB |
SubmittingDrivers | -rw-r--r-- | 6.3 KB |
SubmittingPatches | -rw-r--r-- | 28.6 KB |
VGA-softcursor.txt | -rw-r--r-- | 2.0 KB |
applying-patches.txt | -rw-r--r-- | 19.5 KB |
atomic_ops.txt | -rw-r--r-- | 21.6 KB |
bad_memory.txt | -rw-r--r-- | 1.1 KB |
basic_profiling.txt | -rw-r--r-- | 1.7 KB |
binfmt_misc.txt | -rw-r--r-- | 5.9 KB |
braille-console.txt | -rw-r--r-- | 1.4 KB |
bt8xxgpio.txt | -rw-r--r-- | 4.3 KB |
btmrvl.txt | -rw-r--r-- | 2.9 KB |
bus-virt-phys-mapping.txt | -rw-r--r-- | 7.9 KB |
cachetlb.txt | -rw-r--r-- | 17.1 KB |
circular-buffers.txt | -rw-r--r-- | 7.6 KB |
clk.txt | -rw-r--r-- | 8.5 KB |
coccinelle.txt | -rw-r--r-- | 8.1 KB |
cpu-hotplug.txt | -rw-r--r-- | 15.6 KB |
cpu-load.txt | -rw-r--r-- | 3.0 KB |
cputopology.txt | -rw-r--r-- | 3.8 KB |
crc32.txt | -rw-r--r-- | 8.5 KB |
dcdbas.txt | -rw-r--r-- | 3.6 KB |
debugging-modules.txt | -rw-r--r-- | 954 bytes |
debugging-via-ohci1394.txt | -rw-r--r-- | 7.4 KB |
dell_rbu.txt | -rw-r--r-- | 4.9 KB |
devices.txt | -rw-r--r-- | 115.9 KB |
digsig.txt | -rw-r--r-- | 2.8 KB |
dma-buf-sharing.txt | -rw-r--r-- | 19.5 KB |
dmaengine.txt | -rw-r--r-- | 7.6 KB |
dontdiff | -rw-r--r-- | 2.5 KB |
dynamic-debug-howto.txt | -rw-r--r-- | 11.8 KB |
edac.txt | -rw-r--r-- | 24.3 KB |
eisa.txt | -rw-r--r-- | 7.1 KB |
email-clients.txt | -rw-r--r-- | 8.6 KB |
flexible-arrays.txt | -rw-r--r-- | 5.5 KB |
futex-requeue-pi.txt | -rw-r--r-- | 5.0 KB |
gcov.txt | -rw-r--r-- | 7.5 KB |
gpio.txt | -rw-r--r-- | 34.1 KB |
highuid.txt | -rw-r--r-- | 2.4 KB |
hw_random.txt | -rw-r--r-- | 3.5 KB |
hwspinlock.txt | -rw-r--r-- | 12.1 KB |
init.txt | -rw-r--r-- | 2.5 KB |
initrd.txt | -rw-r--r-- | 14.1 KB |
intel_txt.txt | -rw-r--r-- | 10.2 KB |
io-mapping.txt | -rw-r--r-- | 3.2 KB |
io_ordering.txt | -rw-r--r-- | 1.9 KB |
iostats.txt | -rw-r--r-- | 7.9 KB |
irqflags-tracing.txt | -rw-r--r-- | 2.6 KB |
isapnp.txt | -rw-r--r-- | 433 bytes |
java.txt | -rw-r--r-- | 10.7 KB |
kernel-doc-nano-HOWTO.txt | -rw-r--r-- | 11.6 KB |
kernel-docs.txt | -rw-r--r-- | 33.1 KB |
kernel-parameters.txt | -rw-r--r-- | 110.5 KB |
kmemcheck.txt | -rw-r--r-- | 29.8 KB |
kmemleak.txt | -rw-r--r-- | 7.9 KB |
kobject.txt | -rw-r--r-- | 17.8 KB |
kprobes.txt | -rw-r--r-- | 29.5 KB |
kref.txt | -rw-r--r-- | 8.4 KB |
ldm.txt | -rw-r--r-- | 3.8 KB |
local_ops.txt | -rw-r--r-- | 6.1 KB |
lockdep-design.txt | -rw-r--r-- | 11.6 KB |
lockstat.txt | -rw-r--r-- | 10.7 KB |
lockup-watchdogs.txt | -rw-r--r-- | 3.1 KB |
logo.gif | -rw-r--r-- | 16.0 KB |
logo.txt | -rw-r--r-- | 563 bytes |
magic-number.txt | -rw-r--r-- | 9.7 KB |
md.txt | -rw-r--r-- | 25.4 KB |
media-framework.txt | -rw-r--r-- | 14.7 KB |
memory-barriers.txt | -rw-r--r-- | 82.4 KB |
memory-hotplug.txt | -rw-r--r-- | 15.9 KB |
mono.txt | -rw-r--r-- | 2.5 KB |
mutex-design.txt | -rw-r--r-- | 5.8 KB |
nommu-mmap.txt | -rw-r--r-- | 12.7 KB |
numastat.txt | -rw-r--r-- | 836 bytes |
oops-tracing.txt | -rw-r--r-- | 12.5 KB |
padata.txt | -rw-r--r-- | 7.3 KB |
parport-lowlevel.txt | -rw-r--r-- | 32.2 KB |
parport.txt | -rw-r--r-- | 8.8 KB |
percpu-rw-semaphore.txt | -rw-r--r-- | 1.1 KB |
pi-futex.txt | -rw-r--r-- | 5.7 KB |
pinctrl.txt | -rw-r--r-- | 40.4 KB |
pnp.txt | -rw-r--r-- | 6.8 KB |
preempt-locking.txt | -rw-r--r-- | 5.2 KB |
printk-formats.txt | -rw-r--r-- | 5.4 KB |
pwm.txt | -rw-r--r-- | 2.9 KB |
ramoops.txt | -rw-r--r-- | 4.6 KB |
rbtree.txt | -rw-r--r-- | 13.3 KB |
remoteproc.txt | -rw-r--r-- | 12.3 KB |
rfkill.txt | -rw-r--r-- | 4.7 KB |
robust-futex-ABI.txt | -rw-r--r-- | 8.7 KB |
robust-futexes.txt | -rw-r--r-- | 9.4 KB |
rpmsg.txt | -rw-r--r-- | 13.5 KB |
rt-mutex-design.txt | -rw-r--r-- | 32.8 KB |
rt-mutex.txt | -rw-r--r-- | 3.5 KB |
rtc.txt | -rw-r--r-- | 15.5 KB |
serial-console.txt | -rw-r--r-- | 4.0 KB |
sgi-ioc4.txt | -rw-r--r-- | 2.0 KB |
sgi-visws.txt | -rw-r--r-- | 678 bytes |
smsc_ece1099.txt | -rw-r--r-- | 2.4 KB |
sparse.txt | -rw-r--r-- | 3.8 KB |
spinlocks.txt | -rw-r--r-- | 6.5 KB |
stable_api_nonsense.txt | -rw-r--r-- | 9.2 KB |
stable_kernel_rules.txt | -rw-r--r-- | 4.4 KB |
static-keys.txt | -rw-r--r-- | 11.9 KB |
svga.txt | -rw-r--r-- | 14.1 KB |
sysfs-rules.txt | -rw-r--r-- | 8.1 KB |
sysrq.txt | -rw-r--r-- | 11.6 KB |
unaligned-memory-access.txt | -rw-r--r-- | 10.0 KB |
unicode.txt | -rw-r--r-- | 6.5 KB |
unshare.txt | -rw-r--r-- | 13.1 KB |
vfio.txt | -rw-r--r-- | 13.6 KB |
vgaarbiter.txt | -rw-r--r-- | 8.1 KB |
video-output.txt | -rw-r--r-- | 1.1 KB |
vme_api.txt | -rw-r--r-- | 13.1 KB |
volatile-considered-harmful.txt | -rw-r--r-- | 5.6 KB |
workqueue.txt | -rw-r--r-- | 14.9 KB |
xz.txt | -rw-r--r-- | 5.7 KB |
zorro.txt | -rw-r--r-- | 2.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...