linux/drivers
Mario Kleiner 363926dc9e drm/radeon: Prevent races on pre DCE4 between flip submission and completion.
Pre DCE4 hw doesn't have reliable pageflip completion
interrupts, so instead polling for flip completion is
used from within the vblank irq handler to complete
page flips.

This causes a race if pageflip ioctl is called close to
vblank:

1. pageflip ioctl queues execution of radeon_flip_work_func.

2. vblank irq fires, radeon_crtc_handle_vblank checks for
   flip_status == FLIP_SUBMITTED finds none, no-ops.

3. radeon_flip_work_func runs inside vblank, decides to
   set flip_status == FLIP_SUBMITTED and programs the
   flip into hw.

4. hw executes flip immediately (because in vblank), but
   as 2 already happened, the flip completion routine only
   emits the flip completion event one refresh later ->
   wrong vblank count/timestamp for completion and no
   performance gain, as instead of delaying the flip until
   next vblank, we now delay the next flip by 1 refresh
   while waiting for the delayed flip completion event.

Given we often don't gain anything due to this race, but
lose precision, prevent the programmed flip from executing
in vblank on pre DCE4 asics to avoid this race.

On pre-AVIVO hw we can't program the hw for edge-triggered
flips, they always execute anywhere in vblank. Therefore delay
the actual flip programming until after vblank on pre-AVIVO.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-10-04 11:15:58 -04:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base regmap: Fix for v4.8 2016-09-23 11:50:49 -07:00
bcma
block
bluetooth
bus
cdrom
char Linux 4.8-rc8 2016-09-28 12:08:49 +10:00
clk
clocksource
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma
dma-buf dma-buf/sync_file: free fences array in num_fences is 1 2016-09-22 04:06:16 -07:00
edac
eisa
extcon
firewire
firmware
fmc
fpga
gpio
gpu drm/radeon: Prevent races on pre DCE4 between flip submission and completion. 2016-10-04 11:15:58 -04:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c i2c: qup: skip qup_i2c_suspend if the device is already runtime suspended 2016-09-22 20:11:14 +02:00
ide
idle
iio
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-09-23 16:34:24 -07:00
iommu
ipack
irqchip irqchip/mips-gic: Fix local interrupts 2016-09-20 23:20:02 +02:00
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md
media [media] cx23885/saa7134: assign q->dev to the PCI device 2016-09-19 12:38:05 -03:00
memory
memstick
message
mfd
misc
mmc mmc: dw_mmc: fix the spamming log message 2016-09-22 09:34:13 +02:00
mtd mtd: nand: mxc: fix obiwan error in mxc_nand_v[12]_ooblayout_free() functions 2016-09-19 11:57:12 +02:00
net linux-can-fixes-for-4.8-20160921 2016-09-22 02:47:46 -04:00
nfc
ntb
nubus
nvdimm
nvme nvme-rdma: only clear queue flags after successful connect 2016-09-22 19:58:17 -06:00
nvmem
of
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio rapidio/rio_cm: avoid GFP_KERNEL in atomic context 2016-09-19 15:36:17 -07:00
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi
sfi
sh
sn
soc
spi
spmi
ssb
staging Linux 4.8-rc8 2016-09-28 12:08:49 +10:00
target
tc
thermal
thunderbolt
tty
uio
usb
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile