linux/drivers/gpu/drm
Jerome Glisse 225758d8ba drm/radeon/kms: fence cleanup + more reliable GPU lockup detection V4
This patch cleanup the fence code, it drops the timeout field of
fence as the time to complete each IB is unpredictable and shouldn't
be bound.

The fence cleanup lead to GPU lockup detection improvement, this
patch introduce a callback, allowing to do asic specific test for
lockup detection. In this patch the CP is use as a first indicator
of GPU lockup. If CP doesn't make progress during 1second we assume
we are facing a GPU lockup.

To avoid overhead of testing GPU lockup frequently due to fence
taking time to be signaled we query the lockup callback every
500msec. There is plenty code comment explaining the design & choise
inside the code.

This have been tested mostly on R3XX/R5XX hw, in normal running
destkop (compiz firefox, quake3 running) the lockup callback wasn't
call once (1 hour session). Also tested with forcing GPU lockup and
lockup was reported after the 1s CP activity timeout.

V2 switch to 500ms timeout so GPU lockup get call at least 2 times
   in less than 2sec.
V3 store last jiffies in fence struct so on ERESTART, EBUSY we keep
   track of how long we already wait for a given fence
V4 make sure we got up to date cp read pointer so we don't have
   false positive

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06 10:42:45 +10:00
..
i2c drm/i2c/ch7006: Fix load detection false positives right after system init. 2009-12-16 17:04:45 +10:00
i810 drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
i830 drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
i915 Merge branch 'gpu-switcher' of /ssd/git//linux-2.6 into drm-next-stage 2010-03-01 16:22:38 +10:00
mga drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
nouveau Merge branch 'v2.6.34-rc2' into drm-linus 2010-03-31 14:55:14 +10:00
r128 drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
radeon drm/radeon/kms: fence cleanup + more reliable GPU lockup detection V4 2010-04-06 10:42:45 +10:00
savage drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
sis drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
tdfx drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
ttm Merge branch 'v2.6.34-rc2' into drm-linus 2010-03-31 14:55:14 +10:00
via tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
vmwgfx drm/vmwgfx: depends on FB 2010-03-15 10:35:04 +10:00
ati_pcigart.c ati_pcigart: fix printk format warning 2010-02-05 11:46:48 +10:00
drm_agpsupport.c
drm_auth.c
drm_buffer.c drm: Add generic multipart buffer. 2010-02-23 09:46:20 +10:00
drm_bufs.c drm: remove address mask param for drm_pci_alloc() 2010-01-07 13:15:50 +10:00
drm_cache.c
drm_context.c
drm_crtc.c Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2010-01-11 09:46:20 -08:00
drm_crtc_helper.c drm: remove the EDID blob stored in the EDID property when it is disconnected 2010-03-15 10:36:21 +10:00
drm_debugfs.c
drm_dma.c
drm_dp_i2c_helper.c Merge remote branch 'anholt/drm-intel-next' into drm-linus 2009-12-08 14:03:47 +10:00
drm_drawable.c
drm_drv.c drm: switch all GEM/KMS ioctls to unlocked ioctl status. 2010-02-11 14:25:18 +10:00
drm_edid.c drm/edid: allow certain bogus edids to hit a fixup path rather than fail 2010-03-15 10:58:17 +10:00
drm_encoder_slave.c
drm_fb_helper.c drm: fix build error when SYSRQ is disabled 2010-03-31 13:12:52 +10:00
drm_fops.c drm: Return ENODEV if the inode mapping changes 2010-03-31 13:12:00 +10:00
drm_gem.c Use drm_gem_object_[handle_]unreference_unlocked where possible 2010-02-11 14:22:34 +10:00
drm_hashtab.c
drm_info.c
drm_ioc32.c drm: convert drm_ioctl to unlocked_ioctl 2009-12-18 11:22:31 +10:00
drm_ioctl.c
drm_irq.c drm: Avoid calling vblank function is vblank wasn't initialized 2010-01-08 13:12:09 +10:00
drm_lock.c
drm_memory.c
drm_mm.c drm: Fix a bug in the range manager. 2010-02-15 11:19:14 +10:00
drm_modes.c lib: Introduce generic list_sort function 2010-01-12 21:02:00 -08:00
drm_pci.c drm: remove address mask param for drm_pci_alloc() 2010-01-07 13:15:50 +10:00
drm_proc.c
drm_scatter.c
drm_sman.c
drm_stub.c drm: Export symbols needed for the vmwgfx driver. 2009-12-07 15:22:08 +10:00
drm_sysfs.c driver core: Convert some drivers to CLASS_ATTR_STRING 2010-03-07 17:04:48 -08:00
drm_vm.c
Kconfig Revert "lib: build list_sort() only if needed" 2010-03-07 09:54:44 -08:00
Makefile drm: Add generic multipart buffer. 2010-02-23 09:46:20 +10:00
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