linux/drivers/gpu/drm/i915
Daniel Vetter e5eb3d63c6 drm/i915: add interface to simulate gpu hangs
gpu reset is a very important piece of our infrastructure.
Unfortunately we only really it test by actually hanging the gpu,
which often has bad side-effects for the entire system. And the gpu
hang handling code is one of the rather complicated pieces of code we
have, consisting of
- hang detection
- error capture
- actual gpu reset
- reset of all the gem bookkeeping
- reinitialition of the entire gpu

This patch adds a debugfs to selectively stopping rings by ceasing to
update the hw tail pointer, which will result in the gpu no longer
updating it's head pointer and eventually to the hangcheck firing.
This way we can exercise the gpu hang code under controlled conditions
without a dying gpu taking down the entire systems.

Patch motivated by me forgetting to properly reinitialize ppgtt after
a gpu reset.

Usage:

echo $((1 << $ringnum)) > i915_ring_stop # stops one ring

echo 0xffffffff > i915_ring_stop # stops all, future-proof version

then run whatever testload is desired. i915_ring_stop automatically
resets after a gpu hang is detected to avoid hanging the gpu to fast
and declaring it wedged.

v2: Incorporate feedback from Chris Wilson.

v3: Add the missing cleanup.

v4: Fix up inconsistent size of ring_stop_read vs _write, noticed by
Eugeni Dodonov.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-05 19:45:00 +02:00
..
dvo_ch7xxx.c
dvo_ch7017.c
dvo_ivch.c
dvo_sil164.c
dvo_tfp410.c
dvo.h
i915_debugfs.c drm/i915: add interface to simulate gpu hangs 2012-05-05 19:45:00 +02:00
i915_dma.c drm/i915: move pnv|ilk_gem_mem_freq to intel_pm.c 2012-05-03 11:18:31 +02:00
i915_drv.c drm/i915: add interface to simulate gpu hangs 2012-05-05 19:45:00 +02:00
i915_drv.h drm/i915: add interface to simulate gpu hangs 2012-05-05 19:45:00 +02:00
i915_gem_debug.c drm/i915: Remove the list of pinned inactive objects 2012-05-03 11:18:11 +02:00
i915_gem_evict.c drm/i915: remove do_retire from i915_wait_request 2012-05-03 11:18:20 +02:00
i915_gem_execbuffer.c drm/i915: disallow clip rects on gen5+ 2012-05-03 11:18:29 +02:00
i915_gem_gtt.c drm/i915: remove do_retire from i915_wait_request 2012-05-03 11:18:20 +02:00
i915_gem_stolen.c drm/i915: Split the stolen handling for GEM out of i915_dma.c 2012-05-03 11:18:11 +02:00
i915_gem_tiling.c drm/i915: Only the zap the VMA after updating the tiling parameters 2012-05-03 11:18:07 +02:00
i915_gem.c drm/i915: extract some common olr+wedge code 2012-05-03 11:18:32 +02:00
i915_ioc32.c drm/i915: [sparse] trivial sparse fixes 2012-04-18 10:34:49 +02:00
i915_irq.c drm/i915: extract dri1 breadcrumb update from irq handler 2012-05-03 11:18:28 +02:00
i915_reg.h drm/i915: use the new masked bit macro some more 2012-05-03 11:18:20 +02:00
i915_suspend.c drm/i915: manage PCH PLLs separately from pipes 2012-05-03 11:18:08 +02:00
i915_sysfs.c drm/i915: rc6 residency (fix the fix) 2012-04-23 09:30:14 +02:00
i915_trace_points.c drm/i915: [sparse] trivial sparse fixes 2012-04-18 10:34:49 +02:00
i915_trace.h
intel_acpi.c drm/i915: [sparse] trivial sparse fixes 2012-04-18 10:34:49 +02:00
intel_bios.c Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next 2012-04-12 10:27:01 +01:00
intel_bios.h
intel_crt.c drm/i915: IBX+ doesn't have separate vsync/hsync controls on the VGA DAC 2012-04-18 10:34:49 +02:00
intel_display.c drm/i915: rip out unnecessary calls to drm_mode_set_crtcinfo 2012-05-04 11:31:24 +02:00
intel_dp.c drm/i915: manage PCH PLLs separately from pipes 2012-05-03 11:18:08 +02:00
intel_drv.h drm/i915: Periodically sanity check power management 2012-05-03 17:22:36 +02:00
intel_dvo.c drm/i915/intel_i2c: refactor using intel_gmbus_get_adapter 2012-03-28 14:40:44 +02:00
intel_fb.c drm/i915: [sparse] trivial sparse fixes 2012-04-18 10:34:49 +02:00
intel_hdmi.c drm/i915: make DBLCLK modes work 2012-05-03 11:25:22 +02:00
intel_i2c.c drm/i915/intel_i2c: reduce verbosity of some messages 2012-04-13 15:03:00 +02:00
intel_lvds.c Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next 2012-04-12 10:27:01 +01:00
intel_modes.c Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next 2012-04-12 10:27:01 +01:00
intel_opregion.c drm/i915: [sparse] __iomem fixes for opregion 2012-05-03 11:18:00 +02:00
intel_overlay.c drm/i915: rip out unnecessary calls to drm_mode_set_crtcinfo 2012-05-04 11:31:24 +02:00
intel_panel.c i915: Add and use pr_fmt and pr_<level> 2012-03-18 21:50:21 +01:00
intel_pm.c drm/i915: Periodically sanity check power management 2012-05-03 17:22:36 +02:00
intel_ringbuffer.c drm/i915: add interface to simulate gpu hangs 2012-05-05 19:45:00 +02:00
intel_ringbuffer.h drm/i915: fixup __iomem mixups in ringbuffer.c 2012-05-03 11:18:31 +02:00
intel_sdvo_regs.h
intel_sdvo.c drm/i915: use mode values consistently when converting to sdvo dtd 2012-05-04 11:34:59 +02:00
intel_sprite.c drm/i915: properly check for MODESET for kms driver ioctls 2012-05-03 11:18:13 +02:00
intel_tv.c drm/i915: rip out unnecessary calls to drm_mode_set_crtcinfo 2012-05-04 11:31:24 +02:00
Makefile drm/i915: Split the stolen handling for GEM out of i915_dma.c 2012-05-03 11:18:11 +02:00