linux_dsm_epyc7002/drivers
Jon Bloomfield 0ef34ad622 drm/i915: Serialize GTT/Aperture accesses on BXT
BXT has a H/W issue with IOMMU which can lead to system hangs when
Aperture accesses are queued within the GAM behind GTT Accesses.

This patch avoids the condition by wrapping all GTT updates in stop_machine
and using a flushing read prior to restarting the machine.

The stop_machine guarantees no new Aperture accesses can begin while
the PTE writes are being emmitted. The flushing read ensures that
any following Aperture accesses cannot begin until the PTE writes
have been cleared out of the GAM's fifo.

Only FOLLOWING Aperture accesses need to be separated from in flight
PTE updates. PTE Writes may follow tightly behind already in flight
Aperture accesses, so no flushing read is required at the start of
a PTE update sequence.

This issue was reproduced by running
	igt/gem_readwrite and
	igt/gem_render_copy
simultaneously from different processes, each in a tight loop,
with INTEL_IOMMU enabled.

This patch was originally published as:
	drm/i915: Serialize GTT Updates on BXT

v2: Move bxt/iommu detection into static function
    Remove #ifdef CONFIG_INTEL_IOMMU protection
    Make function names more reflective of purpose
    Move flushing read into static function

v3: Tidy up for checkpatch.pl

Testcase: igt/gem_concurrent_blit
Signed-off-by: Jon Bloomfield <jon.bloomfield@intel.com>
Cc: John Harrison <john.C.Harrison@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1495641251-30022-1-git-send-email-jon.bloomfield@intel.com
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-25 12:45:50 +01:00
..
accessibility
acpi Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm 2017-04-15 14:07:03 -07:00
amba
android
ata sata_via: Enable hotplug only on VT6421 2017-04-11 09:12:18 +09:00
atm
auxdisplay
base
bcma
block zram: do not use copy_page with non-page aligned address 2017-04-13 18:24:21 -07:00
bluetooth
bus
cdrom
char Linux 4.11-rc7 2017-04-19 11:07:14 +10:00
clk
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-04-02 09:22:03 -07:00
connector
cpufreq cpufreq: Bring CPUs up even if cpufreq_online() failed 2017-04-13 03:38:44 +02:00
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-04-10 09:37:43 -07:00
dax device-dax: switch to srcu, fix rcu_read_lock() vs pte allocation 2017-04-12 13:45:18 -07:00
dca
devfreq
dio
dma
dma-buf dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro 2017-04-20 13:47:46 +05:30
edac
eisa
extcon
firewire
firmware efi/libstub: Skip GOP with PIXEL_BLT_ONLY format 2017-04-05 09:20:18 +02:00
fmc
fpga
fsi
gpio
gpu drm/i915: Serialize GTT/Aperture accesses on BXT 2017-05-25 12:45:50 +01:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2017-04-11 23:35:14 -07:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c Linux 4.11-rc6 2017-04-11 07:40:42 +10:00
ide
idle
iio iio: hid-sensor-attributes: Fix sensor property setting failure. 2017-04-02 11:44:03 +01:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-04-11 23:51:58 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2017-04-14 17:51:16 -07:00
iommu
ipack
irqchip irqchip/irq-imx-gpcv2: Fix spinlock initialization 2017-04-14 10:55:05 +02:00
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2017-04-08 11:56:58 -07:00
media dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro 2017-04-20 13:47:46 +05:30
memory
memstick
message
mfd
misc
mmc mmc: sdhci-of-at91: fix MMC_DDR_52 timing selection 2017-03-30 21:10:29 +02:00
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-14 17:38:24 -07:00
nfc
ntb
nubus
nvdimm libnvdimm: band aid btt vs clear poison locking 2017-04-10 17:21:45 -07:00
nvme nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability 2017-04-09 13:58:11 -06:00
nvmem
of
oprofile
parisc
parport
pci Linux 4.11-rc6 2017-04-11 07:40:42 +10:00
pcmcia
perf
phy
pinctrl pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again 2017-04-11 10:09:39 +02:00
platform apple-gmux: Don't switch external DP port on 2011+ MacBook Pros 2017-03-30 22:42:30 +02:00
pnp
power
powercap
pps
ps3
ptp
pwm pwm: rockchip: State of PWM clock should synchronize with PWM enabled state 2017-04-06 15:08:52 +02:00
rapidio drivers/rapidio/devices/tsi721.c: make module parameter variable name unique 2017-03-31 17:13:30 -07:00
ras
regulator
remoteproc
reset reset: add exported __reset_control_get, return NULL if optional 2017-04-04 17:36:10 +02:00
rpmsg
rtc
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-05 20:17:38 -07:00
sbus
scsi SCSI fixes on 20170415 2017-04-15 09:42:14 -07:00
sfi
sh
sn
soc
spi
spmi
ssb
staging Merge tag 'drm-misc-next-fixes-2017-04-20' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-04-21 13:51:59 +10:00
target tcmu: Skip Data-Out blocks before gathering Data-In buffer for BIDI case 2017-04-02 16:18:51 -07:00
tc
thermal
thunderbolt
tty Revert "tty: don't panic on OOM in tty_set_ldisc()" 2017-04-14 10:59:56 +02:00
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-04-11 23:51:58 -07:00
uwb
vfio
vhost
video Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-04-14 16:55:33 -07:00
virt
virtio virtio-pci: Remove affinity hint before freeing the interrupt 2017-04-11 00:30:20 +03:00
vlynq
vme
w1
watchdog
xen xenbus: remove transaction holder from list before freeing 2017-04-04 10:11:06 -04:00
zorro
Kconfig
Makefile