alistair23-linux/drivers/gpu/drm
Chris Wilson c501ae7f33 drm/i915: Only clear the GPU domains upon a successful finish
By clearing the GPU read domains before waiting upon the buffer, we run
the risk of the wait being interrupted and the domains prematurely
cleared. The next time we attempt to wait upon the buffer (after
userspace handles the signal), we believe that the buffer is idle and so
skip the wait.

There are a number of bugs across all generations which show signs of an
overly haste reuse of active buffers.

Such as:

  https://bugs.freedesktop.org/show_bug.cgi?id=29046
  https://bugs.freedesktop.org/show_bug.cgi?id=35863
  https://bugs.freedesktop.org/show_bug.cgi?id=38952
  https://bugs.freedesktop.org/show_bug.cgi?id=40282
  https://bugs.freedesktop.org/show_bug.cgi?id=41098
  https://bugs.freedesktop.org/show_bug.cgi?id=41102
  https://bugs.freedesktop.org/show_bug.cgi?id=41284
  https://bugs.freedesktop.org/show_bug.cgi?id=42141

A couple of those pre-date i915_gem_object_finish_gpu(), so may be
unrelated (such as a wild write from a userspace command buffer), but
this does look like a convincing cause for most of those bugs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-01 21:36:13 +01:00
..
exynos drm exynos: use drm_fb_helper_set_par directly 2012-02-03 10:11:36 +00:00
gma500 drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
i2c drm: add convenience function to create an range property 2012-02-09 10:15:25 +00:00
i810 drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
i915 drm/i915: Only clear the GPU domains upon a successful finish 2012-03-01 21:36:13 +01:00
mga drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
nouveau drm/nouveau: do a better job at hiding the NIH i2c bit-banging algo 2012-02-29 20:46:02 +01:00
r128 drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
radeon Merge remote-tracking branch 'airlied/drm-next' into for-airlied 2012-02-23 14:56:11 +01:00
savage
sis drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
tdfx
ttm drm/ttm: fix two regressions since move_notify changes 2012-01-25 18:54:28 +00:00
via drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
vmwgfx drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
ati_pcigart.c
drm_agpsupport.c
drm_auth.c drm: Fix authentication kernel crash 2012-01-25 09:27:45 +00:00
drm_buffer.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc.c drm: add convenience function to create an range property 2012-02-09 10:15:25 +00:00
drm_crtc_helper.c drm crtc_helper: use list_for_each_entry 2012-02-03 10:09:41 +00:00
drm_debugfs.c
drm_dma.c
drm_dp_i2c_helper.c
drm_drv.c drm: remove master fd restriction on mode setting getters 2012-02-03 09:29:35 +00:00
drm_edid.c drm/edid: drm modes have to be free with drm_mode_destroy 2012-02-03 09:50:08 +00:00
drm_edid_modes.h
drm_encoder_slave.c
drm_fb_helper.c drm fb helper: remove unused variable crtc_id 2012-02-03 09:55:52 +00:00
drm_fops.c drm: Fix authentication kernel crash 2012-01-25 09:27:45 +00:00
drm_gem.c drm: Pass the real error code back during GEM bo initialisation 2012-01-30 09:31:42 +00:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_ioc32.c drivers/gpu/drm/drm_ioc32.c: initialize all fields 2012-02-03 09:47:32 +00:00
drm_ioctl.c drm: add some caps for userspace to discover more info for dumb KMS driver (v2) 2012-02-16 18:35:11 +00:00
drm_irq.c
drm_lock.c
drm_memory.c
drm_mm.c
drm_modes.c drm/modes: do not enforce an odd vtotal for interlaced modes 2012-02-13 11:58:53 +00:00
drm_pci.c drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
drm_platform.c
drm_proc.c
drm_scatter.c
drm_stub.c
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_usb.c
drm_vm.c
Kconfig
Makefile
README.drm

************************************************************
* For the very latest on DRI development, please see:      *
*     http://dri.freedesktop.org/                          *
************************************************************

The Direct Rendering Manager (drm) is a device-independent kernel-level
device driver that provides support for the XFree86 Direct Rendering
Infrastructure (DRI).

The DRM supports the Direct Rendering Infrastructure (DRI) in four major
ways:

    1. The DRM provides synchronized access to the graphics hardware via
       the use of an optimized two-tiered lock.

    2. The DRM enforces the DRI security policy for access to the graphics
       hardware by only allowing authenticated X11 clients access to
       restricted regions of memory.

    3. The DRM provides a generic DMA engine, complete with multiple
       queues and the ability to detect the need for an OpenGL context
       switch.

    4. The DRM is extensible via the use of small device-specific modules
       that rely extensively on the API exported by the DRM module.


Documentation on the DRI is available from:
    http://dri.freedesktop.org/wiki/Documentation
    http://sourceforge.net/project/showfiles.php?group_id=387
    http://dri.sourceforge.net/doc/

For specific information about kernel-level support, see:

    The Direct Rendering Manager, Kernel Support for the Direct Rendering
    Infrastructure
    http://dri.sourceforge.net/doc/drm_low_level.html

    Hardware Locking for the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/hardware_locking_low_level.html

    A Security Analysis of the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/security_low_level.html