1
0
Fork 0
alistair23-linux/drivers
Chris Wilson d6bbafa183 drm/i915: Check for a stalled page flip after each vblank
Long ago, back in the racy haydays of 915gm interrupt handling, page
flips would occasionally go astray and leave the hardware stuck, and the
display not updating. This annoyed people who relied on their systems
being able to display continuously updating information 24/7, and so
some code to detect when the driver missed the page flip completion
signal was added. Until recently, it was presumed that the interrupt
handling was now flawless, but once again Simon Farnsworth has found a
system whose display will stall. Reinstate the pageflip stall detection,
which works by checking to see if the hardware has been updated to the
new framebuffer address following each vblank. If the hardware is
scanning out from the new framebuffer, but we still think the flip is
pending, then we kick our driver into submision.

This is a continuation of the effort started with
commit 4e5359cd05
Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Date:   Wed Sep 1 17:47:52 2010 +0100

    drm/i915: Avoid pageflipping freeze when we miss the flip prepare interrupt

This now includes a belt-and-braces approach to make sure the driver
(or the hardware) doesn't miss an interrupt and cause us to stop
updating the display should the unthinkable happen and the pageflip fail - i.e.
that the user is able to continue submitting flips.

v2: Cleanup, refactor, and rename
v3: Only start counting vblanks after the flip command has been seen by
    the hardware.
v4: Record the seqno after we touch the ring, or else there may be no
    seqno allocated yet.
v5: Rebase on mmio-flip.
v6: Rebase, rebase.

Reported-by: Simon Farnsworth <simon@farnz.org.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75502
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [v4]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-05 09:29:16 +02:00
..
accessibility
acpi More ACPI and power management updates for 3.17-rc1 2014-08-14 18:13:46 -06:00
amba
ata libata: widen Crucial M550 blacklist matching 2014-08-18 17:40:09 -04:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-08-13 18:27:40 -06:00
auxdisplay
base Merge branch 'akpm' (patchbomb from Andrew Morton) 2014-08-06 21:14:42 -07:00
bcma bcma: use NS prefix for names of Northstar specific cores 2014-07-31 13:45:32 -04:00
block PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
bluetooth Bluetooth: Fix crash in the Marvell driver initialization codepath 2014-07-31 01:07:28 +02:00
bus bus: arm-ccn: Fix warning message 2014-08-24 11:28:30 -07:00
cdrom
char virtio: rng: add derating factor for use by hwrng core 2014-08-15 10:26:01 +05:30
clk ARM: SoC platform changes for 3.17 2014-08-08 11:14:29 -07:00
clocksource ARM: SoC platform changes for 3.17 2014-08-08 11:14:29 -07:00
connector
cpufreq More ACPI and power management updates for 3.17-rc1 2014-08-14 18:13:46 -06:00
cpuidle More ACPI and power management updates for 3.17-rc1 2014-08-14 18:13:46 -06:00
crypto PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
dca
devfreq
dio
dma Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-08-11 07:14:01 -07:00
dma-buf
edac Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2014-08-15 17:56:45 -06:00
eisa
extcon
firewire Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-08-06 09:38:14 -07:00
firmware firmware: Do not use WARN_ON(!spin_is_locked()) 2014-08-22 08:45:40 +01:00
fmc
gpio gpio-lynxpoint: enable input sensing in resume 2014-08-21 07:44:57 -05:00
gpu drm/i915: Check for a stalled page flip after each vblank 2014-09-05 09:29:16 +02:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-08-21 14:25:20 -07:00
hsi HSI changes for the v3.17 series 2014-08-06 20:06:14 -07:00
hv Char / Misc driver patches for 3.17-rc1 2014-08-04 17:32:24 -07:00
hwmon Several bug fixes in various drivers, plus a minor cleanup 2014-08-14 09:55:13 -06:00
hwspinlock hwspinlock: enable OMAP build for AM33xx, AM43xx & DRA7xx 2014-07-29 11:46:28 +03:00
i2c i2c: i801: Add PCI ID for Intel Braswell 2014-08-19 10:19:47 -05:00
ide ide: use module_platform_driver() 2014-08-05 21:16:46 -07:00
idle intel_idle: Broadwell support 2014-08-15 17:06:40 -04:00
iio Staging driver patches for 3.17-rc1 2014-08-04 18:36:12 -07:00
infiniband PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-08-15 18:16:28 -06:00
iommu iommu/core: Check for the right function pointer in iommu_map() 2014-08-19 00:19:26 +02:00
ipack
irqchip ARM: SoC platform changes for 3.17 2014-08-08 11:14:29 -07:00
isdn drivers: isdn: eicon: xdi_msg.h: Fix typo in #ifndef 2014-08-22 11:31:30 -07:00
leds ARM: SoC driver changes for 3.17 2014-08-08 11:34:32 -07:00
lguest mm/vmalloc.c: clean up map_vm_area third argument 2014-08-06 18:01:19 -07:00
macintosh == Changes to existing drivers == 2014-08-07 17:23:16 -07:00
mailbox mailbox/omap: add a parent structure for every IP instance 2014-07-29 01:57:25 -07:00
mcb
md md/raid10: always initialise ->state on newly allocated r10_bio 2014-08-19 17:20:27 +10:00
media media: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
memory memory: Freescale CoreNet Coherency Fabric error reporting driver 2014-07-29 19:26:30 -05:00
memstick
message mptfusion: tweak null pointer checks 2014-07-25 17:16:58 -04:00
mfd drivers/mfd/rtsx_usb.c: export device table 2014-08-14 10:56:15 -06:00
misc ARM: SoC driver changes for 3.17 2014-08-08 11:34:32 -07:00
mmc PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
mtd No significant changes, mostly small fixes here and there. The more important 2014-08-13 17:42:11 -06:00
net net: ethernet: broadcom: bnx2x: Remove redundant #ifdef 2014-08-22 11:29:58 -07:00
nfc
ntb
nubus
of of/irq: Fix lookup to use 'interrupts-extended' property first 2014-08-16 09:03:58 +01:00
oprofile
parisc
parport drivers/parport/parport_ip32.c: use PTR_ERR_OR_ZERO 2014-08-08 15:57:25 -07:00
pci PCI changes for v3.17 (part 3): 2014-08-19 09:45:31 -05:00
pcmcia Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-08-07 08:50:34 -07:00
phy ARM: SoC driver changes for 3.17 2014-08-08 11:34:32 -07:00
pinctrl ARM: SoC driver changes for 3.17 2014-08-08 11:34:32 -07:00
platform Revert "platform/x86/toshiba-apci.c possible bad if test?" 2014-08-20 08:18:18 -07:00
pnp ACPI / PNP: Fix acpi_pnp_match() 2014-07-30 00:23:09 +02:00
power ARM: SoC platform changes for 3.17 2014-08-08 11:14:29 -07:00
powercap
pps
ps3
ptp PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
pwm pwm: Fix period and polarity in pwm_get() for non-perfect matches 2014-08-18 10:58:43 +02:00
rapidio PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
ras
regulator == Changes to existing drivers == 2014-08-07 17:17:39 -07:00
remoteproc
reset
rpmsg
rtc Merge branch 'akpm' (second patchbomb from Andrew Morton) 2014-08-08 15:57:47 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2014-08-07 08:41:00 -07:00
sbus Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2014-08-05 18:57:18 -07:00
scsi SCSI fixes on 20140819 2014-08-20 18:20:50 -05:00
sfi
sh sh: intc: Confine SH_INTC to platforms that need it 2014-08-22 12:28:16 +09:00
sn
soc
spi ARM: SoC cleanups for 3.17 2014-08-08 11:00:26 -07:00
spmi
ssb
staging Merge branch 'akpm' (second patchbomb from Andrew Morton) 2014-08-08 15:57:47 -07:00
target SCSI misc on 20140806 2014-08-06 20:10:32 -07:00
tc
thermal
thunderbolt
tty The branch contains the following device tree changes the v3.17 merge 2014-08-14 09:53:39 -06:00
uio
usb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-08-06 21:03:53 -07:00
uwb uwb/whci: use correct structure type name in sizeof 2014-08-01 15:48:08 -07:00
vfio drivers/vfio: Enable VFIO if EEH is not supported 2014-08-08 10:39:16 -06:00
vhost
video Merge tag 'topic/core-stuff-2014-08-15' of git://anongit.freedesktop.org/drm-intel into drm-next 2014-08-26 09:04:03 +10:00
virt
virtio virtio: Replace DEFINE_PCI_DEVICE_TABLE macro use 2014-07-27 21:07:15 +09:30
vlynq
vme vme: bridges: use pci_zalloc_consistent 2014-08-08 15:57:30 -07:00
w1
watchdog Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-08-07 08:47:00 -07:00
xen PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
zorro
Kconfig Char / Misc driver patches for 3.17-rc1 2014-08-04 17:32:24 -07:00
Makefile Driver core patches for 3.17-rc1 2014-08-04 18:34:04 -07:00