linux_dsm_epyc7002/drivers
Daniel Vetter 8b18658736 drm/vkms: totally reworked crc data tracking
The crc computation worker needs to be able to get at some data
structures and framebuffer mappings, while potentially more atomic
updates are going on. The solution thus far is to copy relevant bits
around, but that's very tedious.

Here's a new approach, which tries to be more clever, but relies on a
few not-so-obvious things:
- crtc_state is always updated when a plane_state changes. Therefore
  we can just stuff plane_state pointers into a crtc_state. That
  solves the problem of easily getting at the needed plane_states.
- with the flushing changes from previous patches the above also holds
  without races due to the next atomic update being a bit eager with
  cleaning up pending work - we always wait for all crc work items to
  complete before unmapping framebuffers.
- we also need to make sure that the hrtimer fires off the right
  worker. Keep a new distinct crc_state pointer, under the
  vkms_output->lock protection for this. Note that crtc->state is
  updated very early in the atomic commit, way before we arm the
  vblank event - the vblank event should always match the buffers we
  use to compute the crc. This also solves an issue in the hrtimer,
  where we've accessed drm_crtc->state without holding the right locks
  (we held none - oops).
- in the worker itself we can then just access the plane states we
  need, again solving a bunch of ordering and locking issues.
  Accessing plane->state requires locks, accessing the private
  vkms_crtc_state->active_planes pointer only requires that the memory
  doesn't get freed too early.

The idea behind vkms_crtc_state->active_planes is that this would
contain all visible planes, in z-order, as a first step towards a more
generic blending implementation.

Note that this patch also fixes races between prepare_fb/cleanup_fb
and the crc worker accessing ->vaddr.

Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Tested-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190606222751.32567-10-daniel.vetter@ffwll.ch
2019-06-26 23:15:35 -03:00
..
accessibility
acpi
amba
android
ata libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk 2019-06-13 03:17:11 -06:00
atm
auxdisplay
base drivers/base/devres: introduce devm_release_action() 2019-06-13 17:34:56 -10:00
bcma
block block/ps3vram: Use %llu to format sector_t after LBDAF removal 2019-06-13 03:17:50 -06:00
bluetooth
bus
cdrom
char
clk
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-06-16 07:22:56 -10:00
connector
counter
cpufreq
cpuidle
crypto
dax mm/devm_memremap_pages: fix final page put race 2019-06-13 17:34:56 -10:00
dca
devfreq
dio
dma
dma-buf Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-06-19 12:32:13 +02:00
edac
eisa
extcon
firewire
firmware
fmc
fpga
fsi
gnss
gpio A single fix for the PCA953x driver affecting some fringe 2019-06-14 05:48:29 -10:00
gpu drm/vkms: totally reworked crc data tracking 2019-06-26 23:15:35 -03:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2019-06-13 05:59:05 -10:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband
input
interconnect
iommu IOMMU Fixes for Linux v5.2-rc4 2019-06-14 05:49:35 -10:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md bcache: only set BCACHE_DEV_WB_RUNNING when cached device attached 2019-06-13 03:09:15 -06:00
media Merge branch 'topic/remove-fbcon-notifiers' into drm-misc-next 2019-06-19 12:33:05 +02:00
memory
memstick
message
mfd
misc Linux 5.2-rc5 2019-06-19 12:07:29 +02:00
mmc
mtd
mux
net
nfc
ntb
nubus
nvdimm mm/devm_memremap_pages: fix final page put race 2019-06-13 17:34:56 -10:00
nvme
nvmem
of
opp
oprofile
parisc
parport
pci mm/devm_memremap_pages: fix final page put race 2019-06-13 17:34:56 -10:00
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi SCSI fixes on 20190614 2019-06-14 15:52:51 -10:00
sfi
sh
siox
slimbus
sn
soc
soundwire
spi
spmi
ssb
staging staging/olpc_dcon: Add drm conversion to TODO 2019-06-13 10:07:15 +02:00
target
tc
tee
thermal
thunderbolt
tty
uio
usb
uwb
vfio
vhost
video Merge branch 'topic/remove-fbcon-notifiers' into drm-misc-next 2019-06-19 12:33:05 +02:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile