Up until recently sync_file were create to export a single dma-fence to
userspace, and so we could canabalise a bit insie dma-fence to mark
whether or not we had enable polling for the sync_file itself. However,
with the advent of syncobj, we do allow userspace to create multiple
sync_files for a single dma-fence. (Similarly, that the sw-sync
validation framework also started returning multiple sync-files wrapping
a single dma-fence for a syncpt also triggering the problem.)
This patch reverts my suggestion in commit e241655373
("dma-buf/sync_file: only enable fence signalling on poll()") to use a
single bit in the shared dma-fence and restores the sync_file->flags for
tracking the bits individually.
Reported-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Fixes: f1e8c67123 ("dma-buf/sw-sync: Use an rbtree to sort fences in the timeline")
Fixes: e9083420bb ("drm: introduce sync objects (v4)")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170728212951.7818-1-chris@chris-wilson.co.uk
[astrachan: rediffed against changed context lines in 4.9]
Bug: 79383895
PD#170298 [1/3]
Change-Id: I70d1f19796c6cb33cd4c19e40276d7298aa4ba5d
Signed-off-by: Alistair Strachan <astrachan@google.com>
Signed-off-by: Victor Wan <victor.wan@amlogic.com>
Conflicts:
drivers/md/dm-bufio.c
drivers/media/dvb-core/dvb_frontend.c
drivers/usb/dwc3/core.c
drivers/usb/gadget/function/f_fs.c
Changes in 4.9.107
arm64: lse: Add early clobbers to some input/output asm operands
powerpc/64s: Clear PCR on boot
USB: serial: cp210x: use tcflag_t to fix incompatible pointer type
Revert "pinctrl: msm: Use dynamic GPIO numbering"
xfs: detect agfl count corruption and reset agfl
Revert "ima: limit file hash setting by user to fix and log modes"
Input: elan_i2c_smbus - fix corrupted stack
tracing: Fix crash when freeing instances with event triggers
selinux: KASAN: slab-out-of-bounds in xattr_getsecurity
cfg80211: further limit wiphy names to 64 bytes
dma-buf: remove redundant initialization of sg_table
rtlwifi: rtl8192cu: Remove variable self-assignment in rf.c
ASoC: Intel: sst: remove redundant variable dma_dev_name
platform/chrome: cros_ec_lpc: remove redundant pointer request
x86/amd: revert commit 944e0fc51a
xen: set cpu capabilities from xen_start_kernel()
x86/amd: don't set X86_BUG_SYSRET_SS_ATTRS when running under Xen
tcp: avoid integer overflows in tcp_rcv_space_adjust()
scsi: ufs: fix failure to read the string descriptor
scsi: ufs: refactor device descriptor reading
scsi: ufs: Factor out ufshcd_read_desc_param
arm64: Add hypervisor safe helper for checking constant capabilities
arm64/cpufeature: don't use mutex in bringup path
powerpc/rfi-flush: Move out of HARDLOCKUP_DETECTOR #ifdef
powerpc/pseries: Support firmware disable of RFI flush
powerpc/powernv: Support firmware disable of RFI flush
powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code
powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again
powerpc/rfi-flush: Always enable fallback flush on pseries
powerpc/rfi-flush: Differentiate enabled and patched flush types
powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration
powerpc/pseries: Add new H_GET_CPU_CHARACTERISTICS flags
powerpc: Add security feature flags for Spectre/Meltdown
powerpc/pseries: Set or clear security feature flags
powerpc/powernv: Set or clear security feature flags
powerpc/64s: Move cpu_show_meltdown()
powerpc/64s: Enhance the information in cpu_show_meltdown()
powerpc/powernv: Use the security flags in pnv_setup_rfi_flush()
powerpc/pseries: Use the security flags in pseries_setup_rfi_flush()
powerpc/64s: Wire up cpu_show_spectre_v1()
powerpc/64s: Wire up cpu_show_spectre_v2()
powerpc/pseries: Fix clearing of security feature flags
powerpc: Move default security feature flags
powerpc/pseries: Restore default security feature flags on setup
powerpc/64s: Fix section mismatch warnings from setup_rfi_flush()
powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit
net/mlx4_en: fix potential use-after-free with dma_unmap_page
iio:kfifo_buf: check for uint overflow
MIPS: ptrace: Fix PTRACE_PEEKUSR requests for 64-bit FGRs
MIPS: prctl: Disallow FRE without FR with PR_SET_FP_MODE requests
scsi: scsi_transport_srp: Fix shost to rport translation
stm class: Use vmalloc for the master map
hwtracing: stm: fix build error on some arches
IB/core: Fix error code for invalid GID entry
drm/psr: Fix missed entry in PSR setup time table.
drm/i915: Disable LVDS on Radiant P845
sparc64: Fix build warnings with gcc 7.
fix io_destroy()/aio_complete() race
mm: fix the NULL mapping case in __isolate_lru_page()
sparc64: Don't clibber fixed registers in __multi4.
serial: pl011: add console matching function
Linux 4.9.107
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Up until recently sync_file were create to export a single dma-fence to
userspace, and so we could canabalise a bit insie dma-fence to mark
whether or not we had enable polling for the sync_file itself. However,
with the advent of syncobj, we do allow userspace to create multiple
sync_files for a single dma-fence. (Similarly, that the sw-sync
validation framework also started returning multiple sync-files wrapping
a single dma-fence for a syncpt also triggering the problem.)
This patch reverts my suggestion in commit e241655373
("dma-buf/sync_file: only enable fence signalling on poll()") to use a
single bit in the shared dma-fence and restores the sync_file->flags for
tracking the bits individually.
Reported-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Fixes: f1e8c67123 ("dma-buf/sw-sync: Use an rbtree to sort fences in the timeline")
Fixes: e9083420bb ("drm: introduce sync objects (v4)")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170728212951.7818-1-chris@chris-wilson.co.uk
[astrachan: rediffed against changed context lines in 4.9]
Bug: 79383895
Change-Id: If98fa920693045fdab21886960657bbe8ef550c0
Signed-off-by: Alistair Strachan <astrachan@google.com>
This reverts commit fe912ab314899e3add2993c630c15d28638a3348.
This reverts part commit of ARM and reserved original commit in upstread.
Change-Id: I4e0f39bee86342cd89aa2fb8f10c81f92e4b1985
Signed-off-by: binqi.zhang <binqi.zhang@amlogic.com>
Upstream commit d3862e44da ("dma-buf/sw-sync: Fix locking around
sync_timeline lists") renamed sync_pt -> active_list to -> link and we
run into folowing build error:
drivers/dma-buf/sw_sync.c:176:19: error: 'struct sync_pt' has no member named 'active_list'
Reported at KernelCI:
https://kernelci.org/build/android/branch/android-4.9/kernel/ASB-2017-11-06_4.9-o-release-1566-gfdeec8fdb714/
Fixes: Change-Id: I05c34dcf74438c28405438c7ead0706b1f810fff
("CHROMIUM: android: fix warning when releasing active sync point")
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Changes in 4.9.68
bcache: only permit to recovery read error when cache device is clean
bcache: recover data from backing when data is clean
drm/fsl-dcu: avoid disabling pixel clock twice on suspend
drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume()
Revert "crypto: caam - get rid of tasklet"
mm, oom_reaper: gather each vma to prevent leaking TLB entry
uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices
usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub
serial: 8250_pci: Add Amazon PCI serial device ID
s390/runtime instrumentation: simplify task exit handling
USB: serial: option: add Quectel BG96 id
ima: fix hash algorithm initialization
s390/pci: do not require AIS facility
selftests/x86/ldt_get: Add a few additional tests for limits
staging: greybus: loopback: Fix iteration count on async path
m68k: fix ColdFire node shift size calculation
serial: 8250_fintek: Fix rs485 disablement on invalid ioctl()
staging: rtl8188eu: avoid a null dereference on pmlmepriv
spi: sh-msiof: Fix DMA transfer size check
spi: spi-axi: fix potential use-after-free after deregistration
mmc: sdhci-msm: fix issue with power irq
usb: phy: tahvo: fix error handling in tahvo_usb_probe()
serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X
x86/entry: Use SYSCALL_DEFINE() macros for sys_modify_ldt()
EDAC, sb_edac: Fix missing break in switch
sysrq : fix Show Regs call trace on ARM
usbip: tools: Install all headers needed for libusbip development
perf test attr: Fix ignored test case result
kprobes/x86: Disable preemption in ftrace-based jprobes
tools include: Do not use poison with C++
iio: adc: ti-ads1015: add 10% to conversion wait time
dax: Avoid page invalidation races and unnecessary radix tree traversals
net/mlx4_en: Fix type mismatch for 32-bit systems
l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookups
dmaengine: stm32-dma: Set correct args number for DMA request from DT
dmaengine: stm32-dma: Fix null pointer dereference in stm32_dma_tx_status
usb: gadget: f_fs: Fix ExtCompat descriptor validation
libcxgb: fix error check for ip6_route_output()
net: systemport: Utilize skb_put_padto()
net: systemport: Pad packet before inserting TSB
ARM: OMAP2+: Fix WL1283 Bluetooth Baud Rate
ARM: OMAP1: DMA: Correct the number of logical channels
vti6: fix device register to report IFLA_INFO_KIND
be2net: fix accesses to unicast list
be2net: fix unicast list filling
net/appletalk: Fix kernel memory disclosure
libfs: Modify mount_pseudo_xattr to be clear it is not a userspace mount
net: qrtr: Mark 'buf' as little endian
mm: fix remote numa hits statistics
mac80211: calculate min channel width correctly
ravb: Remove Rx overflow log messages
nfs: Don't take a reference on fl->fl_file for LOCK operation
drm/exynos/decon5433: update shadow registers iff there are active windows
drm/exynos/decon5433: set STANDALONE_UPDATE_F also if planes are disabled
KVM: arm/arm64: Fix occasional warning from the timer work function
mac80211: prevent skb/txq mismatch
NFSv4: Fix client recovery when server reboots multiple times
perf/x86/intel: Account interrupts for PEBS errors
powerpc/mm: Fix memory hotplug BUG() on radix
qla2xxx: Fix wrong IOCB type assumption
drm/amdgpu: fix bug set incorrect value to vce register
drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
net: sctp: fix array overrun read on sctp_timer_tbl
x86/fpu: Set the xcomp_bv when we fake up a XSAVES area
drm/amdgpu: fix unload driver issue for virtual display
mac80211: don't try to sleep in rate_control_rate_init()
RDMA/qedr: Return success when not changing QP state
RDMA/qedr: Fix RDMA CM loopback
tipc: fix nametbl_lock soft lockup at module exit
tipc: fix cleanup at module unload
dmaengine: pl330: fix double lock
tcp: correct memory barrier usage in tcp_check_space()
i2c: i2c-cadence: Initialize configuration before probing devices
nvmet: cancel fatal error and flush async work before free controller
gtp: clear DF bit on GTP packet tx
gtp: fix cross netns recv on gtp socket
net: phy: micrel: KSZ8795 do not set SUPPORTED_[Asym_]Pause
net: thunderx: avoid dereferencing xcv when NULL
be2net: fix initial MAC setting
vfio/spapr: Fix missing mutex unlock when creating a window
mm: avoid returning VM_FAULT_RETRY from ->page_mkwrite handlers
xen-netfront: Improve error handling during initialization
cec: initiator should be the same as the destination for, poll
xen-netback: vif counters from int/long to u64
net: fec: fix multicast filtering hardware setup
dma-buf/dma-fence: Extract __dma_fence_is_later()
dma-buf/sw-sync: Fix the is-signaled test to handle u32 wraparound
dma-buf/sw-sync: Prevent user overflow on timeline advance
dma-buf/sw-sync: Reduce irqsave/irqrestore from known context
dma-buf/sw-sync: sync_pt is private and of fixed size
dma-buf/sw-sync: Fix locking around sync_timeline lists
dma-buf/sw-sync: Use an rbtree to sort fences in the timeline
dma-buf/sw_sync: move timeline_fence_ops around
dma-buf/sw_sync: clean up list before signaling the fence
dma-fence: Clear fence->status during dma_fence_init()
dma-fence: Wrap querying the fence->status
dma-fence: Introduce drm_fence_set_error() helper
dma-buf/sw_sync: force signal all unsignaled fences on dying timeline
dma-buf/sync_file: hold reference to fence when creating sync_file
dma-buf: Update kerneldoc for sync_file_create
usb: hub: Cycle HUB power when initialization fails
usb: xhci: fix panic in xhci_free_virt_devices_depth_first
USB: core: Add type-specific length check of BOS descriptors
USB: Increase usbfs transfer limit
USB: devio: Prevent integer overflow in proc_do_submiturb()
USB: usbfs: Filter flags passed in from user space
usb: host: fix incorrect updating of offset
xen-netfront: avoid crashing on resume after a failure in talk_to_netback()
Linux 4.9.68
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
commit a009e975da upstream.
The dma_fence.error field (formerly known as dma_fence.status) is an
optional field that may be set by drivers before calling
dma_fence_signal(). The field can be used to indicate that the fence was
completed in err rather than with success, and is visible to other
consumers of the fence and to userspace via sync_file.
This patch renames the field from status to error so that its meaning is
hopefully more clear (and distinct from dma_fence_get_status() which is
a composite between the error state and signal state) and adds a helper
that validates the preconditions of when it is suitable to adjust the
error field.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-3-chris@chris-wilson.co.uk
[s/dma_fence/fence/g - gregkh]
Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 3792b7c1a7 upstream.
If userspace already dropped its own reference by closing the sw_sync
fence fd we might end up in a deadlock where
dma_fence_is_signaled_locked() will trigger the release of the fence and
thus try to hold the lock to remove the fence from the list.
dma_fence_is_signaled_locked() tries to release/free the fence and hold
the lock in the process.
We fix that by changing the order operation and clean up the list and
rb-tree first.
v2: Drop fence get/put dance and manipulate the list first (Chris Wilson)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20170729152217.8362-2-gustavo@padovan.org
[s/dma_fence/fence/g - gregkh]
Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
PD#153134:to solve dEQP-EGL.functional.get_frame_timestamps issues
sync_file_ioctl_fence_info has a race between filling the status
of the underlying fences and the overall status of the sync_file.
If fence transitions in the time frame between its sync_fill_fence_info
and the later dma_fence_is_signaled for the sync_file, the returned
information is inconsistent showing non-signaled underlying fences but
an overall signaled state.
This patch changes sync_file_ioctl_fence_info to track what has been
encoded and using that as the overall sync_file status.
Change-Id: I8d785bb04510be99e250dbd017eef883faca147b
Tested-by: Vamsidhar Reddy Gaddam <vamsidhar.gaddam@arm.com>
Signed-off-by: John Einar Reitan <john.reitan@arm.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171009134936.27219-1-john.reitan@arm.com
PD#149525: Revert "android: port fence driver from kernel-4.4
This reverts commit 22f718c442.
Change-Id: I0ad1ad31fe6624b11bb840bc13d64c9c5af5d651
Signed-off-by: Jiyu Yang <Jiyu.Yang@amlogic.com>
PD#138714: android: port fence from kernel-4.4 for booting android 8.0
Change-Id: I7c942cd5f990f7e0d5726eefe9c54b9cb6437e41
Signed-off-by: Yun Cai <yun.cai@amlogic.com>
Changes in 4.9.23:
drm/i915/gen9: Increase PCODE request timeout to 50ms
drm/i915: Nuke debug messages from the pipe update critical section
drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3
drm/i915: Only enable hotplug interrupts if the display interrupts are enabled
drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters.
drm/i915: Stop using RP_DOWN_EI on Baytrail
drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker)
orangefs: fix memory leak of string 'new' on exit path
orangefs: Dan Carpenter influenced cleanups...
orangefs: fix buffer size mis-match between kernel space and user space.
i2c: bcm2835: Fix hang for writing messages larger than 16 bytes
rt2x00usb: fix anchor initialization
rt2x00usb: do not anchor rx and tx urb's
rt2x00: Fix incorrect usage of CONFIG_RT2X00_LIB_USB
mtd: bcm47xxpart: fix parsing first block after aligned TRX
MIPS: Introduce irq_stack
MIPS: Stack unwinding while on IRQ stack
MIPS: Only change $28 to thread_info if coming from user mode
MIPS: Switch to the irq_stack in interrupts
MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK
MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
crypto: caam - fix RNG deinstantiation error checking
crypto: caam - fix invalid dereference in caam_rsa_init_tfm()
Revert "drm/i915/execlists: Reset RING registers upon resume"
net/packet: fix overflow in check for priv area size
blk-mq: Avoid memory reclaim when remapping queues
usb: hub: Wait for connection to be reestablished after port reset
net/mlx4_en: Fix bad WQE issue
net/mlx4_core: Fix racy CQ (Completion Queue) free
net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
dma-buf: add support for compat ioctl
Linux 4.9.23
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Userspace can close the sync device while there are still active fence
points, in which case kernel produces the following warning:
[ 43.853176] ------------[ cut here ]------------
[ 43.857834] WARNING: CPU: 0 PID: 892 at /mnt/host/source/src/third_party/kernel/v3.18/drivers/staging/android/sync.c:439 android_fence_release+0x88/0x104()
[ 43.871741] CPU: 0 PID: 892 Comm: Binder_5 Tainted: G U 3.18.0-07661-g0550ce9 #1
[ 43.880176] Hardware name: Google Tegra210 Smaug Rev 1+ (DT)
[ 43.885834] Call trace:
[ 43.888294] [<ffffffc000207464>] dump_backtrace+0x0/0x10c
[ 43.893697] [<ffffffc000207580>] show_stack+0x10/0x1c
[ 43.898756] [<ffffffc000ab1258>] dump_stack+0x74/0xb8
[ 43.903814] [<ffffffc00021d414>] warn_slowpath_common+0x84/0xb0
[ 43.909736] [<ffffffc00021d530>] warn_slowpath_null+0x14/0x20
[ 43.915482] [<ffffffc00088aefc>] android_fence_release+0x84/0x104
[ 43.921582] [<ffffffc000671cc4>] fence_release+0x104/0x134
[ 43.927066] [<ffffffc00088b0cc>] sync_fence_free+0x74/0x9c
[ 43.932552] [<ffffffc00088b128>] sync_fence_release+0x34/0x48
[ 43.938304] [<ffffffc000317bbc>] __fput+0x100/0x1b8
[ 43.943185] [<ffffffc000317cc8>] ____fput+0x8/0x14
[ 43.947982] [<ffffffc000237f38>] task_work_run+0xb0/0xe4
[ 43.953297] [<ffffffc000207074>] do_notify_resume+0x44/0x5c
[ 43.958867] ---[ end trace 5a2aa4027cc5d171 ]---
Let's fix it by introducing a new optional callback (disable_signaling)
to fence operations so that drivers can do proper clean ups when we
remove last callback for given fence.
BUG=chrome-os-partner:40303
TEST=Boot Smaug and observe that warning is gone.
Change-Id: I05c34dcf74438c28405438c7ead0706b1f810fff
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/303409
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
[AmitP: Refactored original changes by renaming
android_fence_disable_signaling to
timeline_fence_disable_signaling so as to
align with the upstream naming convention].
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Pull drm updates from Dave Airlie:
"Core:
- Fence destaging work
- DRIVER_LEGACY to split off legacy drm drivers
- drm_mm refactoring
- Splitting drm_crtc.c into chunks and documenting better
- Display info fixes
- rbtree support for prime buffer lookup
- Simple VGA DAC driver
Panel:
- Add Nexus 7 panel
- More simple panels
i915:
- Refactoring GEM naming
- Refactored vma/active tracking
- Lockless request lookups
- Better stolen memory support
- FBC fixes
- SKL watermark fixes
- VGPU improvements
- dma-buf fencing support
- Better DP dongle support
amdgpu:
- Powerplay for Iceland asics
- Improved GPU reset support
- UVD/VEC powergating support for CZ/ST
- Preinitialised VRAM buffer support
- Virtual display support
- Initial SI support
- GTT rework
- PCI shutdown callback support
- HPD IRQ storm fixes
amdkfd:
- bugfixes
tilcdc:
- Atomic modesetting support
mediatek:
- AAL + GAMMA engine support
- Hook up gamma LUT
- Temporal dithering support
imx:
- Pixel clock from devicetree
- drm bridge support for LVDS bridges
- active plane reconfiguration
- VDIC deinterlacer support
- Frame synchronisation unit support
- Color space conversion support
analogix:
- PSR support
- Better panel on/off support
rockchip:
- rk3399 vop/crtc support
- PSR support
vc4:
- Interlaced vblank timing
- 3D rendering CPU overhead reduction
- HDMI output fixes
tda998x:
- HDMI audio ASoC support
sunxi:
- Allwinner A33 support
- better TCON support
msm:
- DT binding cleanups
- Explicit fence-fd support
sti:
- remove sti415/416 support
etnaviv:
- MMUv2 refactoring
- GC3000 support
exynos:
- Refactoring HDMI DCC/PHY
- G2D pm regression fix
- Page fault issues with wait for vblank
There is no nouveau work in this tree, as Ben didn't get a pull
request in, and he was fighting moving to atomic and adding mst
support, so maybe best it waits for a cycle"
* tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux: (1412 commits)
drm/crtc: constify drm_crtc_index parameter
drm/i915: Fix conflict resolution from backmerge of v4.8-rc8 to drm-next
drm/i915/guc: Unwind GuC workqueue reservation if request construction fails
drm/i915: Reset the breadcrumbs IRQ more carefully
drm/i915: Force relocations via cpu if we run out of idle aperture
drm/i915: Distinguish last emitted request from last submitted request
drm/i915: Allow DP to work w/o EDID
drm/i915: Move long hpd handling into the hotplug work
drm/i915/execlists: Reinitialise context image after GPU hang
drm/i915: Use correct index for backtracking HUNG semaphores
drm/i915: Unalias obj->phys_handle and obj->userptr
drm/i915: Just clear the mmiodebug before a register access
drm/i915/gen9: only add the planes actually affected by ddb changes
drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED
drm/i915/bxt: Fix HDMI DPLL configuration
drm/i915/gen9: fix the watermark res_blocks value
drm/i915/gen9: fix plane_blocks_per_line on watermarks calculations
drm/i915/gen9: minimum scanlines for Y tile is not always 4
drm/i915/gen9: fix the WaWmMemoryReadLatency implementation
drm/i915/kbl: KBL also needs to run the SAGV code
...
When we merge several fences, if all of them are signaled already, we
still keep one of them. So instead of using add_fence(), which will not
increase the refcount of signaled fences, we should explicitly call
fence_get() for the fence we are keeping.
This patch fixes a kernel panic that can be triggered by creating a fence
that is expired (or increasing the timeline until it expires), then
creating a merged fence out of it, and deleting the merged fence. This
will make the original expired fence's refcount go to zero.
Testcase: igt/sw_sync/sync_expired_merge
Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1473966865-4508-1-git-send-email-rafael.antognolli@intel.com