linux/drivers/gpu/drm/i915
Chris Wilson d18b961903 drm/i915: Fix incoherence with fence updates on Sandybridge+
This hopefully fixes the root cause behind the workaround added in

commit 25ff1195f8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Apr 4 21:31:03 2013 +0100

    drm/i915: Workaround incoherence between fences and LLC across multiple CPUs

Thanks to further investigation by Jon Bloomfield, he realised that
the 64-bit register might be broken up by the hardware into two 32-bit
writes (a problem we have encountered elsewhere). This non-atomicity
would then cause an issue where a second thread would see an
intermediate register state (new high dword, old low dword), and this
register would randomly be used in preference to its own thread register.
This would cause the second thread to read from and write into a fairly
random tiled location.  Breaking the operation into 3 explicit 32-bit
updates (first disable the fence, poke the upper bits, then poke the lower
bits and enable) ensures that, given proper serialisation between the
32-bit register write and the memory transfer, that the fence value is
always consistent.

Armed with this knowledge, we can explain how the previous workaround
work. The key to the corruption is that a second thread sees an
erroneous fence register that conflicts and overrides its own. By
serialising the fence update across all CPUs, we have a small window
where no GTT access is occurring and so hide the potential corruption.
This also leads to the conclusion that the earlier workaround was
incomplete.

v2: Be overly paranoid about the order in which fence updates become
visible to the GPU to make really sure that we turn the fence off before
doing the update, and then only switch the fence on afterwards.

Signed-off-by: Jon Bloomfield <jon.bloomfield@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-10 14:41:46 +02:00
..
dvo.h
dvo_ch7xxx.c drm/i915: add support for dvo Chrontel 7010B 2013-05-20 22:02:49 +02:00
dvo_ch7017.c
dvo_ivch.c
dvo_ns2501.c
dvo_sil164.c
dvo_tfp410.c
i915_debugfs.c drm/i915: Break up the large vsnprintf() in print_error_buffers() 2013-07-01 11:15:01 +02:00
i915_dma.c Merge tag 'drm-intel-next-2013-06-18' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-06-28 09:50:34 +10:00
i915_drv.c drm/i915: switch disable_power_well default value to 1 2013-07-09 16:31:48 +02:00
i915_drv.h drm/i915: Introduce an HAS_IPS() macro 2013-07-01 11:14:44 +02:00
i915_gem.c drm/i915: Fix incoherence with fence updates on Sandybridge+ 2013-07-10 14:41:46 +02:00
i915_gem_context.c drm/i915: Fix context sizes on HSW 2013-07-01 11:14:54 +02:00
i915_gem_debug.c
i915_gem_dmabuf.c drm/i915: fix dmabuf vmap support 2013-05-01 16:09:31 +10:00
i915_gem_evict.c
i915_gem_execbuffer.c drm/i915: add batch bo to i915_add_request() 2013-06-13 17:42:16 +02:00
i915_gem_gtt.c drm/i915: Rename the gtt_list to global_list 2013-06-03 10:51:14 +02:00
i915_gem_stolen.c drm/i915: Don't try to tear down the stolen drm_mm if it's not there 2013-07-02 11:47:19 +02:00
i915_gem_tiling.c drm/i915: Increase max fence pitch limit to 256KB on IVB+ 2013-04-18 09:43:20 +02:00
i915_ioc32.c
i915_irq.c drm/i915: fix hpd interrupt register locking 2013-07-01 11:14:59 +02:00
i915_reg.h drm/i915: Fix context sizes on HSW 2013-07-01 11:14:54 +02:00
i915_suspend.c drm/i915: protect backlight registers and data with a spinlock 2013-04-25 14:10:10 +02:00
i915_sysfs.c drm/i915: change VLV IOSF sideband accessors to not return error code 2013-05-23 23:25:42 +02:00
i915_trace.h
i915_trace_points.c
i915_ums.c drm/i915: scrap register address storage 2013-06-10 19:54:14 +02:00
intel_acpi.c
intel_bios.c drm/i915: Organize VBT stuff inside drm_i915_private 2013-05-10 21:56:46 +02:00
intel_bios.h drm/i915: set CPT FDI RX polarity bits based on VBT 2013-04-18 09:43:31 +02:00
intel_crt.c drm/i915: document why dvo/sdvo/crt need a special dpms function 2013-05-31 20:54:04 +02:00
intel_ddi.c drm/i915: fix the "ghost eDP" encoder unwind path 2013-06-28 14:14:19 +02:00
intel_display.c drm/i915: s/LFP/LPF in DPIO PLL register names 2013-07-01 11:14:52 +02:00
intel_dp.c drm/i915: fix lane bandwidth capping for DP 1.2 sinks 2013-07-09 16:35:50 +02:00
intel_drv.h drm/i915: correct intel_dp_get_config() function for DevCPT 2013-07-01 11:14:59 +02:00
intel_dvo.c drm/i915: document why dvo/sdvo/crt need a special dpms function 2013-05-31 20:54:04 +02:00
intel_fb.c Merge tag 'drm-intel-next-2013-06-18' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-06-28 09:50:34 +10:00
intel_hdmi.c Revert "drm/i915: Don't use the HDMI port color range bit on Valleyview" 2013-07-01 11:14:53 +02:00
intel_i2c.c drm/i915: avoid premature DP AUX timeouts 2013-05-22 13:51:26 +02:00
intel_lvds.c Merge tag 'drm-intel-next-2013-06-18' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-06-28 09:50:34 +10:00
intel_modes.c
intel_opregion.c drm/i915: tune down DIDL warning about too many outputs 2013-07-01 11:14:42 +02:00
intel_overlay.c drm/i915: change i915_add_request to macro 2013-06-13 17:42:15 +02:00
intel_panel.c drm/i915: Fix WARN_ON() on UP machines 2013-05-23 12:51:30 +02:00
intel_pm.c Partially revert "drm/i915: unconditionally use mt forcewake on hsw/ivb" 2013-07-10 08:03:45 +02:00
intel_ringbuffer.c drm/i915: fix up ring cleanup for the i830/i845 CS tlb w/a 2013-07-09 16:31:49 +02:00
intel_ringbuffer.h drm/i915: store ring hangcheck action 2013-06-13 17:42:17 +02:00
intel_sdvo.c Merge tag 'drm-intel-next-2013-06-18' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-06-28 09:50:34 +10:00
intel_sdvo_regs.h
intel_sideband.c drm/i915: change VLV IOSF sideband accessors to not return error code 2013-05-23 23:25:42 +02:00
intel_sprite.c drm/i915: Disable/restore all sprite planes around modeset 2013-06-06 13:47:39 +02:00
intel_tv.c drm/i915: consolidate and tighten encoder cloning checks 2013-06-05 12:33:14 +02:00
Makefile drm/i915: group sideband register accessors to a new file 2013-05-23 23:24:03 +02:00