android_kernel_motorola_sm6225/drivers/gpu/drm
Daniel Vetter 88fe429db0 drm/i915: fix up semaphore_waits_for
There's an entire pile of issues in here:

- Use the main RING_HEAD register, not ACTHD. ACTHD points at the gtt
  offset of the batch buffer when a batch is executed. Semaphores are
  always emitted to the main ring, so we always want to look at that.

- Mask the obtained HEAD pointer with the actual ring size, which is
  much smaller. Together with the above issue this resulted us in
  trying to dereference a pointer way outside of the ring mmio
  mapping. The resulting invalid access in interrupt context
  (hangcheck is executed from timers) lead to a full blown kernel
  panic. The fbcon panic handler then tried to frob our driver harder,
  resulting in a full machine hang at least on my snb here where I've
  stumbled over this.

- Handle ring wrapping correctly and be a bit more explicit about how
  many dwords we're scanning. We probably should also scan more than
  just 4 ...

- Space out some of teh computations for readability.

This reduces hard-hangs on my snb here. Mika and QA both say that it
doesn't completel remove them, but at least for me it's a clear
improvement in stability.

Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
References: https://bugs.freedesktop.org/show_bug.cgi?id=74100
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28 18:25:18 +01:00
..
armada Merge branch 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-fixes 2014-03-07 09:04:32 +10:00
ast drm: init TTM dev_mapping in ttm_bo_device_init() 2014-03-16 12:23:42 +01:00
bochs Merge branch 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux into drm-next 2014-03-18 19:17:02 +10:00
cirrus drm: init TTM dev_mapping in ttm_bo_device_init() 2014-03-16 12:23:42 +01:00
exynos drm/exynos: Convert to use the standard hdmi.h header 2014-02-07 10:48:12 +09:00
gma500 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-01-29 20:49:12 -08:00
i2c drm/i2c: tda998x: always use the same device for all kernel messages 2014-02-14 20:11:12 +00:00
i810
i915 drm/i915: fix up semaphore_waits_for 2014-03-28 18:25:18 +01:00
mga drivers: gpu: Include appropriate header file in mga_ioc32.c 2014-01-14 12:59:24 +10:00
mgag200 drm: init TTM dev_mapping in ttm_bo_device_init() 2014-03-16 12:23:42 +01:00
msm Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next 2014-02-11 12:56:17 +10:00
nouveau drm: init TTM dev_mapping in ttm_bo_device_init() 2014-03-16 12:23:42 +01:00
omapdrm drm: use anon-inode instead of relying on cdevs 2014-03-16 12:23:33 +01:00
panel drm/panel: update EDID BLOB in panel_simple_get_modes() 2014-01-14 16:02:02 +01:00
qxl drm: init TTM dev_mapping in ttm_bo_device_init() 2014-03-16 12:23:42 +01:00
r128 drivers: gpu: Include appropriate header file in r128_ioc32.c 2014-01-14 13:05:37 +10:00
radeon Merge branch 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux into drm-next 2014-03-18 19:17:02 +10:00
rcar-du
savage
shmobile
sis drivers: gpu: Mark function as static in sis_drv.c 2014-01-14 13:04:33 +10:00
tdfx
tegra Linux 3.14-rc7 2014-03-18 19:12:31 +10:00
tilcdc drm: store the gem vma offset manager in a typed pointer 2014-01-14 12:38:32 +10:00
ttm Merge branch 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux into drm-next 2014-03-18 19:17:02 +10:00
udl drm/udl: fix Bpp calculation in dumb_create() 2014-03-16 12:11:01 +01:00
via drivers: gpu: Mark function as static in via_drv.c 2014-01-14 13:05:00 +10:00
vmwgfx Merge branch 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux into drm-next 2014-03-18 19:17:02 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_auth.c
drm_buffer.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc.c Merge branch 'drm-docs' of ssh://people.freedesktop.org/~danvet/drm into drm-next 2014-03-18 19:09:10 +10:00
drm_crtc_helper.c drm: kerneldoc polish for drm_crtc_helper.c 2014-03-13 12:48:48 +01:00
drm_crtc_internal.h drm: move drm_mode related functions into drm_modes.c 2014-03-13 12:48:40 +01:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c drm/dp: let drivers specify the name of the I2C-over-AUX adapter 2014-03-18 10:53:14 +01:00
drm_drv.c drm: remove redundant minor->device field 2014-03-16 12:25:19 +01:00
drm_edid.c Merge branch 'topic/core-stuff' of git://git.freedesktop.org/git/drm-intel into drm-next 2014-03-18 19:23:22 +10:00
drm_edid_load.c
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c Merge branch 'topic/core-stuff' of git://git.freedesktop.org/git/drm-intel into drm-next 2014-03-18 19:23:22 +10:00
drm_flip_work.c
drm_fops.c Merge branch 'drm-minor' into drm-next 2014-03-16 13:13:51 +01:00
drm_gem.c Merge branch 'drm-docs' of ssh://people.freedesktop.org/~danvet/drm into drm-next 2014-03-18 19:09:10 +10:00
drm_gem_cma_helper.c drm/cma: remove to make sg_table when gem cma is created 2014-03-18 19:20:25 +10:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_ioc32.c
drm_ioctl.c drm: add DRM_CAPs for cursor size 2014-02-18 13:41:01 -05:00
drm_irq.c drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos() 2014-01-20 12:21:35 +02:00
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm/doc: Add function reference documentation for drm_mm.c 2014-03-13 12:48:37 +01:00
drm_modes.c drm: polish function kerneldoc for drm_modes.[hc] 2014-03-13 12:48:44 +01:00
drm_panel.c
drm_pci.c Merge branch 'topic/core-stuff' of git://git.freedesktop.org/git/drm-intel into drm-next 2014-03-18 19:23:22 +10:00
drm_platform.c drm: provide device-refcount 2014-03-16 12:25:17 +01:00
drm_prime.c drm/doc: Add PRIME function references 2014-03-13 12:48:34 +01:00
drm_rect.c
drm_scatter.c
drm_stub.c Merge branch 'drm-minor' into drm-next 2014-03-16 13:13:51 +01:00
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_usb.c drm: provide device-refcount 2014-03-16 12:25:17 +01:00
drm_vm.c
drm_vma_manager.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