linux/drivers/gpu/drm
Daniel Vetter 781cc76e0c drm/i915: Avoid the gpu reset vs. modeset deadlock
... using the biggest hammer we have. This is essentially a weaponized
version of the timeout-based wedging Chris added in

commit 36703e79a9
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Jun 22 11:56:25 2017 +0100

    drm/i915: Break modeset deadlocks on reset

Because defense-in-depth is good it's good to still have both. Also
note that with the locking change we can now restrict this a lot (old
gpus and special testing only), so this doesn't kill the TDR benefits
on at least anything remotely modern.

And futuremore with a few tricks it should be possible to make a much
more educated guess about whether an atomic commit is stuck waiting on
the gpu (atomic_t counting the pending i915_sw_fence used by the
atomic modeset code should do it), so we can improve this.

But for now just start with something that is guaranteed to recover
faster, for much better CI througput.

This defacto reverts TDR on these platforms, but there's not really a
single commit to specify as the sole offender.

v2: Add a debug message to explain what's going on. We can't DRM_ERROR
because that spams CI. And the timeout based fallback still prints a
DRM_ERROR, in case something goes wrong.

v3: Fix comment layout (Michel)

Fixes: 4680816be3 ("drm/i915: Wait first for submission, before waiting for request completion")
Fixes: 221fe79945 ("drm/i915: Perform a direct reset of the GPU from the waiter")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v2)
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v2)
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170808080828.23650-1-daniel.vetter@ffwll.ch
(cherry picked from commit 97154ec242)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-14 19:28:46 +03:00
..
amd drm/amdgpu: Use list_del_init in amdgpu_mn_unregister 2017-08-02 14:29:58 -04:00
arc drm/arcgpu: Drop drm_vblank_cleanup 2017-05-31 10:57:08 +02:00
arm drm/arm: hdlcd: remove unused variables 2017-06-21 10:51:26 +01:00
armada main drm pull for v4.13 2017-07-09 18:48:37 -07:00
ast drm/ast: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:17:51 +02:00
atmel-hlcdc Merge tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-06-16 09:33:43 +10:00
bochs drm/bochs: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:23 +02:00
bridge Merge tag 'drm-misc-fixes-2017-08-08' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes 2017-08-10 10:07:13 +10:00
cirrus drm/cirrus: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:56 +02:00
etnaviv drm/etnaviv: Fix off-by-one error in reloc checking 2017-08-08 15:56:00 +02:00
exynos drm/exynos: forbid creating framebuffers from too small GEM buffers 2017-08-09 07:34:23 +09:00
fsl-dcu drm/fsl-dcu: use new drm_atomic_helper_shutdown 2017-06-08 14:59:14 -07:00
gma500 Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
hisilicon Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
i2c drm/i2c: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:04 +02:00
i810 drm/i810: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:12:57 +02:00
i915 drm/i915: Avoid the gpu reset vs. modeset deadlock 2017-08-14 19:28:46 +03:00
imx imx-drm: fix parallel display regression and typo in plane format list 2017-07-21 14:04:44 +10:00
lib
mediatek drm/mediatek: separate color module to fixup error memory reallocation 2017-06-27 17:34:53 +08:00
meson Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
mga main drm pull for v4.13 2017-07-09 18:48:37 -07:00
mgag200 Linux 4.12-rc7 2017-06-27 08:28:30 +10:00
msm drm/msm: gpu: don't abuse dma_alloc for non-DMA allocations 2017-08-01 19:39:00 -04:00
mxsfb drm: mxsfb_crtc: Reset the eLCDIF controller 2017-06-15 14:26:24 -04:00
nouveau drm/nouveau/disp/nv04: avoid creation of output paths 2017-08-10 11:39:18 +10:00
omapdrm drm/omap: fix tiled buffer stride calculations 2017-06-02 11:09:34 +03:00
panel drm/panel: s6e3ha2: Add support for s6e3hf2 panel on TM2e board 2017-06-14 20:18:22 +02:00
pl111 drm/pl111: Fix offset calculation for the primary plane. 2017-06-07 11:50:00 -07:00
qxl Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
r128 drm/r128: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:23 +02:00
radeon drm/radeon: Remove initialization of shared_resources.num_mec 2017-07-13 20:21:55 -05:00
rcar-du drm: rcar-du: Map memory through the VSP device 2017-06-09 12:25:38 +01:00
rockchip drm/rockchip: vop: report error when check resource error 2017-08-04 15:39:32 +08:00
savage drm/savage: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:34 +02:00
selftests drm/mm: Split up long running selftests with cond_resched() 2017-05-04 08:11:46 +02:00
shmobile drm: Add acquire ctx parameter to ->page_flip(_target) 2017-03-29 09:50:38 +02:00
sis drm/sis: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:40 +02:00
sti Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2017-05-18 09:24:30 -04:00
stm drm: make DRM_STM default n 2017-08-10 11:26:49 +10:00
sun4i sun4i-drm changes for 4.13 2017-06-16 10:02:35 +10:00
tdfx drm/tdfx: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:47 +02:00
tegra Linux 4.12-rc7 2017-06-27 08:28:30 +10:00
tilcdc drm/tilcdc: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:49 +02:00
tinydrm drm: Use vsnprintf extension %ph 2017-05-31 10:30:38 +02:00
ttm drm/ttm: Fix use-after-free in ttm_bo_clean_mm 2017-07-03 16:25:43 -04:00
udl drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
vc4 drm/vc4: Fix VBLANK handling in crtc->enable() path 2017-07-14 13:19:48 -07:00
vgem drm/vgem: Fix return value check in vgem_init() 2017-05-22 09:47:34 +02:00
via drm/via: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:14:05 +02:00
virtio drm: Remove drm_device->virtdev 2017-05-29 20:57:25 +02:00
vmwgfx Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes 2017-07-24 15:57:28 +10:00
zte drm: zte: use devm_of_platform_populate() 2017-06-05 09:57:14 +08:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c Linux 4.12-rc5 2017-06-16 13:58:27 +10:00
drm_atomic.c drm: Reduce scope of 'state' variable 2017-06-15 14:26:02 -04:00
drm_auth.c
drm_blend.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_bridge.c drm: Introduce drm_bridge_mode_valid() 2017-05-30 08:37:50 +02:00
drm_bufs.c switch compat_drm_mapbufs() to drm_ioctl_kernel() 2017-07-04 13:16:26 -04:00
drm_cache.c
drm_color_mgmt.c drm/doc: Interlink color manager docs better 2017-04-18 08:56:29 +02:00
drm_connector.c Linux 4.12-rc7 2017-06-27 08:28:30 +10:00
drm_context.c
drm_crtc_helper_internal.h drm: Add drm_{crtc/encoder/connector}_mode_valid() 2017-05-30 08:37:24 +02:00
drm_crtc_helper.c drm: Add acquire ctx parameter to ->set_config 2017-03-29 09:56:25 +02:00
drm_crtc_internal.h drm: extract legacy framebuffer remove 2017-04-06 10:22:43 +02:00
drm_crtc.c drm: Take mode_config.mutex in setcrtc ioctl 2017-04-06 22:49:50 +02:00
drm_debugfs_crc.c Revert "drm: Don't allow interruptions when opening debugfs/crc" 2017-04-07 16:18:28 -04:00
drm_debugfs.c drm/debugfs: Add kerneldoc 2017-03-24 09:36:06 +01:00
drm_dma.c
drm_dp_aux_dev.c drm_dp_aux_dev: switch to read_iter/write_iter 2017-07-08 20:51:46 -04:00
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm/dp: Don't trust drm_dp_downstream_id() 2017-07-21 17:45:26 +03:00
drm_dp_mst_topology.c drm/mst: Avoid processing partially received up/down message transactions 2017-07-20 10:20:31 +02:00
drm_drv.c drm: Fix oops + Xserver hang when unplugging USB drm devices 2017-06-02 11:09:35 -04:00
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2 2017-05-02 10:37:45 +02:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c drm/cma-helper: Return ENOENT for "no such gem obj" 2017-04-18 17:57:37 +02:00
drm_fb_helper.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_file.c drm: introduce sync objects (v4) 2017-06-14 12:10:22 +10:00
drm_flip_work.c
drm_fourcc.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux into drm-misc-next 2017-03-23 08:15:55 +01:00
drm_framebuffer.c drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb 2017-07-03 10:31:37 +02:00
drm_gem_cma_helper.c Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
drm_gem.c drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h main drm pull for v4.13 2017-07-09 18:48:37 -07:00
drm_ioc32.c drm: Add missing field copy in compat_drm_version 2017-07-13 11:25:04 -07:00
drm_ioctl.c main drm pull for v4.13 2017-07-09 18:48:37 -07:00
drm_irq.c drm/doc: Polish irq helper documentation 2017-06-01 08:02:14 +02:00
drm_kms_helper_common.c drm: Remove drmP.h include from drm_kms_helper_common.c 2017-03-09 16:18:02 +01:00
drm_legacy.h switch compat_drm_mapbufs() to drm_ioctl_kernel() 2017-07-04 13:16:26 -04:00
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c
drm_mode_object.c Pointer for Markus's image conversion work. 2017-03-14 15:07:33 +01:00
drm_modes.c
drm_modeset_helper.c drm: Add mode_config .get_format_info() hook 2017-03-22 19:45:00 +02:00
drm_modeset_lock.c drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctx 2017-04-05 09:26:45 +02:00
drm_of.c drm: of: introduce drm_of_find_panel_or_bridge 2017-04-06 17:00:27 -04:00
drm_panel.c
drm_pci.c drm: Extract drm_pci.h 2017-03-09 16:18:02 +01:00
drm_plane_helper.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_plane.c drm: Fix deadlock retry loop in page_flip_ioctl 2017-05-23 09:39:14 +02:00
drm_prime.c drm/prime: Introduce drm_gem_prime_import_dev 2017-05-08 09:39:13 +02:00
drm_print.c
drm_probe_helper.c drm: Use new mode_valid() helpers in connector probe helper 2017-05-30 08:37:50 +02:00
drm_property.c drm: Fix get_property logic fumble 2017-04-12 18:11:32 +02:00
drm_rect.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_scatter.c
drm_scdc_helper.c drm/edid: detect SCDC support in HF-VSDB 2017-03-21 10:15:56 +02:00
drm_simple_kms_helper.c drm: Clarify the role of plane_state argument to drm_simple update(). 2017-03-30 12:02:00 -07:00
drm_syncobj.c drm: Remove unused drm_file parameter to drm_syncobj_replace_fence() 2017-07-06 15:53:00 +10:00
drm_sysfs.c drm: Consolidate and document sysfs support 2017-04-04 20:47:54 +02:00
drm_trace_points.c
drm_trace.h drm: Remove drm_pending_event->pid 2017-03-14 14:38:33 +01:00
drm_vblank.c drm: vblank: Fix vblank timestamp update 2017-06-29 14:40:47 +02:00
drm_vm.c
drm_vma_manager.c
Kconfig drm/pl111: Initial drm/kms driver for pl111 2017-05-08 12:24:06 -07:00
Makefile Merge tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-06-16 09:33:43 +10:00