remarkable-linux/include
Daniel Vetter c75fe78995 drm: reference count event->completion
commit 24835e442f upstream.

When writing the generic nonblocking commit code I assumed that
through clever lifetime management I can assure that the completion
(stored in drm_crtc_commit) only gets freed after it is completed. And
that worked.

I also wanted to make nonblocking helpers resilient against driver
bugs, by having timeouts everywhere. And that worked too.

Unfortunately taking boths things together results in oopses :( Well,
at least sometimes: What seems to happen is that the drm event hangs
around forever stuck in limbo land. The nonblocking helpers eventually
time out, move on and release it. Now the bug I tested all this
against is drivers that just entirely fail to deliver the vblank
events like they should, and in those cases the event is simply
leaked. But what seems to happen, at least sometimes, on i915 is that
the event is set up correctly, but somohow the vblank fails to fire in
time. Which means the event isn't leaked, it's still there waiting for
eventually a vblank to fire. That tends to happen when re-enabling the
pipe, and then the trap springs and the kernel oopses.

The correct fix here is simply to refcount the crtc commit to make
sure that the event sticks around even for drivers which only
sometimes fail to deliver vblanks for some arbitrary reasons. Since
crtc commits are already refcounted that's easy to do.

References: https://bugs.freedesktop.org/show_bug.cgi?id=96781
Cc: Jim Rees <rees@umich.edu>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161221102331.31033-1-daniel.vetter@ffwll.ch
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-30 09:41:28 +02:00
..
acpi ACPICA: Linuxize: Restore and fix Intel compiler build 2017-02-26 11:10:52 +01:00
asm-generic asm-prototypes: Clear any CPP defines before declaring the functions 2017-01-12 11:39:07 +01:00
clocksource
crypto crypto: drbg - prevent invalid SG mappings 2016-11-30 19:46:44 +08:00
drm drm: reference count event->completion 2017-03-30 09:41:28 +02:00
dt-bindings ARM: dts: r8a7794: remove Z clock 2017-01-26 08:24:36 +01:00
keys
kvm
linux crypto: ccp - Assign DMA commands to the channel's CCP 2017-03-30 09:41:26 +02:00
math-emu
media
memory
misc
net tcp: don't annotate mark on control socket from tcp_v6_send_response() 2017-02-18 15:11:44 +01:00
pcmcia
ras
rdma RDMA/core: Fix incorrect structure packing for booleans 2017-03-12 06:41:50 +01:00
rxrpc
scsi scsi: libiscsi: add lock around task lists to fix list corruption regression 2017-03-26 13:05:58 +02:00
soc ARM: at91: define LPDDR types 2017-03-12 06:41:41 +01:00
sound ASoC: hdmi-codec: use unsigned type to structure members with bit-field 2017-01-19 20:18:02 +01:00
target target: Fix NULL dereference during LUN lookup + active I/O shutdown 2017-03-15 10:02:46 +08:00
trace tracing: Add #undef to fix compile error 2017-03-18 19:14:29 +08:00
uapi uapi: fix linux/packet_diag.h userspace compilation error 2017-03-22 12:43:34 +01:00
video
xen
Kbuild